/* Atelier's site: the game's own paper, rose, sage and navy, with its fonts (Lora titles, Nunito text).
   Decoration is stitched (dashed seams), pinked (zigzag edges) and pinned, like the game's sketchbook. */
@font-face { font-family: "Lora"; src: url("/fonts/Lora-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-Bold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --paper: #fbf6ec;
  --cream: #f4ebdf;
  --card: #fffdf8;
  --rose: #cc6b74;
  --rose-dark: #a9525b;
  --blush: #f6dcdc;
  --sage: #9dbf9e;
  --sage-dark: #5f8a66;
  --gold: #e2a93c;
  --ink: #2b3350;
  --muted: #6c625c;
  --line: #e6d9c8;
  --radius: 22px;
  --shadow: 0 22px 50px -24px rgb(43 51 80 / 0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 1.0625rem/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-dark); text-underline-offset: 3px; }
a:hover { color: var(--rose); }
h1, h2, h3 { font-family: "Lora", Georgia, serif; font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.kicker { display: inline-block; color: var(--rose-dark); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.82rem; margin-bottom: 0.7rem; }
.center { text-align: center; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40rem; }
.center .lede { margin-inline: auto; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgb(251 246 236 / 0.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; }
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; font-family: "Lora", Georgia, serif; font-size: 1.3rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 6px rgb(43 51 80 / 0.2); }
.nav { display: flex; align-items: center; gap: 1.3rem; font-weight: 800; }
.nav a { color: var(--ink); text-decoration: none; }
.nav .btn--store, .nav .btn--store:hover { color: #fff; }
.nav a:hover, .nav a[aria-current] { color: var(--rose-dark); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.65rem; padding: 0.95rem 1.6rem; border-radius: 999px; font-weight: 800; font-size: 1.05rem; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-2px); }
.btn--store { background: var(--ink); color: #fff; box-shadow: 0 5px 0 #171c30, 0 14px 30px -12px rgb(43 51 80 / 0.6); }
.btn--store:hover { color: #fff; box-shadow: 0 7px 0 #171c30, 0 18px 34px -12px rgb(43 51 80 / 0.6); }
.btn--store svg { width: 22px; height: 22px; flex: none; }
.btn--store small { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.8; line-height: 1.1; }
.btn--store b { display: block; line-height: 1.1; }
.btn--soft { background: var(--card); color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset; }
.btn--soft:hover { color: var(--rose-dark); }
.btn--small { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------- Hero: the shop front ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(251 246 236 / 0.97) 0%, rgb(251 246 236 / 0.9) 34%, rgb(251 246 236 / 0.25) 62%, rgb(251 246 236 / 0) 80%),
              linear-gradient(0deg, var(--paper) 0%, rgb(251 246 236 / 0) 22%); }
.hero .wrap { padding: 3rem 0 5rem; }
.hero__copy { max-width: 34rem; }
.hero__logo { width: min(400px, 82vw); margin: 0 0 0.4rem -0.6rem; filter: drop-shadow(0 4px 12px rgb(251 246 236 / 0.9)); }
.hero h1 { margin-bottom: 0.4em; }
.hero h1 em { font-style: normal; color: var(--rose); }
.hero .lede { color: #5a514c; margin-bottom: 1.8rem; }
.perks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 1.4rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.perks li { display: flex; align-items: center; gap: 0.4rem; }
.perks li::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--sage); }

/* Falling petals, as on the game's title screen. */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petals i { position: absolute; top: -5%; width: 14px; height: 10px; border-radius: 70% 0 70% 0; background: #f2b5bd; opacity: 0.85; animation: fall linear infinite; }
.petals i:nth-child(1) { left: 58%; animation-duration: 13s; }
.petals i:nth-child(2) { left: 70%; animation-duration: 17s; animation-delay: -6s; width: 11px; }
.petals i:nth-child(3) { left: 82%; animation-duration: 15s; animation-delay: -2s; background: #fbe2e5; }
.petals i:nth-child(4) { left: 46%; animation-duration: 19s; animation-delay: -11s; }
.petals i:nth-child(5) { left: 91%; animation-duration: 14s; animation-delay: -8s; width: 10px; background: #fbe2e5; }
.petals i:nth-child(6) { left: 64%; animation-duration: 21s; animation-delay: -15s; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(-60px, 50vh) rotate(200deg); }
  100% { transform: translate(-20px, 105vh) rotate(400deg); }
}

/* ---------- Device frame ---------- */
.device { position: relative; border-radius: 30px; padding: 12px; background: #1d2133; box-shadow: var(--shadow), inset 0 0 0 2px #3a4060; }
.device img { border-radius: 20px; width: 100%; }
.device--tilt { transform: rotate(-1.5deg); }

/* ---------- Bands ---------- */
.band { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.band--cream { background: var(--cream); }
.band--cream::before, .band--cream::after { content: ""; position: absolute; left: 0; right: 0; height: 14px; background: radial-gradient(circle at 7px 0, var(--paper) 7px, transparent 7.5px) 0 0 / 14px 14px repeat-x; }
.band--cream::before { top: 0; }
.band--cream::after { bottom: 0; transform: rotate(180deg); }
.seam { border: 0; border-top: 2px dashed var(--line); margin: 0; }

/* ---------- The cast ---------- */
.cast { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 1.5rem 1.25rem 1.5rem; margin: 2rem calc(50% - 50vw) 0; padding-inline: max(1.25rem, calc(50vw - 570px)); scroll-padding-inline: max(1.25rem, calc(50vw - 570px)); scrollbar-width: none; }
.cast::-webkit-scrollbar { display: none; }
.person { flex: 0 0 236px; scroll-snap-align: start; background: var(--card); border-radius: var(--radius); padding: 1rem 1.1rem 1.25rem; box-shadow: 0 10px 26px -18px rgb(43 51 80 / 0.5); position: relative; transition: transform 0.2s; }
.person:hover { transform: translateY(-4px) rotate(-0.5deg); }
.person::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0c86a, #b9861f); box-shadow: 0 2px 3px rgb(0 0 0 / 0.25); }
.person img { width: 100%; aspect-ratio: 1; object-fit: contain; object-position: bottom; background: linear-gradient(180deg, var(--blush), #fff3ee); border-radius: 16px; margin-bottom: 0.8rem; }
.person h3 { margin: 0; font-size: 1.15rem; }
.person .occasion { color: var(--rose-dark); font-weight: 800; font-size: 0.88rem; margin: 0.1rem 0 0.5rem; }
.person q { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.5; quotes: "\201C" "\201D"; }
.hint { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 0.5rem; }

/* ---------- Feature rows ---------- */
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature + .feature { margin-top: clamp(4rem, 9vw, 7rem); }
.feature--flip .feature__media { order: 2; }
.feature__media { position: relative; }
.feature__copy p { color: var(--muted); font-size: 1.08rem; }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.55rem; }
.ticks li { display: flex; gap: 0.7rem; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; border-radius: 50%; background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat; }
.inset { position: absolute; width: 42%; right: -4%; bottom: -10%; border-radius: 16px; border: 6px solid var(--card); box-shadow: var(--shadow); transform: rotate(3deg); }
.feature--flip .inset { right: auto; left: -4%; transform: rotate(-3deg); }

/* Fabric swatches with pinking-shear edges. */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.7rem; margin-top: 1.6rem; }
.swatch { position: relative; aspect-ratio: 1; }
.swatch img { width: 100%; height: 100%; object-fit: cover;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  filter: drop-shadow(0 4px 6px rgb(43 51 80 / 0.25)); transition: transform 0.2s; }
.swatch:nth-child(odd) img { transform: rotate(-3deg); }
.swatch:nth-child(even) img { transform: rotate(2deg); }
.swatch:hover img { transform: rotate(0) scale(1.06); }
.swatch span { position: absolute; left: 50%; bottom: -0.35rem; transform: translateX(-50%); white-space: nowrap; font-size: 0.72rem; font-weight: 800; background: var(--card); padding: 0.1rem 0.5rem; border-radius: 6px; box-shadow: 0 2px 5px rgb(43 51 80 / 0.18); opacity: 0; transition: opacity 0.2s; }
.swatch:hover span, .swatch:focus-within span { opacity: 1; }

/* ---------- Studio upgrades ---------- */
.upgrades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.upgrade { background: var(--card); border-radius: var(--radius); padding: 1.1rem 1rem 1.3rem; text-align: center; box-shadow: 0 10px 26px -20px rgb(43 51 80 / 0.5); border: 2px dashed var(--line); }
.upgrade img { width: 70%; margin: 0 auto 0.7rem; aspect-ratio: 1; object-fit: contain; }
.upgrade h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.upgrade p { color: var(--muted); font-size: 0.9rem; margin: 0; line-height: 1.45; }

/* ---------- Good to know ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.2rem; padding: 0; list-style: none; }
.facts li { background: var(--card); border-radius: 18px; padding: 1.3rem 1.2rem; box-shadow: 0 10px 26px -20px rgb(43 51 80 / 0.5); }
.facts b { display: block; font-family: "Lora", Georgia, serif; font-size: 1.1rem; margin-bottom: 0.2rem; }
.facts span { color: var(--muted); font-size: 0.95rem; }
.facts .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 0.8rem; background: var(--blush); color: var(--rose-dark); }
.facts .icon svg { width: 24px; height: 24px; }

/* ---------- Closing call to action ---------- */
.finale { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(5rem, 11vw, 8rem) 0; color: #fff; }
.finale__bg { position: absolute; inset: 0; z-index: -2; }
.finale__bg img { width: 100%; height: 100%; object-fit: cover; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(43 51 80 / 0.25), rgb(43 51 80 / 0.72)); }
.finale h2 { color: #fff; text-shadow: 0 2px 16px rgb(0 0 0 / 0.3); }
.finale p { font-size: 1.2rem; max-width: 34rem; margin: 0 auto 2rem; text-shadow: 0 1px 10px rgb(0 0 0 / 0.35); }
.finale .btn--store { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #d8cdbf, 0 14px 30px -12px rgb(0 0 0 / 0.5); }
.finale .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.foot { padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.foot nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* ---------- Text pages (privacy, terms, support) ---------- */
.page { padding: 2.5rem 0 1rem; }
.page .wrap { max-width: 46rem; }
.page .eyebrow { color: var(--rose-dark); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin: 0 0 0.3rem; }
.page .updated { color: var(--muted); }
.page h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.page ul { padding-left: 1.2rem; }
.summary { background: var(--card); border-left: 5px solid var(--rose); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 2.5rem; }
.page + .foot { margin-top: 3rem; border-top: 2px dashed var(--line); }

/* Fade sections in as they scroll into view (see the script at the end of the page). */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
  .upgrades { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .hero::before { background: linear-gradient(180deg, rgb(251 246 236 / 0.55) 0%, rgb(251 246 236 / 0.93) 38%, var(--paper) 100%); }
  .hero { align-items: flex-end; min-height: 0; }
  .hero .wrap { padding-top: 38vw; }
  .hero__bg img { object-position: 80% 30%; }
}
@media (max-width: 600px) {
  .nav .hide-sm { display: none; }
  .upgrades { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
  .inset { display: none; }
  .device { padding: 7px; border-radius: 20px; }
  .device img { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
