/* Whiteforge Technologies — shared stylesheet */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #14141a;
  --text-muted: #5a5a64;
  --text-dim: #8a8a92;
  --border: #e6e3dc;
  --border-strong: #d4d0c5;
  --accent: #b45309;
  --accent-hover: #92400e;
  --max-width: 720px;
  --max-width-wide: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "ss01" 1;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

img, svg { max-width: 100%; height: auto; }

/* ---------- Page shell ---------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page--wide { max-width: var(--max-width-wide); }

/* ---------- Header ---------- */

.site-header {
  padding: 8px 0 56px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.site-nav { margin-left: auto; }

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.site-logo__mark {
  display: block;
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.site-logo__text {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  padding: 16px 0 56px;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 18ch;
}

.hero p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  max-width: 60ch;
}

/* ---------- Sections ---------- */

.section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.section__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  margin: 0 0 16px;
}

.section h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 28px;
}

/* ---------- App icon (MailSearch — and the favicon source) ---------- */

.app-icon {
  display: block;
  max-width: 100%;
  height: auto;
}

.app-icon--small  { width: 56px;  }
.app-icon--medium { width: 96px;  }
.app-icon--large  { width: 176px; }

/* ---------- Page title with icon (prose pages) ---------- */

.page-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 8px;
}

.page-title h1 { margin: 0; }

/* ---------- Product card ---------- */

.product-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 26px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.product-card__icon { flex-shrink: 0; }
.product-card__body { flex: 1; min-width: 0; }

.product-card:hover { border-color: var(--text); }

.product-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.product-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
}

.product-card__platform {
  font-size: 12.5px;
  color: var(--text-dim);
  font-feature-settings: "tnum" 1;
}

.product-card__description {
  color: var(--text-muted);
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.55;
}

.product-card__cta {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.product-card:hover .product-card__cta { color: var(--accent-hover); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
}

.footer__block strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ---------- Long-form prose (privacy / terms / support) ---------- */

.prose { max-width: 640px; }

.prose h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 8px;
}

.prose .doc-meta {
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0 0 36px;
  font-feature-settings: "tnum" 1;
}

.prose h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 44px 0 12px;
  letter-spacing: -0.005em;
}

.prose h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}

.prose p { margin: 0 0 14px; }

.prose ul, .prose ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.prose li { margin-bottom: 6px; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
  background: rgba(20, 20, 26, 0.05);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration-thickness: 2px; }

.prose blockquote {
  border-left: 2px solid var(--accent);
  margin: 16px 0;
  padding: 4px 0 4px 18px;
  color: var(--text-muted);
  font-size: 15.5px;
}

.callout {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 20px;
  margin: 20px 0;
}

.callout p:last-child { margin-bottom: 0; }

/* ---------- Product page ---------- */

.hero--product { padding: 8px 0 32px; }

.hero--product .app-icon { margin: 0 0 22px; }

.hero--product h1 {
  font-size: 40px;
  letter-spacing: -0.022em;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 16px;
}

.hero--product .lede {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 26px;
  max-width: 56ch;
}

.cta-row { margin: 0; }

.appstore-button {
  display: inline-block;
  padding: 10px 22px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s ease;
  line-height: 1.3;
}

.appstore-button:hover { background: #000; text-decoration: none; }

.appstore-button__small {
  font-size: 11px;
  opacity: 0.75;
  display: block;
  letter-spacing: 0.01em;
}

.appstore-button__large {
  font-size: 17px;
  font-weight: 600;
  display: block;
  letter-spacing: -0.005em;
}

.appstore-button__note {
  font-size: 13px;
  color: var(--text-dim);
  margin-left: 14px;
  font-style: italic;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 32px;
}

.feature-list h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}

.feature-list p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

.provider-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.provider-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}

.provider-list li:first-child { padding-top: 0; }
.provider-list li:last-child { border-bottom: none; }

.provider-list strong {
  color: var(--text);
  font-weight: 600;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.screenshot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background: #000;
}

/* Document table of contents */

.doc-toc {
  border-left: 2px solid var(--border);
  padding: 4px 0 4px 16px;
  margin: 8px 0 36px;
  font-size: 14px;
  color: var(--text-muted);
}

.doc-toc strong {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 600;
}

.doc-toc ol {
  list-style: decimal inside;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 24px;
}

.doc-toc li {
  margin: 0;
  padding: 2px 0;
}

.doc-toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.doc-toc a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .page { padding: 24px 20px 48px; }
  .site-header {
    padding-bottom: 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .site-logo { gap: 12px; }
  .site-logo__text { font-size: 18px; }
  .site-nav {
    margin-left: 0;
    justify-content: flex-end;
    gap: 18px;
    font-size: 14px;
  }
  .hero { padding-bottom: 40px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16.5px; }
  .section { padding: 36px 0; }
  .section h2 { font-size: 20px; margin-bottom: 22px; }
  .product-card { padding: 18px 20px 20px; gap: 16px; }
  .product-card__header { flex-direction: column; gap: 4px; }
  .product-card .app-icon--medium { width: 76px; }
  .hero--product .app-icon--large { width: 132px; margin-bottom: 18px; }
  .page-title { gap: 14px; }
  .page-title .app-icon--small { width: 48px; }
  .site-footer { grid-template-columns: 1fr; gap: 24px; margin-top: 56px; }
  .prose h1 { font-size: 26px; }
  .prose h2 { font-size: 18px; margin-top: 36px; }
  .hero--product h1 { font-size: 30px; }
  .hero--product .lede { font-size: 16.5px; }
  .feature-list { grid-template-columns: 1fr; gap: 22px; }
  .provider-list li { grid-template-columns: 1fr; gap: 2px; }
  .screenshots {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .appstore-button__note { display: block; margin-left: 0; margin-top: 10px; }
  .doc-toc ol { columns: 1; }
}
