/* ==========================================================================
   Delete My Face — site styles
   Palette, spacing and radii are ported from the app's design tokens
   (App/Theme/Color+Theme.swift, App/Theme/Theme.swift) so web and iOS match.
   Fonts are self-hosted: a privacy product should not phone a font CDN.
   ========================================================================== */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --paper: #faf8f4;
  --paper-2: #f3efe8;
  --raised: #ffffff;

  --ink-900: #141414;
  --ink-700: #3a3a3a;
  --ink-500: #6b6b6b;
  --ink-400: #8e8e8e;
  --ink-200: #e7e3dc;
  --ink-100: #f0ece4;

  --yellow-50: #fff8e1;
  --yellow-400: #ffc83d;
  --yellow-600: #e59400;

  --red-500: #f0384e;
  --green-500: #28c76f;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --gutter: 20px;
  --measure: 68ch;
  --shell: 1120px;

  --sans: "Hanken Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
}

@media (min-width: 800px) {
  :root { --gutter: 32px; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain. Sits above the background, below everything else. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--yellow-600);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--yellow-400); color: var(--ink-900); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-900);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Typography primitives
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-weight: 400;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--yellow-400);
  flex: none;
}

.eyebrow--plain::before { display: none; }

.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--ink-700);
  max-width: 56ch;
}

/* Yellow sweep under a headline word. Animates once on load. */
.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.mark::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.06em;
  height: 0.3em;
  background: var(--yellow-400);
  border-radius: 2px;
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0);
  animation: sweep 0.75s var(--ease) 0.5s forwards;
}
@keyframes sweep { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .mark::after { transform: scaleX(1); animation: none; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.14s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--ink-900);
  color: var(--paper);
  box-shadow: 0 2px 0 0 var(--yellow-600);
}
.btn--primary:hover {
  background: #000;
  box-shadow: 0 4px 0 0 var(--yellow-600);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0) scale(0.98); box-shadow: 0 1px 0 0 var(--yellow-600); }

.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-200);
}
.btn--ghost:hover { border-color: var(--ink-900); background: var(--raised); }

.btn__badge { width: 20px; height: 20px; flex: none; }

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--ink-200); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.16s var(--ease);
}
/* Text links only — buttons keep their own colors (.btn--primary is paper
   on ink; the ink-500/ink-900 pair here made its label grey, and near-
   invisible on hover). */
.site-nav a:not(.btn) { color: var(--ink-500); }
.site-nav a:not(.btn):hover { color: var(--ink-900); }

.site-nav .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }

.site-nav__links { display: none; gap: 28px; align-items: center; }
@media (min-width: 720px) {
  .site-nav__links { display: flex; }
}

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

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
}

/* Eraser residue: soft yellow smudge behind the headline. */
.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -180px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 200, 61, 0.5) 0%, rgba(255, 200, 61, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 {
  font-size: clamp(42px, 7.4vw, 78px);
  margin-bottom: 24px;
}

.hero .lede { margin-bottom: 32px; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

/* Staggered entrance */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.6s var(--ease) forwards; }
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.14s; }
.reveal:nth-child(3) { animation-delay: 0.23s; }
.reveal:nth-child(4) { animation-delay: 0.32s; }
.reveal:nth-child(5) { animation-delay: 0.41s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
}

.hero__art {
  position: relative;
  display: grid;
  place-items: center;
}

/* The source art is the full-bleed App Store icon, so it carries a white
   square. Squircle it to read as a deliberate app icon on the warm paper. */
.hero__art img {
  width: min(320px, 74%);
  border-radius: 23%;
  box-shadow: 0 26px 50px rgba(20, 20, 20, 0.16), 0 2px 0 0 rgba(20, 20, 20, 0.04);
  transform: rotate(-4deg);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-12px); }
}

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

.section {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--ink-200);
}

.section--sunken { background: var(--paper-2); }

/* Wide enough that a display-size h2 gets two lines rather than three or four.
   The paragraph keeps its own, narrower measure for readability. */
.section__head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }

.section__head h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: 18px;
}

.section__head p {
  color: var(--ink-700);
  margin: 0;
  font-size: 18px;
  max-width: 52ch;
}

/* Numbered two-job grid */
.jobs {
  display: grid;
  gap: 20px;
}
@media (min-width: 820px) {
  .jobs { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* Three-up variant (the how-it-works steps). */
.jobs--three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 820px) {
  .jobs--three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.job {
  background: var(--raised);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 40px);
  transition: transform 0.24s var(--spring), box-shadow 0.24s var(--ease);
}
.job:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 20, 20, 0.08);
}

.job__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-400);
  display: block;
  margin-bottom: 18px;
}

.job h3 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 14px; }

.job p { color: var(--ink-700); margin: 0 0 18px; }

.job__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: var(--ink-100);
  color: var(--ink-500);
}

.job__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.job__tag--info { background: #e4f6fe; color: #0a9bd4; }
.job__tag--protect { background: #e4f8ec; color: #16a85a; }

/* Honesty list */
.honest {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink-200);
}

.honest li {
  list-style: none;
  display: grid;
  gap: 6px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ink-200);
}
@media (min-width: 780px) {
  .honest li { grid-template-columns: 22ch 1fr; align-items: baseline; }
}

.honest { padding: 0; margin: 0; }

.honest__k {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.honest__v { color: var(--ink-700); margin: 0; }

/* Privacy bullets */
.privacy-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 780px) {
  .privacy-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

.privacy-item {
  padding: 26px;
  background: var(--raised);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
}

.privacy-item h3 { font-size: 18px; margin-bottom: 10px; }
.privacy-item p { margin: 0; color: var(--ink-700); font-size: 16px; }

/* Closing CTA */
.closer { text-align: center; }
.closer h2 {
  font-size: clamp(32px, 5.6vw, 58px);
  max-width: 20ch;
  margin: 0 auto 22px;
}
.closer .lede { margin: 0 auto 32px; }
.closer .hero__cta { justify-content: center; margin-bottom: 0; }

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

.site-footer {
  border-top: 1px solid var(--ink-200);
  padding: 56px 0 44px;
  background: var(--paper-2);
}

.site-footer__inner {
  display: grid;
  gap: 32px;
}
@media (min-width: 780px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.site-footer__legal {
  font-size: 14px;
  color: var(--ink-500);
  max-width: 44ch;
  margin: 16px 0 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-500);
  transition: color 0.16s var(--ease);
}
.footer-nav a:hover { color: var(--ink-900); }

/* --------------------------------------------------------------------------
   Document pages (terms / privacy / support)
   -------------------------------------------------------------------------- */

.doc-hero {
  padding: clamp(44px, 6vw, 72px) 0 clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--ink-200);
}

.doc-hero h1 { font-size: clamp(34px, 6vw, 60px); margin-bottom: 16px; }

.doc-hero p { color: var(--ink-700); max-width: 54ch; margin: 0; }

.doc-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
  margin-top: 20px;
}

.doc-layout {
  display: grid;
  gap: 48px;
  padding: clamp(36px, 5vw, 56px) 0 clamp(64px, 8vw, 96px);
  align-items: start;
}
@media (min-width: 940px) {
  .doc-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 64px; }
}

/* Single-column variant for pages with no TOC (support = one contact card). */
.doc-layout--single { justify-content: center; }
@media (min-width: 940px) {
  .doc-layout--single { grid-template-columns: minmax(0, 720px); }
}

.toc { display: none; }
@media (min-width: 940px) {
  .toc {
    display: block;
    position: sticky;
    top: 96px;
  }
}

.toc__title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--ink-200);
  counter-reset: toc;
}

.toc li { counter-increment: toc; }

.toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-500);
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.toc a::before {
  content: counter(toc) ". ";
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-300, #b8b6b2);
}
.toc a:hover { color: var(--ink-900); border-left-color: var(--yellow-400); }

.doc-body { max-width: var(--measure); }

.doc-body > section { scroll-margin-top: 96px; }

.doc-body h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 48px 0 16px;
  padding-top: 8px;
}
.doc-body > section:first-child h2 { margin-top: 0; }

.doc-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  letter-spacing: -0.015em;
}

.doc-body p { margin: 0 0 16px; color: var(--ink-700); }

.doc-body strong { color: var(--ink-900); font-weight: 600; }

.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 22px; color: var(--ink-700); }
.doc-body li { margin-bottom: 9px; }
.doc-body li::marker { color: var(--ink-400); }

.doc-body a {
  color: var(--ink-900);
  text-decoration: underline;
  text-decoration-color: var(--yellow-600);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.doc-body a:hover { background: var(--yellow-50); }

/* Buttons inside a document must not pick up the body link underline. */
.doc-body a.btn { text-decoration: none; }
.doc-body a.btn:hover { background: var(--yellow-400); }
.doc-body .contact-card a.btn:hover { background: #ffd24d; }

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
}
.doc-body th, .doc-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-200);
  vertical-align: top;
}
.doc-body th {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  border-bottom-color: var(--ink-900);
}
.doc-body td { color: var(--ink-700); }

.table-scroll { overflow-x: auto; }

/* Callout used for the standing caveats */
.callout {
  border-left: 3px solid var(--yellow-400);
  background: var(--yellow-50);
  padding: 18px 22px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 22px;
}
.callout p { margin: 0; color: var(--ink-700); }
.callout p + p { margin-top: 10px; }

/* Loud unresolved placeholder. Impossible to ship by accident. */
.todo {
  display: inline-block;
  background: var(--red-500);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.doc-footer {
  border-top: 1px solid var(--ink-200);
  margin-top: 48px;
  padding-top: 26px;
  font-size: 15px;
  color: var(--ink-500);
}

/* --------------------------------------------------------------------------
   Support page
   -------------------------------------------------------------------------- */

.contact-card {
  background: var(--ink-900);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 40px);
  margin-bottom: 44px;
}

.contact-card h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 12px;
  color: var(--paper);
}

.contact-card p {
  color: rgba(250, 248, 244, 0.76);
  margin: 0 0 22px;
  max-width: 48ch;
}

.contact-card .btn--primary {
  background: var(--yellow-400);
  color: var(--ink-900);
  box-shadow: none;
}
.contact-card .btn--primary:hover { background: #ffd24d; box-shadow: none; }

.contact-card__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(250, 248, 244, 0.5);
  margin: 18px 0 0;
}

details.faq {
  border-bottom: 1px solid var(--ink-200);
}
details.faq:first-of-type { border-top: 1px solid var(--ink-200); }

details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  position: relative;
  transition: color 0.16s var(--ease);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:hover { color: var(--yellow-600); }

details.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--ink-400);
  border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg);
  transition: transform 0.24s var(--ease);
}
details.faq[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }

details.faq .faq__body {
  padding: 0 0 24px;
  max-width: var(--measure);
}
details.faq .faq__body p:last-child { margin-bottom: 0; }
