/* newyearapp.co landing. Colours follow the app's "Cozy Storybook Yule" palette (specs/design-palette.md),
   on the night-time surfaces the app uses for its tabs. */
:root {
  --bg: #0d1713;
  --bg-2: #13201a;
  --wood: #22160f;
  --card: #1a1310;
  --card-2: #241a15;
  --line: rgba(240, 191, 102, 0.22);
  --line-soft: rgba(255, 237, 232, 0.10);
  --text: #fff1ed;
  --muted: #c9b8ae;
  --gold: #f0bf66;
  --gold-2: #ffdea8;
  --red: #b8383a;
  --red-2: #d4504f;
  --green: #8da99d;
  --radius: 20px;
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
:lang(ja) { --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; }
:lang(ja) h1 { font-size: clamp(28px, 4.6vw, 52px); letter-spacing: 0; }
:lang(ja) h1 > span { white-space: nowrap; }
/* Language names keep their own script's font, also on the Japanese page */
.langs a:not(:lang(ja)), .foot-langs a:not(:lang(ja)) { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
:lang(ja) .eyebrow, :lang(ja) .kicker, :lang(ja) .cd-lab { letter-spacing: .04em; }
:lang(ja) .lead, :lang(ja) .feature-copy p, :lang(ja) .faq-item p { line-break: strict; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: #271900; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--red-2), var(--red)); color: #fff;
  border: 0; border-radius: 999px; padding: 14px 22px;
  box-shadow: 0 6px 20px rgba(184, 56, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-ghost { background: rgba(240, 191, 102, 0.08); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: rgba(240, 191, 102, 0.15); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 23, 19, 0.72); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px var(--serif); margin-right: auto; white-space: nowrap; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 22px; }
.nav a, .lang { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; transition: color .15s; }
.nav a:hover, .lang:hover { color: var(--text); }

/* Language menu */
.langs { position: relative; }
.langs summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 7px 11px;
  font: 700 12px/1 var(--sans); letter-spacing: .06em; color: var(--muted); transition: color .15s, border-color .15s;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { color: var(--text); border-color: var(--line); }
.globe { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; }
.globe::before { content: ""; position: absolute; inset: -1.5px 3px; border-radius: 50%; border: 1.5px solid currentColor; }
.globe::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 6px; list-style: none; min-width: 170px;
  background: #1c1511; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.langs a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.langs a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.langs a[aria-current] { color: var(--gold-2); }
.langs a[aria-current]::after { content: " ✓"; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 75% 10%, rgba(240, 191, 102, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(141, 169, 157, 0.12), transparent 60%),
    linear-gradient(180deg, #0a1410 0%, var(--bg) 70%);
}
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.eyebrow, .kicker {
  display: inline-block;
  font: 700 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; display: inline-block; vertical-align: 1px; margin-right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; box-shadow: 0 0 0 0 rgba(255, 95, 87, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 95, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 87, 0); } }
h1 { font-size: clamp(40px, 6vw, 68px); margin: 16px 0 18px; }
h1 > span { display: block; }
.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #c99c47); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; }

/* Countdown: the app's gold-framed board */
.countdown {
  margin: 28px 0 24px; padding: 18px; max-width: 560px;
  background: linear-gradient(180deg, #2a1c14, #1a110c);
  border: 1.5px solid rgba(240, 191, 102, .55); border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 222, 168, .15);
}
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cd-box {
  display: flex; flex-direction: column; align-items: center; padding: 14px 4px 10px;
  background: linear-gradient(180deg, #120c09, #20160f); border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 222, 168, .08), inset 0 -10px 20px rgba(0, 0, 0, .25);
  position: relative; overflow: hidden;
}
.cd-box::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .45); }
.cd-num { font: 700 clamp(34px, 5vw, 50px)/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--text); }
.cd-num.tick { animation: tick .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tick { 0% { transform: translateY(-35%) rotateX(70deg); opacity: .2; } 100% { transform: none; opacity: 1; } }
.cd-lab { margin-top: 6px; font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.py { font: 700 12px/1 var(--sans); color: var(--muted); padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.py[data-py-to] { color: #271900; background: var(--gold); }
.bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #c99c47, var(--gold-2)); transition: width 1s ease; }
.cd-meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 8px; }
.cd-meta [data-tz]::before { content: " · "; }
.cd-meta [data-tz]:empty::before { content: ""; }
.live-now { margin-top: 10px; font: 700 20px var(--serif); color: var(--gold-2); }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .15s; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 50px; width: auto; }
.free { margin-top: 14px; font-size: 13px; color: var(--muted); }

.hero-art { position: relative; display: flex; justify-content: center; }
.glow { position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(240, 191, 102, .22), transparent 60%); }

/* Phone frame */
.phone {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 600 / 1304;
  border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #3a3532, #141110);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .55), 0 0 0 1.5px rgba(255, 255, 255, .08), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: #120c09; }
.phone-hero { max-width: 320px; transform: rotate(3deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(3deg) translateY(-12px); } }

/* Sections */
section { position: relative; }
.features, .how, .faq { padding: 96px 0; }
.features { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sec-head.left { text-align: left; margin: 0 0 36px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 12px; }
.sec-head p:not(.kicker) { color: var(--muted); font-size: 17px; }

/* Features: sticky phone + list (desktop), inline images (phone) */
.feat-layout { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.feat-phone { position: sticky; top: max(88px, calc(50vh - 330px)); display: flex; justify-content: center; }
.feat-phone .phone { width: min(300px, calc((100vh - 120px) * 0.46)); }
.feat-phone .phone img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); opacity: 0; transform: scale(1.03); transition: opacity .5s ease, transform .6s ease; }
.feat-phone .phone img.on { opacity: 1; transform: none; }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.feature { min-height: 44vh; display: flex; flex-direction: column; justify-content: center; }
.feature-card {
  display: flex; gap: 18px; align-items: flex-start; padding: 26px; border-radius: var(--radius); cursor: pointer;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line-soft);
  transition: background .3s, border-color .3s, transform .3s;
}
.feature-card.active { background: linear-gradient(180deg, rgba(240, 191, 102, .10), rgba(240, 191, 102, .03)); border-color: var(--line); transform: translateX(6px); }
.feature-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 26px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.feature-copy h3 { font-size: 24px; margin-bottom: 8px; }
.feature-copy p { color: var(--muted); }
.phone-inline { display: none; }

.extras { margin-top: 64px; text-align: center; }
.extras h3 { font-size: 22px; margin-bottom: 18px; }
.extras ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.extras li { padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-soft); font-weight: 600; font-size: 14px; }
.extras li::before { content: "✦ "; color: var(--gold); }

/* How it works */
.how { background: radial-gradient(800px 400px at 80% 50%, rgba(184, 56, 58, .12), transparent 70%), var(--bg-2); }
.how-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.step { position: relative; padding: 22px 22px 22px 78px; border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft); }
.step-n { position: absolute; left: 22px; top: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--serif); color: #271900; background: var(--gold); }
.step h3 { font-size: 21px; margin-bottom: 4px; }
.step p { color: var(--muted); }

.wish { text-align: center; padding: 36px 24px; border-radius: 28px; background: linear-gradient(180deg, #2a1c14, #160f0b); border: 1px solid var(--line); }
.wish-title { font: 700 22px var(--serif); margin-bottom: 26px; }
.envelope { position: relative; width: 220px; height: 150px; margin: 0 auto; border: 0; padding: 0; background: none; cursor: pointer; }
.env-back { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, #f6e7d0, #e3caa4); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; background: linear-gradient(180deg, #ead5b4, #d9bd93); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 10px 10px 0 0; transform-origin: top; transition: transform .4s; }
.env-seal { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #ffdad7; font-size: 18px; background: radial-gradient(circle at 35% 30%, #d4504f, #891b21); box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.env-from { position: absolute; left: 0; right: 0; bottom: 14px; font: 600 italic 14px var(--serif); color: #6b4b2a; }
.envelope:hover .env-flap { transform: rotateX(25deg); }
.envelope.shake { animation: shake .5s; }
@keyframes shake { 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
.wish-msg { margin-top: 22px; min-height: 52px; color: var(--muted); font-weight: 600; }
.wish-msg.sealed { color: var(--gold-2); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-size: 21px; flex: 1; }
.faq-item p { color: var(--muted); padding: 0 40px 24px 0; }
.faq-item p strong { color: var(--gold-2); }
.chev { width: 28px; height: 28px; border-radius: 50%; flex: none; position: relative; background: rgba(255, 255, 255, .05); transition: transform .25s; }
.chev::before { content: ""; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translate(-50%, -50%) rotate(45deg); }
.faq-item[open] .chev { transform: rotate(180deg); }

/* CTA + footer */
.cta { padding: 100px 0; background: radial-gradient(700px 400px at 50% 100%, rgba(240, 191, 102, .16), transparent 70%), var(--bg); text-align: center; }
.cta-in { display: flex; flex-direction: column; align-items: center; }
.cta-icon { border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); margin-bottom: 24px; }
.cta h2 { font-size: clamp(30px, 4.5vw, 48px); max-width: 720px; }
.cta p { color: var(--muted); font-size: 17px; margin: 14px 0 28px; max-width: 560px; }
.cta .badges { justify-content: center; }
.foot { border-top: 1px solid var(--line-soft); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { text-decoration: none; }
.foot p a { color: var(--text); font-weight: 600; }
.foot-langs { width: 100%; font-size: 13px; }
.foot-langs a[aria-current] { color: var(--gold); }
.foot a:hover { color: var(--text); }

/* Midnight preview / live celebration */
.celebrate { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 40%, rgba(20, 22, 50, .92), rgba(3, 4, 12, .97)); display: grid; place-items: center; cursor: pointer; animation: fade .3s; }
.celebrate[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.fireworks { position: absolute; inset: 0; width: 100%; height: 100%; }
.cel-text { position: relative; text-align: center; padding: 0 16px; }
.cel-count { font: 700 clamp(120px, 28vw, 240px)/1 var(--serif); color: var(--gold-2); text-shadow: 0 0 40px rgba(240, 191, 102, .5); }
.cel-count.pop { animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } }
.cel-title { font-family: var(--serif); animation: pop .8s ease-out; }
.cel-title span { display: block; font-size: clamp(36px, 7vw, 64px); color: var(--text); }
.cel-title strong { display: block; font-size: clamp(80px, 18vw, 170px); line-height: 1; background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #c99c47); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cel-close { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .55); font-size: 13px; }

/* Scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet & phone */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; padding-top: 36px; text-align: left; }
  .hero-art { order: 2; }
  .phone-hero { max-width: 270px; }
  .feat-layout { grid-template-columns: 1fr; }
  .feat-phone { display: none; }
  .feature { min-height: 0; }
  .feature-card { cursor: default; }
  .feature-card, .feature-card.active { transform: none; background: rgba(255, 255, 255, .025); border-color: var(--line-soft); }
  .phone-inline { display: block; max-width: 260px; margin: 22px auto 10px; }
  .feature-list { gap: 48px; }
  .how-in { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .top-in { gap: 10px; }
  .brand span { font-size: 16px; }
  .btn-sm { padding: 9px 12px; font-size: 13px; }
  .lead { font-size: 16px; }
  .countdown { padding: 12px; border-radius: 18px; }
  .cd-grid { gap: 6px; }
  .cd-box { padding: 12px 2px 8px; border-radius: 11px; }
  .cd-lab { font-size: 10px; letter-spacing: .08em; }
  .badge img { height: 44px; }
  .hero-actions .btn-ghost { width: 100%; }
  .features, .how, .faq { padding: 72px 0; }
  .feature-card { padding: 20px; gap: 14px; }
  .feature-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 13px; }
  .feature-copy h3 { font-size: 21px; }
  .step { padding: 18px 18px 18px 68px; }
  .step-n { left: 16px; top: 18px; width: 36px; height: 36px; }
  .faq-item p { padding-right: 0; }
  .faq-item h3 { font-size: 19px; }
}
@media (max-width: 420px) { .brand span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
