/* The Hub — shared web styles for tafthub.com (landing, privacy, support, 404).
   One file so a restyle is a single edit. Loaded by every page. */

/* ---- Design tokens ---- */
:root {
  --brand:        #6C63F4;   /* periwinkle — matches the iOS app's Theme.brand */
  --brand-strong: #4f46d6;   /* darker periwinkle for small link text (passes 4.5:1 on white) */
  --navy:         #1F2A48;
  --bg:           #fafafa;
  --bg-tint:      #f4f3ff;   /* faint periwinkle wash for the hero */
  --surface:      #ffffff;
  --ink:          #18181b;   /* headings — near-black */
  --ink-2:        #34343b;   /* body text — dark enough to read on tinted bg */
  --muted:        #6b6b73;   /* captions / labels only */
  --line:         #e7e7ec;
  --radius:       14px;
  --radius-lg:    22px;
  --maxw:         700px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Typography ---- */
h1, h2, h3 { color: var(--ink); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(28px, 6vw, 34px); font-weight: 800; letter-spacing: -0.025em; margin: 16px 0 4px; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.012em; margin: 32px 0 8px; }
p, li { font-size: 16px; text-wrap: pretty; }
a { color: var(--brand-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }

/* Visible keyboard focus everywhere (accessibility requirement). */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ---- Brand wordmark (header of legal pages) ---- */
.brandmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brandmark .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: -0.03em;
  box-shadow: 0 6px 16px rgba(108, 99, 244, 0.30);   /* tinted, not generic black */
}
.brandmark .word { font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }

/* ---- Legal/content pages (privacy, support) ---- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 72px; }
.page header { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
.page h1 { margin-top: 18px; }
.updated { color: var(--muted); font-size: 14px; margin: 0; }
.lede { font-size: 17px; color: var(--navy); margin: 24px 0; line-height: 1.6; }
.page ul { padding-left: 20px; margin: 8px 0; }
.page li { margin: 5px 0; }

footer.site { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--brand); }

/* ---- Support contact card (brand-tinted, not a plain bordered box) ---- */
.contact {
  background: linear-gradient(180deg, var(--bg-tint), var(--surface));
  border: 1px solid #e6e4fb;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 24px 0;
}
.contact .label { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.contact .email { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.contact .email a { text-decoration: none; }
.contact .turnaround { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.qa { margin: 4px 0 0; }
.qa h3 { font-size: 16px; font-weight: 600; margin: 24px 0 4px; }

/* ---- Landing page (index) ---- */
.landing {
  min-height: 100dvh;                 /* dvh avoids the iOS Safari 100vh jump */
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-tint) 0%, rgba(244,243,255,0) 60%),
    var(--bg);
}
.hero {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 56px 24px;
}
/* Subtle film grain so the hero isn't sterile-flat. Behind content, non-interactive. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero > * { position: relative; z-index: 1; }

.badge {
  width: 86px; height: 86px; border-radius: 24px;
  background: linear-gradient(160deg, #7d75ff, var(--brand));
  color: #fff; display: grid; place-items: center;
  font-size: 42px; font-weight: 800; letter-spacing: -0.04em;
  box-shadow: 0 16px 40px rgba(108, 99, 244, 0.38), inset 0 1px 0 rgba(255,255,255,0.25);
  margin-bottom: 26px;
}
.hero h1 { font-size: clamp(32px, 8vw, 46px); margin: 0 0 10px; }
.tagline { font-size: 18px; color: var(--navy); font-weight: 600; margin: 0; }
.sub { font-size: 16px; color: var(--ink-2); max-width: 460px; margin: 14px 0 28px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid #e6e4fb;
  color: var(--brand-strong); font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; margin-bottom: 34px;
  box-shadow: 0 4px 14px rgba(108, 99, 244, 0.10);
}
.pill .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--brand); }

.links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.links a {
  text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); color: var(--navy); background: var(--surface);
  transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.links a:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 6px 18px rgba(108, 99, 244, 0.14); }
.links a:active { transform: translateY(1px); }

footer.landing-foot { text-align: center; color: var(--muted); font-size: 14px; padding: 24px; position: relative; z-index: 1; }
