/* =========================================================================
   apps.zp.digital — shared design system
   "Clean Apple-adjacent": light, modern, conversion-first.
   All tokens centralized; dark mode via [data-theme] + prefers-color-scheme.
   Ported from the Claude Design handoff (labs-apps).
   ========================================================================= */

/* Inter is the cross-platform fallback ONLY — Apple devices render SF Pro
   from the system stack for free. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- Tokens: light (default) ---- */
:root {
  --ink:        #1d1d1f;
  --ink-soft:   #6e6e73;
  --ink-faint:  #86868b;
  --hairline:   #d2d2d7;
  --hairline-2: #e8e8ed;
  --paper:      #ffffff;
  --paper-2:    #f5f5f7;
  --paper-3:    #fbfbfd;
  --zen:        #0a84ff;
  --zen-press:  #0060df;
  --success:    #30d158;

  /* Per-app accent — overridden per landing view */
  --app-accent:   #30d158;
  --app-accent-2: #00c7be;

  --card-shadow:   0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.12);
  --card-shadow-h: 0 2px 6px rgba(0,0,0,.06), 0 22px 50px -16px rgba(0,0,0,.20);
  --nav-bg:        rgba(255,255,255,.72);
  --nav-border:    rgba(0,0,0,.08);
  --device-shadow: 0 4px 12px rgba(0,0,0,.10), 0 40px 80px -28px rgba(0,0,0,.35);

  --container: 1120px;
  --pad-x: clamp(1.25rem, 5vw, 2.5rem);
  --sec-y: clamp(4rem, 10vw, 8rem);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Inter", system-ui, sans-serif;
}

/* ---- Tokens: dark ---- */
:root[data-theme="dark"] {
  --ink:        #f5f5f7;
  --ink-soft:   #a1a1a6;
  --ink-faint:  #86868b;
  --hairline:   #38383c;
  --hairline-2: #2a2a2d;
  --paper:      #000000;
  --paper-2:    #161617;
  --paper-3:    #0c0c0d;
  --zen:        #2997ff;
  --zen-press:  #6bb6ff;
  --success:    #30d158;

  --card-shadow:   0 1px 2px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.7);
  --card-shadow-h: 0 2px 8px rgba(0,0,0,.6), 0 26px 60px -18px rgba(0,0,0,.8);
  --nav-bg:        rgba(22,22,23,.72);
  --nav-border:    rgba(255,255,255,.10);
  --device-shadow: 0 4px 14px rgba(0,0,0,.6), 0 50px 90px -30px rgba(0,0,0,.9);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #f5f5f7;
    --ink-soft:   #a1a1a6;
    --ink-faint:  #86868b;
    --hairline:   #38383c;
    --hairline-2: #2a2a2d;
    --paper:      #000000;
    --paper-2:    #161617;
    --paper-3:    #0c0c0d;
    --zen:        #2997ff;
    --zen-press:  #6bb6ff;
    --nav-bg:        rgba(22,22,23,.72);
    --nav-border:    rgba(255,255,255,.10);
    --card-shadow:   0 1px 2px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.7);
    --card-shadow-h: 0 2px 8px rgba(0,0,0,.6), 0 26px 60px -18px rgba(0,0,0,.8);
    --device-shadow: 0 4px 14px rgba(0,0,0,.6), 0 50px 90px -30px rgba(0,0,0,.9);
  }
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--zen); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--zen); outline-offset: 3px; border-radius: 4px; }
button { font-family: inherit; }

/* ---- Layout ---- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--sec-y); }
.section--alt { background: var(--paper-2); }
.eyebrow {
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--app-accent); margin: 0 0 .75rem;
}
.eyebrow--zen { color: var(--zen); }

/* ---- Type ---- */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.022em; line-height: 1.05; text-wrap: balance; }
.h-hero    { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; }
.h-section { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.h-sub     { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.018em; }
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.45;
  color: var(--ink-soft); font-weight: 400; letter-spacing: -.01em;
  max-width: 38ch; text-wrap: pretty;
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: 0 1.4rem; border-radius: 980px;
  font-size: 1.0625rem; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .12s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--zen); color: #fff; }
.btn--primary:hover { background: var(--zen-press); }
.btn--ghost { background: transparent; color: var(--zen); border-color: var(--hairline); }
.btn--ghost:hover { border-color: var(--zen); }
.btn--accent { background: var(--app-accent); color: #04210f; font-weight: 600; }
.btn--accent:hover { filter: brightness(1.04); }

/* "Coming to the App Store" pill (neutral, badge isn't live yet) */
.appstore {
  display: inline-flex; align-items: center; gap: .7rem;
  min-height: 52px; padding: 0 1.25rem 0 1rem; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
}
.appstore:hover { text-decoration: none; opacity: .9; }
.appstore .apple { width: 26px; height: 26px; flex: none; }
.appstore .as-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore .as-top { font-size: .6875rem; letter-spacing: .02em; opacity: .8; }
.appstore .as-bot { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; }
.appstore--accent { background: transparent; color: var(--ink); border-color: var(--hairline); }
.appstore--accent .apple { color: var(--app-accent); }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md); padding: 1.6rem;
  box-shadow: var(--card-shadow); transition: transform .25s, box-shadow .25s;
}
.feature-card { padding: 1.75rem; }
.feature-card .ficon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--app-accent) 16%, var(--paper));
  color: var(--app-accent); margin-bottom: 1.1rem;
}
.feature-card h3 { font-size: 1.1875rem; margin-bottom: .4rem; letter-spacing: -.01em; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }

/* App grid cards (home) */
.app-card {
  display: flex; flex-direction: column; gap: 1rem; cursor: pointer;
  text-decoration: none; color: inherit;
}
.app-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--card-shadow-h); }
.app-card .app-top { display: flex; align-items: center; gap: 1rem; }
.app-icon {
  width: 60px; height: 60px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.1), 0 6px 16px -6px rgba(0,0,0,.4);
}
.app-card h3 { font-size: 1.3125rem; }
.app-card .app-one { color: var(--ink-soft); margin: 0; font-size: 1.0625rem; }
.app-card .app-cta { margin-top: auto; color: var(--app-accent); font-weight: 600; font-size: 1rem; }
.app-card--ghost { cursor: default; opacity: 1; }
.app-card--ghost:hover { transform: none; box-shadow: var(--card-shadow); }
.app-card--ghost .app-icon { background: var(--paper-2); color: var(--ink-faint); box-shadow: inset 0 0 0 1px var(--hairline); }
.badge-soon {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-faint);
  background: var(--paper-2); border: 1px solid var(--hairline);
  padding: .2rem .55rem; border-radius: 980px;
}
/* the lead app — "coming soon" but visually ahead of the workshop badges */
.badge-soon--next {
  color: #0a84ff; border-color: color-mix(in oklab, #0a84ff 38%, transparent);
  background: color-mix(in oklab, #0a84ff 12%, transparent);
}

/* ---- Pills / chips ---- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .875rem; font-weight: 500; color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--hairline);
  padding: .4rem .85rem; border-radius: 980px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ---- Legal / prose ---- */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; letter-spacing: -.015em; }
.prose h3 { font-size: 1.1875rem; margin: 1.75rem 0 .5rem; }
.prose p, .prose li { color: var(--ink); font-size: 1.0625rem; line-height: 1.6; }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { font-weight: 600; }
.last-updated {
  display: inline-block; font-size: .875rem; color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--hairline);
  padding: .35rem .8rem; border-radius: 980px; margin-bottom: 1.5rem;
}

/* ---- FAQ accordion (native details) ---- */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.4rem 2.5rem 1.4rem 0; position: relative;
  font-size: 1.1875rem; font-weight: 500; letter-spacing: -.01em; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: 13px; height: 13px;
  margin-top: -6px;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 2.5rem 1.5rem 0; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.55; max-width: 68ch; }
.faq .faq-body p { margin: 0 0 .75rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---- Callout / honesty note ---- */
.note {
  border: 1px solid var(--hairline); background: var(--paper-2);
  border-radius: var(--radius-md); padding: 1.25rem 1.4rem;
  font-size: 1rem; color: var(--ink-soft); line-height: 1.55;
}
.note strong { color: var(--ink); }

/* ---- Image slot: static placeholder for a real screenshot ----
   Replaces the design tool's interactive <image-slot>. Drop a real
   <img> inside (or swap this element for one) when screenshots exist. */
.img-slot {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .4rem; text-align: center;
  padding: .75rem; color: var(--ink-faint); font-size: .8125rem; font-weight: 500;
  background:
    repeating-linear-gradient(45deg,
      color-mix(in oklab, var(--app-accent) 7%, var(--paper)) 0 10px,
      var(--paper-2) 10px 20px);
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .h-hero { transition: none; }
}

/* ---- Hero h1 fade on app switch ---- */
.h-hero { transition: opacity .25s ease; }
.h1-fading { opacity: 0; }
