/* ---------- Design system tokens ----------
 * Values mirror lib/colors.ts (COLORS). Keep in sync.
 *   --bg        ↔ surface.base
 *   --surface   ↔ surface.raised
 *   --bg-soft   ↔ surface.elevated (rgba w/ 0.9 alpha)
 *   --ink       ↔ text.primary
 *   --ink-3     ↔ text.secondary
 *   --clay-deep ↔ brand.accent
 */
:root {
  --bg:        #FCFAF7;
  --surface:   #F7F5F1;
  --bg-soft:   rgba(243,236,228,0.9);
  --ink:       #1F0F03;
  --ink-3:     #7A6E62;
  --clay-deep: #5C320D;
  --display:   "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body:      "Nunito", ui-sans-serif, system-ui, sans-serif;
  --mono:      "JetBrains Mono", ui-monospace, monospace;
  --maxw:      1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
}
::selection { background: var(--clay-deep); color: var(--bg); }

/* Subtle paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.29 0 0 0 0 0.18 0 0 0 0 0.11 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: .06;
  mix-blend-mode: multiply;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ---------- Nav (floating pill) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 20px 0;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  max-width: 880px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 8px 10px 8px 18px;
  border-radius: 999px;
  background: rgba(252,250,247,.32);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.5) inset,
    0 10px 30px -12px rgba(31,15,3,.18),
    0 2px 8px -2px rgba(31,15,3,.08);
  transition: background .3s ease, box-shadow .3s ease;
}
.nav.scrolled .nav-inner {
  background: rgba(252,250,247,.55);
  box-shadow:
    0 1px 0 rgba(255,255,255,.5) inset,
    0 14px 36px -12px rgba(31,15,3,.22),
    0 2px 8px -2px rgba(31,15,3,.1);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-word {
  font-family: var(--display); font-weight: 700; font-size: 26px;
  letter-spacing: -0.02em; color: var(--clay-deep);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--clay-deep); text-decoration: none; font-size: 14.5px; font-weight: 800;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 9px 16px; border-radius: 999px;
  background: var(--clay-deep); color: var(--bg) !important;
  font-weight: 800;
  transition: transform .2s ease;
}
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 640px) {
  .nav { padding: 10px 12px 0; }
  .nav-inner { padding: 6px 8px 6px 14px; gap: 10px; }
  .nav-links { gap: 10px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 8px 14px; font-size: 13.5px; }
  .brand-word { font-size: 22px; }
  .brand-mark { width: 28px; height: 28px; }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 28px; text-align: center; position: relative; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 auto;
  max-width: 14ch;
  color: var(--clay-deep);
  text-wrap: balance;
}
.hero-sub {
  margin: 28px auto 0; max-width: 52ch;
  color: var(--ink); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6;
  text-wrap: pretty;
}
.hero-cta-row {
  display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-family: var(--body); font-weight: 800; font-size: 14.5px;
  text-decoration: none; border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn-primary { background: var(--clay-deep); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg);
  color: var(--clay-deep);
  border: 1px solid rgba(92,50,13,.26);
}
.btn-ghost:hover { background: var(--bg-soft); transform: translateY(-1px); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Phone scroller ---------- */
.phones-section { padding: 56px 0 24px; position: relative; }
.phones-section::before,
.phones-section::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.phones-section::before {
  left: 0;
  background: linear-gradient(to right, #FCFAF7 0%, rgba(252,250,247,0) 100%);
}
.phones-section::after {
  right: 0;
  background: linear-gradient(to left, #FCFAF7 0%, rgba(252,250,247,0) 100%);
}
@media (max-width: 760px) {
  .phones-section::before,
  .phones-section::after { display: none; }
}
.scroller {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  padding: 44px max(28px, calc((100vw - var(--maxw)) / 2 + 28px)) 140px;
}
.scroller.dragging { cursor: grabbing; }
.scroller::-webkit-scrollbar { display: none; }
.scroller-track { display: flex; gap: 28px; align-items: flex-start; }
.phone {
  flex: 0 0 auto;
  width: 260px;
  aspect-ratio: 1242 / 2688;
  border-radius: 44px;
  background: #0b0b0b;
  padding: 6px;
  box-shadow:
    0 0 0 1.5px #2a2a2a inset,
    0 1px 0 rgba(255,255,255,.06) inset,
    0 30px 60px -22px rgba(74,46,28,.32),
    0 14px 28px -12px rgba(74,46,28,.22);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  position: relative;
}
.phone:nth-child(2n) { transform: translateY(18px); }
.phone:hover { transform: translateY(-6px); }
.phone:nth-child(2n):hover { transform: translateY(10px); }
.phone .phone-screen {
  width: 100%; height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  display: block;
}
.phone .phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone::after {
  content: "";
  position: absolute; left: -2px; top: 92px;
  width: 2px; height: 26px; border-radius: 2px;
  background: #1f1f1f;
}

/* ---------- Story ---------- */
.story { padding: 80px 0 40px; }
.story-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.story p {
  font-size: clamp(15.5px, 1.5vw, 17px);
  line-height: 1.75;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.story p strong { font-weight: 800; color: var(--clay-deep); }
.story p.lede { font-size: clamp(16.5px, 1.7vw, 19px); }

/* ---------- Collage ---------- */
.collage {
  padding: 80px 0 100px;
  position: relative;
  min-height: 1140px;
}
.collage-stage {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  height: 1140px;
  touch-action: none;
}
.collage-card {
  position: absolute;
  background: var(--surface);
  padding: 14px 14px 38px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 30px 60px -20px rgba(74,46,28,.35),
    0 10px 24px -8px rgba(74,46,28,.18);
  border-radius: 6px;
  transition: box-shadow .25s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
}
.collage-card.dragging {
  cursor: grabbing;
  transition: box-shadow .15s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 40px 70px -18px rgba(74,46,28,.45),
    0 14px 28px -8px rgba(74,46,28,.25);
  z-index: 50;
}
.collage-card img { pointer-events: none; }
.collage-card .caption {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: .06em;
}
.card-food    { left: 0%;  top: 0;     width: 420px; }
.card-food    .card-img { aspect-ratio: 1206 / 1368; }
.card-ceramics { right: 0%; top: 30px;  width: 460px; }
.card-ceramics .card-img { aspect-ratio: 4032 / 3024; }
.card-note    { left: 18%; top: 560px; width: 360px; }
.card-note    .card-img { aspect-ratio: 3024 / 4032; }
.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  background: var(--bg-soft);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 820px) {
  .collage { min-height: 0; }
  .collage-stage {
    height: auto; display: flex; flex-direction: column;
    align-items: center; gap: 40px; touch-action: auto;
  }
  .collage-card {
    position: relative; inset: auto; transform: none !important;
    cursor: default; touch-action: auto; width: 88% !important;
  }
  .card-food, .card-ceramics, .card-note { max-width: 460px; }
}

/* ---------- FAQ ---------- */
.faq { padding: 60px 0 80px; }
.faq-head { text-align: center; margin-bottom: 40px; }
.faq-head h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(32px, 4.5vw, 48px); margin: 0;
  letter-spacing: -0.025em; color: var(--clay-deep);
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 18px;
}
.faq-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 26px 26px 24px;
  transition: transform .3s ease, background-color .3s ease;
  position: relative;
}
.faq-card:hover {
  transform: translateY(-4px);
  background: var(--bg-soft);
}
.faq-card .num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: block;
}
.faq-card h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 19px; line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.faq-card p {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.65;
  text-wrap: pretty;
}
.faq-card p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; }
}

/* ---------- Closing ---------- */
.closing { padding: 110px 0 80px; text-align: center; position: relative; }
.closing h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.08; letter-spacing: -0.03em;
  color: var(--clay-deep);
  margin: 0 auto;
}
.closing h2 .line { display: block; }
.closing .stores {
  display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap;
}
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 9px;
  background: #000; color: #fff;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1;
  transition: transform .2s ease, background .2s ease;
  min-height: 50px;
  box-sizing: border-box;
}
.store-btn:hover { transform: translateY(-2px); background: #1a1a1a; }
.store-btn .apple-glyph { flex: 0 0 auto; display: block; }
.store-btn .lbl { display: flex; flex-direction: column; gap: 2px; text-align: left; white-space: nowrap; }
.store-btn .lbl .small { font-size: 11px; font-weight: 400; letter-spacing: .01em; opacity: .95; }
.store-btn .lbl .big   { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }

/* ---------- Footer ---------- */
footer {
  padding: 32px 0 36px;
  color: var(--ink-3);
  font-size: 13px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--ink-3); text-decoration: none; font-weight: 800; }
.footer-links a:hover { color: var(--clay-deep); }

/* ---------- Reveal anim ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s 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; }
.reveal[data-d="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Policy pages (terms / privacy) ---------- */
.policy { max-width: 720px; margin: 0 auto; padding: 64px 28px 100px; line-height: 1.65; }
@media (max-width: 640px) { .policy { padding: 48px 22px 80px; } }

.policy .eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.policy h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.05; letter-spacing: -0.03em;
  color: var(--clay-deep);
  margin: 0 0 14px;
}
.policy .updated {
  color: var(--ink-3); font-size: 13px; margin: 0 0 40px;
  font-family: var(--mono); letter-spacing: .04em;
}
.policy h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 26px); line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--clay-deep);
  margin: 48px 0 14px;
  text-wrap: balance;
}
.policy h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 17.5px; line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink);
  margin: 28px 0 8px;
}
.policy p {
  margin: 0 0 16px;
  color: var(--ink); font-size: 16px; line-height: 1.7;
  text-wrap: pretty;
}
.policy ul { margin: 0 0 16px; padding: 0; list-style: none; }
.policy ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink); font-size: 16px; line-height: 1.7;
}
.policy ul li:last-child { margin-bottom: 0; }
.policy ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--clay-deep);
}
.policy a {
  color: var(--clay-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.policy a:hover { color: var(--ink); }
.policy code {
  font-family: var(--mono); font-size: 14px;
  background: var(--bg-soft); padding: 2px 6px; border-radius: 4px;
  color: var(--ink);
}
.policy strong { font-weight: 800; color: var(--ink); }

/* Policy page footer aligns with .wrap container */
.policy ~ footer .footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
}
