/* Direction C — Open System
   Bright and playful. Papaya carries the brand; the configurator is the main event. */

:root {
  --papaya: oklch(0.72 0.19 50);
  --papaya-hi: oklch(0.77 0.17 55);
  --papaya-deep: oklch(0.52 0.16 40);
  --ink: oklch(0.2 0.02 45);
  --ink-2: oklch(0.43 0.025 45);
  --ink-on-papaya: oklch(0.26 0.05 45);
  --white: oklch(0.992 0 0);
  --grey: oklch(0.955 0 0);
  --grey-2: oklch(0.9 0 0);
  --line: oklch(0.2 0.02 45 / 0.12);
  --blue: #3d7bff;
  --glow: #ff7f1f;

  --display: 'Funnel Display', ui-sans-serif, system-ui, sans-serif;
  --font: 'Funnel Sans', ui-sans-serif, system-ui, sans-serif;
  --t-display: clamp(2.9rem, 0.9rem + 6.6vw, 6rem);
  --t-h2: clamp(2.2rem, 1.1rem + 3.6vw, 4.25rem);
  --t-h3: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);
  --t-body: 1.0625rem;
  --t-small: 0.9rem;
  --t-micro: 0.8125rem;

  --gutter: clamp(16px, 3vw, 40px);
  --maxw: 1440px;
  --section: clamp(88px, 12vh, 160px);
  --r: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-canvas: 1;
  --z-overlay: 2;
  --z-bar: 18;
  --z-nav: 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: var(--t-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--papaya); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-size: var(--t-h2); font-weight: 780; line-height: 0.96; letter-spacing: -0.03em; }
h3 { font-size: var(--t-h3); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--white); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 26px; border-radius: 999px; border: 0;
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); transition-duration: 0.08s; }
.btn--ink { background: var(--ink); color: var(--white); box-shadow: 0 3px 0 oklch(0 0 0 / 0.25); }
.btn--papaya { background: var(--papaya); color: var(--ink); box-shadow: 0 3px 0 var(--papaya-deep); }
.btn--papaya:hover { background: var(--papaya-hi); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--small { height: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 14px var(--gutter) auto; z-index: var(--z-nav); display: flex; justify-content: center; pointer-events: none; }
.nav__pill { pointer-events: auto; width: min(100%, 1100px); display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 60px; padding: 0 10px 0 22px; border-radius: 999px; background: var(--white); box-shadow: 0 2px 8px oklch(0.2 0.02 45 / 0.12); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.mark { width: 30px; height: auto; fill: currentColor; }
.mark rect:nth-child(2) { fill: var(--papaya); }
.nav__links { display: flex; gap: clamp(14px, 2.4vw, 34px); font-weight: 560; font-size: var(--t-small); }
.nav__links a { text-decoration: none; padding: 6px 2px; border-radius: 6px; transition: color 0.2s; }
.nav__links a:hover { color: var(--papaya-deep); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; background: var(--papaya); overflow: hidden; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr auto; column-gap: 24px; padding: calc(14px + 60px + clamp(28px, 6vh, 64px)) var(--gutter) clamp(24px, 5vh, 48px); }
.hero__title { position: relative; z-index: var(--z-overlay); grid-column: 1 / span 9; font-size: var(--t-display); font-weight: 800; line-height: 0.92; letter-spacing: -0.035em; pointer-events: none; }
.hero__title .l2 { display: block; color: var(--white); }
.hero__canvas { position: absolute; inset: 0; z-index: var(--z-canvas); }
.hero__canvas canvas { cursor: grab; }
.hero__foot { position: relative; z-index: var(--z-overlay); grid-column: 1 / span 4; grid-row: 3; display: grid; gap: 20px; }
.hero__foot p { color: var(--ink-on-papaya); font-size: 1.0625rem; max-width: 36ch; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__chips { position: relative; z-index: var(--z-overlay); grid-column: 8 / -1; grid-row: 3; align-self: end; justify-self: end; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin: 0; padding: 0; list-style: none; }
.hero__chips li { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: oklch(0.2 0.02 45 / 0.1); font-weight: 600; font-size: var(--t-micro); }

.js [data-pop] .word { display: inline-block; transform: translateY(0.6em) rotate(3deg); opacity: 0; transition: transform 0.9s var(--ease), opacity 0.6s var(--ease); transition-delay: calc(var(--i) * 55ms + 150ms); }
.js [data-pop].is-in .word { transform: none; opacity: 1; }

/* ---------- build ---------- */
.build { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--section) var(--gutter); max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; align-items: start; }
.build__stage { grid-column: 1 / span 8; position: sticky; top: 92px; height: calc(100vh - 116px); min-height: 460px; border-radius: var(--r); background: radial-gradient(ellipse 70% 60% at 50% 55%, var(--white), var(--grey) 70%); overflow: hidden; }
.build__canvas { position: absolute; inset: 0; }
.build__canvas canvas { cursor: grab; }
.build__hint { position: absolute; right: 20px; top: 18px; font-size: var(--t-micro); font-weight: 600; color: var(--ink-2); }
.build__name { position: absolute; left: 20px; top: 12px; font-family: var(--display); font-weight: 780; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); letter-spacing: -0.02em; }
.build__panel { grid-column: 9 / span 4; display: grid; gap: 30px; padding-top: 4px; }
.build__panel h2 { font-size: clamp(2rem, 1.2rem + 2vw, 3rem); }
.opt { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.opt legend, .opt__legend { font-weight: 700; font-size: var(--t-small); padding: 0; margin-bottom: 12px; display: flex; gap: 8px; }
.opt__legend { margin-bottom: 0; }
.opt legend span { font-weight: 500; color: var(--ink-2); }
.opt__row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input, .swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--grey); font-weight: 600; font-size: var(--t-small); transition: background-color 0.2s, color 0.2s, transform 0.25s var(--ease); }
.chip em { font-style: normal; font-weight: 500; color: var(--ink-2); font-size: var(--t-micro); }
.chip:hover span { background: var(--grey-2); }
.chip input:checked + span { background: var(--ink); color: var(--white); }
.chip input:checked + span em { color: oklch(0.8 0.02 45); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.chip input:active + span { transform: scale(0.96); }
.swatch { position: relative; width: 44px; height: 44px; }
.swatch span { position: absolute; inset: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.12); transition: transform 0.3s var(--ease); }
.swatch span::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.3s var(--ease); }
.swatch input:checked + span::after { opacity: 1; transform: none; }
.swatch input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 7px; }
.swatch:hover span { transform: scale(1.06); }
.swatch--caps span { background: linear-gradient(135deg, var(--c) 58%, var(--a) 58%); }
.swatch--glow span { box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.12), 0 4px 14px -2px var(--c); }
.opt--text input { height: 50px; border-radius: 12px; border: 2px solid var(--grey-2); padding: 0 16px; font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.08em; text-transform: uppercase; outline: none; background: var(--white); transition: border-color 0.2s; }
.opt--text input:focus { border-color: var(--ink); }
.opt--text small { color: var(--ink-2); font-size: var(--t-micro); }
.total { display: grid; gap: 14px; padding: 22px; border-radius: var(--r); background: var(--grey); }
.total dl { margin: 0; display: grid; gap: 8px; font-size: var(--t-small); }
.total dl div { display: flex; justify-content: space-between; gap: 12px; }
.total dt { color: var(--ink-2); }
.total dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.total dd.save { color: var(--papaya-deep); }
.total__sum { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; font-weight: 700; }
.total__sum b { font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- how ---------- */
.how { background: var(--grey); padding: var(--section) var(--gutter); }
.how__title { max-width: var(--maxw); margin: 0 auto clamp(36px, 6vh, 64px); }
.how__steps { max-width: var(--maxw); margin: 0 auto; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.how__steps li { counter-increment: step; display: grid; gap: 12px; align-content: start; }
.how__steps figure { position: relative; margin: 0 0 8px; aspect-ratio: 5 / 4; border-radius: var(--r); background: var(--white); overflow: hidden; }
.how__steps figure::before { content: counter(step); position: absolute; left: 16px; top: 12px; z-index: 1; font-family: var(--display); font-weight: 800; font-size: 3.25rem; line-height: 1; color: var(--papaya); }
.how__steps img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(0.98); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.how__steps img.is-in { opacity: 1; transform: none; }
.how__steps p { color: var(--ink-2); max-width: 38ch; }

/* ---------- strip ---------- */
.strip { background: var(--ink); color: var(--white); overflow: hidden; padding: 26px 0; }
.strip__track { display: flex; width: max-content; gap: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.25rem); letter-spacing: -0.02em; white-space: nowrap; }
.strip__track span { display: inline-flex; align-items: center; }
.strip__track span::after { content: ''; width: 12px; height: 12px; margin: 0 28px; border-radius: 3px; background: var(--papaya); }
.strip__track.is-running { animation: marquee 48s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- modules / bento ---------- */
.modules { padding: var(--section) var(--gutter); }
.modules__head { max-width: var(--maxw); margin: 0 auto clamp(36px, 6vh, 64px); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 16px; align-items: end; }
.modules__head h2 { grid-column: 1 / span 7; }
.modules__head p { grid-column: 9 / span 4; color: var(--ink-2); }
.bento { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(420px, auto); gap: 16px; }
.tile { position: relative; border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.tile--wide { grid-column: span 2; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: 1fr; align-items: center; }
.tile__text { position: relative; z-index: 1; display: grid; gap: 10px; align-content: start; padding: 28px; }
.tile__text p { font-size: var(--t-small); max-width: 34ch; }
.tile__price { font-family: var(--display); font-weight: 780; font-size: 1.5rem !important; letter-spacing: -0.02em; margin-top: 6px; }
.tile img:not(.tile__photo) { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: 50% 70%; align-self: stretch; opacity: 0; transform: translateY(12px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.tile img.is-in { opacity: 1; transform: none; }
.tile--ink { background: var(--ink); color: var(--white); }
.tile--ink .tile__text p:not(.tile__price) { color: oklch(0.82 0.02 45); }
.tile--white { background: var(--grey); }
.tile--white .tile__text p:not(.tile__price) { color: var(--ink-2); }
.tile--deep { background: var(--papaya-deep); color: var(--white); }
.tile--deep .tile__text p:not(.tile__price) { color: oklch(0.93 0.03 55); }
.tag { display: inline-flex; vertical-align: middle; align-items: center; height: 24px; padding: 0 10px; margin-left: 6px; border-radius: 999px; background: oklch(1 0 0 / 0.18); font-family: var(--font); font-size: var(--t-micro); font-weight: 600; letter-spacing: 0; }
.tile--photo { color: var(--white); grid-template-columns: 1fr; align-items: end; }
.tile__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.tile--photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.15 0.02 45 / 0.85), transparent 60%); }
.tile--photo .tile__text { align-self: end; }
.tile--photo .tile__text p { color: oklch(0.9 0.01 45); }

/* ---------- reserve ---------- */
.reserve { background: var(--papaya); padding: clamp(96px, 16vh, 200px) var(--gutter); }
.reserve__inner { max-width: 1100px; margin: 0 auto; display: grid; gap: 24px; justify-items: center; text-align: center; }
.reserve__inner h2 { font-size: var(--t-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.92; max-width: 14ch; }
.reserve__inner > p { color: var(--ink-on-papaya); max-width: 50ch; font-size: 1.125rem; }
.reserve__img { margin: 0; width: 100%; aspect-ratio: 16 / 7; }
.reserve__img img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reserve__img img.is-in { opacity: 1; transform: none; }
.reserve__form { width: min(100%, 600px); display: grid; gap: 10px; margin-top: 10px; }
.reserve__build { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 20px; border-radius: 14px; background: oklch(1 0 0 / 0.35); font-size: var(--t-small); text-align: left; }
.reserve__build span { color: var(--ink-on-papaya); font-weight: 600; }
.reserve__build b:first-of-type { flex: 1; font-weight: 700; }
.reserve__build b:last-of-type { font-family: var(--display); font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.reserve__row { display: flex; gap: 8px; flex-wrap: wrap; }
.reserve__row input { flex: 1 1 240px; height: 54px; border-radius: 999px; border: 2px solid transparent; background: var(--white); padding: 0 22px; outline: none; transition: border-color 0.2s; }
.reserve__row input::placeholder { color: var(--ink-2); }
.reserve__row input:focus { border-color: var(--ink); }
.reserve__row input[aria-invalid='true'] { border-color: oklch(0.45 0.2 25); }
.reserve__msg { min-height: 1.5em; font-weight: 600; font-size: var(--t-small); }
.reserve__count { font-size: var(--t-small); color: var(--ink-on-papaya); }
.reserve__count b { color: var(--ink); }

/* ---------- faq ---------- */
.faq { padding: var(--section) var(--gutter); max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; }
.faq h2 { grid-column: 1 / span 5; }
.faq__list { grid-column: 6 / span 7; display: grid; gap: 8px; }
.faq details { border-radius: 14px; background: var(--grey); padding: 0 22px; transition: background-color 0.2s; }
.faq details[open] { background: var(--grey-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-family: var(--display); font-weight: 700; font-size: 1.1875rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: -3px; border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 600; transition: transform 0.4s var(--ease), background-color 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--papaya); color: var(--ink); }
.faq details p { color: var(--ink-2); padding: 0 0 22px; max-width: 60ch; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--white); padding: clamp(56px, 10vh, 112px) var(--gutter) 28px; }
.foot__top { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-bottom: clamp(40px, 8vh, 96px); }
.brand--big { font-size: clamp(3.5rem, 1rem + 10vw, 10rem); letter-spacing: -0.05em; line-height: 0.85; gap: 0.18em; }
.brand--big .mark { width: 0.9em; }
.foot__top nav { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 600; }
.foot__top nav a { text-decoration: none; }
.foot__top nav a:hover { color: var(--papaya); }
.foot__legal { max-width: var(--maxw); margin: 0 auto; font-size: var(--t-micro); color: oklch(0.75 0.02 45); border-top: 1px solid oklch(1 0 0 / 0.14); padding-top: 18px; }

/* ---------- build bar ---------- */
.buildbar { position: fixed; z-index: var(--z-bar); left: 50%; bottom: 16px; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 8px 0 20px; border-radius: 999px; background: var(--ink); color: var(--white); box-shadow: 0 4px 8px oklch(0 0 0 / 0.18); transform: translate(-50%, 140%); transition: transform 0.6s var(--ease); max-width: calc(100vw - 24px); }
.buildbar.is-on { transform: translate(-50%, 0); }
.buildbar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--glow); flex: none; }
.buildbar__name { font-weight: 600; font-size: var(--t-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.buildbar__total { font-family: var(--display); font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .hero__title { grid-column: 1 / -1; }
  .hero__foot { grid-column: 1 / span 7; }
  .hero__chips { grid-column: 1 / -1; grid-row: 4; justify-self: start; justify-content: flex-start; margin-top: 18px; }
  .build__stage { grid-column: 1 / -1; position: relative; top: 0; height: 58vh; }
  .build__panel { grid-column: 1 / -1; margin-top: 32px; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .build__panel h2, .total, .opt--text { grid-column: 1 / -1; }
  .modules__head h2, .modules__head p { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide { grid-column: 1 / -1; }
  .faq h2, .faq__list { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --t-body: 1rem; }
  .nav__pill { height: 54px; }
  .hero { grid-template-rows: auto 1fr auto auto; padding-top: calc(14px + 54px + 28px); }
  .hero__foot { grid-column: 1 / -1; }
  .build__stage { height: 48vh; min-height: 360px; }
  .build__panel { grid-template-columns: 1fr; }
  .how__steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile--wide { grid-template-columns: 1fr; }
  .tile img:not(.tile__photo) { aspect-ratio: 3 / 2; }
  .tile--photo { min-height: 460px; }
  .buildbar__name { display: none; }
  .buildbar { left: 0; right: 0; bottom: 0; transform: translateY(110%); border-radius: 18px 18px 0 0; height: auto; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)) 20px; max-width: none; justify-content: space-between; }
  .buildbar.is-on { transform: none; }
  .buildbar__total { margin-left: 8px; margin-right: auto; }
  .build__hint { top: auto; bottom: 14px; right: 16px; }
  .build__name { font-size: 1.125rem; }
  .foot { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0ms !important; animation: none !important; }
  .strip__track { flex-wrap: wrap; width: auto; padding: 0 var(--gutter); row-gap: 8px; }
}
