/* SHEIK LLC site. Neutral graphite and white, like the Molecular app: color
   is kept for what it marks, never decoration. Light and dark follow the
   visitor's system setting. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --ink-2: #48484a;
  --ink-3: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --link: #1c1c1e;
  --radius: 18px;
  --max: 760px;
  --header: 69px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --ink-3: #98989d;
    --line: rgba(255, 255, 255, 0.12);
    --link: #f5f5f7;
  }
  /* The graphite logo needs an edge to stand off a black page. */
  .brand img, .hero img.mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
  .hero img.mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 32px rgba(0, 0, 0, 0.5); }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 18px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero { text-align: center; padding-top: 56px; padding-bottom: 40px; }
.hero img.mark { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); }
.hero h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.08; letter-spacing: -0.025em; margin: 28px 0 12px; }
.hero p.lede { font-size: clamp(18px, 2.6vw, 21px); color: var(--ink-2); max-width: 560px; margin: 0 auto; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
}
.card + .card { margin-top: 16px; }
.app-card { display: flex; gap: 22px; align-items: center; text-decoration: none; }
.app-card img { width: 96px; height: 96px; border-radius: 22px; flex: none; }
.app-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.015em; }
.app-card p { margin: 0; color: var(--ink-2); }
.app-card .more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 15px; }
.pill {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: 3px;
}

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 8px 0 0; padding: 0; list-style: none; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.features h3 { margin: 0 0 6px; font-size: 18px; }
.features p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* Long-form pages (privacy, support) */
.page { padding-top: 28px; padding-bottom: 24px; }
.page h1 { font-size: clamp(30px, 6vw, 40px); letter-spacing: -0.02em; line-height: 1.12; margin: 12px 0 6px; }
.page .meta { color: var(--ink-3); margin: 0 0 28px; font-size: 15px; }
.page h2 { font-size: 21px; letter-spacing: -0.01em; margin: 36px 0 8px; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 22px; }
.page li + li { margin-top: 6px; }
.page strong { color: var(--ink); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 20px 0; }
.callout p { margin: 0; }

.section-title { font-size: 24px; letter-spacing: -0.015em; margin: 48px 0 16px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details p { margin: 10px 0 0; }

/* Footer */
.site-footer { padding: 48px 0 40px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--ink-3); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 520px) {
  .app-card { flex-direction: column; align-items: flex-start; }
  .nav { gap: 14px; font-size: 14px; }
  .card { padding: 22px; }
}

/* ---------------------------------------------------------------------
   Scroll-driven motion. site.js sets --p (0 to 1) on [data-scroll]
   elements and adds .in to .reveal elements as they enter. With Reduce
   Motion on, html gets .still and everything rests in its final state.
   --------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
}

/* Big hero: fills the first screen, then eases back as you scroll on. */
.stage {
  min-height: calc(100svh - 68px);
  display: grid; place-items: center; text-align: center;
  padding-top: 24px; padding-bottom: 64px;
  --p: 0;
}
.stage-inner {
  transform: translateY(calc(var(--p) * -60px)) scale(calc(1 - var(--p) * 0.12));
  opacity: calc(1 - var(--p) * 1.4);
  will-change: transform, opacity;
}
.stage .mark {
  width: 128px; height: 128px; border-radius: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transform: scale(calc(1 + var(--p) * 0.35)) rotate(calc(var(--p) * -6deg));
}
.stage h1 {
  font-size: clamp(42px, 9vw, 84px); line-height: 1.02; letter-spacing: -0.035em;
  margin: 32px 0 16px;
}
.stage h1, .big-title, .statement p, .draw h2 { text-wrap: balance; }
.stage .lede { font-size: clamp(19px, 2.8vw, 24px); color: var(--ink-2); max-width: 620px; margin: 0 auto; }
/* Peek: the hint at the foot of a hero shows what's further down. */
.peek {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 44px;
  padding: 8px 16px 8px 8px; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--ink);
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 300ms ease;
}
.peek:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10); }
.peek-icons { display: flex; }
.peek-icons img, .peek-icons svg { width: 36px; height: 36px; border-radius: 9px; display: block; }
.peek-icons img + img { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.peek-arrow {
  width: 9px; height: 9px; margin: -4px 2px 0 2px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg);
}
.moving .peek-arrow { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 4px; } }
.peek-map { background: var(--bg); border: 1px solid var(--line); }
.peek-map path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.peek-map rect { fill: var(--ink); }
.peek-map rect.leaf { fill: var(--ink-3); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.anchor { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media (prefers-color-scheme: dark) {
  .stage .mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 16px 40px rgba(0, 0, 0, 0.6); }
}

/* Pinned statement: the words light up one by one as you scroll. */
.statement { position: relative; height: 260vh; --p: 0; }
.statement .pin {
  position: sticky; top: var(--header); height: calc(100svh - var(--header));
  display: grid; place-items: center; text-align: center; padding: 0 24px;
}
.statement p {
  margin: 0; max-width: 900px;
  font-size: clamp(32px, 6.4vw, 64px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700;
}
.statement .w {
  opacity: clamp(0.14, calc(var(--p) * var(--n) * 1.15 - var(--i)), 1);
  transition: opacity 80ms linear;
}

/* Reveal: rise and fade in once. */
.moving .reveal { opacity: 0; transform: translateY(28px) scale(0.985); transition: opacity 700ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.1, 1); }
.moving .reveal.in { opacity: 1; transform: none; }
.moving .reveal[data-delay="1"] { transition-delay: 90ms; }
.moving .reveal[data-delay="2"] { transition-delay: 180ms; }
.moving .reveal[data-delay="3"] { transition-delay: 270ms; }
.moving .reveal[data-delay="4"] { transition-delay: 360ms; }
.moving .reveal[data-delay="5"] { transition-delay: 450ms; }

/* Wide sections need more room than the reading column. */
.wrap.wide { max-width: 1040px; }

/* Products: compact cards so the grid stays tidy with many products. */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px;
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 300ms ease;
}
a.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10); }
.product-card img, .soon-mark { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 14px; }
.product-card h3 { margin: 0; font-size: 21px; letter-spacing: -0.015em; }
.product-card .tag { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0 0 8px; }
.product-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.product-card.soon { background: transparent; border-style: dashed; }
.soon-mark { display: block; border: 1.5px dashed var(--ink-3); opacity: 0.6; position: relative; }
.soon-mark::before, .soon-mark::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink-3); border-radius: 1px; }
.soon-mark::before { width: 18px; height: 2px; margin: -1px 0 0 -9px; }
.soon-mark::after { width: 2px; height: 18px; margin: -9px 0 0 -1px; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }

.big-title { font-size: clamp(32px, 6vw, 56px); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 24px; }
.spacer-xl { height: 120px; }

/* Molecular: a pinned goal map that draws itself as you scroll. */
.draw { position: relative; height: 320vh; --p: 0; }
.draw .pin { position: sticky; top: var(--header); height: calc(100svh - var(--header)); display: grid; place-items: center; padding: 0 20px; overflow: hidden; }
.draw .frame { width: min(980px, 100%); text-align: center; }
.draw h2 { font-size: clamp(30px, 5.5vw, 52px); letter-spacing: -0.03em; line-height: 1.06; margin: 0 0 8px; }
.draw .caption { color: var(--ink-2); font-size: clamp(17px, 2.2vw, 21px); margin: 0 auto 28px; max-width: 620px; min-height: 2.6em; }
.draw svg { width: 100%; height: auto; overflow: visible; }
.draw .link {
  fill: none; stroke: var(--ink); stroke-linecap: round;
  /* Hidden until it starts drawing: a round cap on an undrawn line shows a dot. */
  opacity: clamp(0, calc((var(--p) * 5 - var(--i)) * 40), 1);
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, var(--p) * 5 - var(--i), 1));
}
.draw .node { opacity: clamp(0, calc(var(--p) * 5 - var(--i) + 0.15) * 3, 1); }
.draw .node rect { fill: var(--surface); stroke: var(--line); }
.draw .node.goal rect { fill: var(--ink); stroke: none; }
.draw .node text { fill: var(--ink); font: 600 15px -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
.draw .node.goal text { fill: var(--bg); }
.draw .node .sub { fill: var(--ink-3); font-weight: 500; font-size: 12px; }
.draw .node rect.bar-track { fill: rgba(127, 127, 127, 0.22); stroke: none; }
.draw .node rect.bar { fill: var(--ink); stroke: none; transform-box: fill-box; transform-origin: left; transform: scaleX(clamp(0, calc(var(--p) * 2.2 - 1.1), 1)); }
.draw .node.goal rect.bar { fill: var(--bg); }
.draw .node.goal rect.bar-track { fill: rgba(127, 127, 127, 0.45); }
/* Captions cross-fade: each shows between its --a and --b of the scroll. */
.draw .caption { display: grid; }
.draw .caption span {
  grid-area: 1 / 1;
  opacity: clamp(0, min(calc((var(--p) - var(--a)) * 14), calc((var(--b) - var(--p)) * 14)), 1);
}
.still .draw .caption span { opacity: 0; }
.still .draw .caption span:last-child { opacity: 1; }

.still .statement, .still .draw { height: auto; }
.still .statement .pin, .still .draw .pin { position: static; height: auto; padding-top: 80px; padding-bottom: 80px; }

@media (max-width: 600px) {
  .statement { height: 220vh; }
  .draw { height: 260vh; }
}

/* The map is sized by the screen's height as well as its width, so the
   pinned frame always fits below the header (title and caption take the
   rest). */
.draw svg.map-wide { height: min(calc(100svh - var(--header) - 200px), calc(min(940px, 100vw - 40px) * 0.4375)); }
.map-tall { display: none; }
@media (max-width: 640px) {
  .map-wide { display: none; }
  .draw svg.map-tall {
    display: block; margin: 0 auto;
    height: min(calc(100svh - var(--header) - 150px), calc(min(400px, 100vw - 32px) * 1.25));
  }
}

.page h3 { font-size: 18px; margin: 24px 0 6px; color: var(--ink); }
.fine { color: var(--ink-3); font-size: 15px; margin: 24px 0 0; max-width: 640px; }
.fine a { color: var(--ink-2); }
.product-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.product-list a {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
}
.product-list img { width: 40px; height: 40px; border-radius: 10px; }
.product-list strong { display: block; color: var(--ink); }
.product-list span { color: var(--ink-3); font-size: 15px; }
.page .product-list li + li { margin-top: 0; }
.page h2[id] { scroll-margin-top: 80px; }
.page .toc { font-size: 15px; }
/* On phones, products become compact rows so a long list stays scannable. */
@media (max-width: 600px) {
  .product-grid { gap: 10px; }
  .product-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 2px; align-items: start; padding: 16px 18px; border-radius: 20px; }
  .product-card img, .soon-mark { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 13px; margin: 0; }
  .product-card h3 { font-size: 18px; }
  .product-card .tag { margin: 0 0 4px; }
  .product-card p { font-size: 15px; }
}
.card > p:first-child { margin-top: 0; }

/* ---------------------------------------------------------------------
   Phones: tighter type, spacing, and cards, and a solid header so
   content doesn't show through it.
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root { --header: 53px; }
  .site-header { padding: 12px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom-color: var(--line); }
  .brand { gap: 8px; font-size: 16px; }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .nav { gap: 16px; font-size: 15px; }

  .stage { min-height: calc(100svh - 53px); padding-top: 8px; padding-bottom: 40px; }
  .stage .mark { width: 92px; height: 92px; border-radius: 21px; }
  .stage h1 { font-size: clamp(34px, 10vw, 44px); line-height: 1.05; margin: 26px 0 14px; }
  .stage .lede { font-size: 18px; line-height: 1.5; }
  .peek { margin-top: 32px; font-size: 15px; }

  .statement p { font-size: clamp(28px, 8.4vw, 34px); line-height: 1.15; }

  .wrap.wide, .wrap { padding: 0 20px; }
  .kicker { font-size: 12px; margin-bottom: 8px; }
  .big-title { font-size: clamp(30px, 9vw, 36px); margin-bottom: 18px; }
  .spacer-xl { height: 72px; }
  .card { padding: 20px; border-radius: 16px; }
  .card p { font-size: 16px; }

  .features { gap: 10px; }
  .features li { padding: 18px 20px; border-radius: 16px; }
  .features h3 { font-size: 17px; margin-bottom: 4px; }
  .features p { font-size: 15px; }
  .fine { font-size: 14px; }

  .draw .pin { padding: 0 16px; }
  .draw h2 { font-size: 30px; }
  .draw .caption { font-size: 17px; margin-bottom: 20px; }

  details { padding: 14px 16px; border-radius: 12px; }
  summary { font-size: 16px; }

  .page { padding-top: 16px; }
  .page h1 { font-size: 32px; }
  .page h2 { font-size: 23px; margin-top: 36px; }
  .page h3 { font-size: 17px; margin-top: 22px; }
  .page p, .page li { font-size: 16px; }
  .callout { padding: 16px 18px; border-radius: 14px; }

  .site-footer { padding: 40px 0 32px; }
  .site-footer .wrap { flex-direction: column; gap: 10px; }
  .site-footer nav { flex-wrap: wrap; gap: 8px 18px; }
}

/* Questions: a quiet chevron on the right instead of the browser's triangle. */
summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 200ms ease, margin 200ms ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }

.page .product-list { padding-left: 0; }
.product-list a::after {
  content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-3); border-top: 2px solid var(--ink-3); transform: rotate(45deg);
}

/* Phones: breathing room between the pinned map and the section after it. */
@media (max-width: 600px) { .draw + section.wrap { padding-top: 72px; } }
