/* Pumpkin Lights — a dark, warm night. One stylesheet for every page. */
:root {
  --night: #0b0712;
  --night-2: #140c20;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4ece4;
  --muted: rgba(244, 236, 228, 0.66);
  --faint: rgba(244, 236, 228, 0.45);
  --ember: #ff8a1f;
  --ember-2: #ffb347;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #241433 0%, transparent 60%), var(--night);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Header: a slim bar, like the Mac's menu bar — the hero pumpkin hangs from its underside. */
:root { --bar: 56px; }
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 3; height: var(--bar);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.035); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.lang { color: var(--muted); font-size: 15px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; }
.lang:hover { color: var(--text); text-decoration: none; border-color: rgba(255, 255, 255, 0.2); }
body { background-image: url(/assets/stars.svg), radial-gradient(1200px 600px at 70% -10%, #241433 0%, transparent 60%); background-size: 1200px 800px, auto; }

/* Hero: the pitch on the left, a live pumpkin hanging on the right (above the text on phones). */
.hero {
  --pw: clamp(250px, 30vw, 380px);   /* pumpkin width */
  --cord: clamp(70px, 14vh, 150px);  /* cord below the bar */
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
  min-height: min(100vh, 820px); padding: var(--bar) clamp(16px, 6vw, 96px) 48px;
}
.hero .intro { grid-column: 1; grid-row: 1; max-width: 560px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 800; margin-bottom: 0.2em; }
.hero .lead { font-size: clamp(20px, 2.4vw, 26px); margin: 0; }
.hero .sub { font-size: clamp(17px, 2vw, 21px); color: var(--muted); margin: 0.2em 0 1.2em; }
.hero .lead, .hero .sub, .hero .fine { text-wrap: balance; }
/* Chinese: break hero lines only at punctuation and spaces, never inside a word like 整台. */
:lang(zh-Hans) .hero p, :lang(zh-Hans) h1, :lang(zh-Hans) h2 { word-break: keep-all; }
.nowrap { white-space: nowrap; }
.stage { grid-column: 2; grid-row: 1; position: relative; align-self: stretch; min-height: calc(var(--bar) + var(--cord) + var(--pw) * 0.87 + 16px); margin-top: calc(var(--bar) * -1); }
.canopy { position: absolute; top: calc(var(--bar) - 2px); left: 50%; width: 30px; height: auto; transform: translateX(-50%); z-index: 2; }
.pendant {
  position: absolute; top: var(--bar); left: 50%; width: var(--pw); margin-left: calc(var(--pw) / -2);
  transform-origin: 50% 0; cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none;
}
.pendant:focus-visible .body { outline: 2px solid var(--ember-2); outline-offset: 6px; border-radius: 40%; }
/* The cord continues the 4 px braided stub drawn in the render (4/635 of its width, centred). */
.cord {
  width: calc(var(--pw) * 4 / 635); height: var(--cord); margin: 0 auto;
  background: repeating-linear-gradient(to bottom, #997a4d 0 2px, #6a4f2c 2px 4px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.pendant .body { position: relative; }
.pk { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pk.on { position: absolute; inset: 0; transition: opacity 0.45s ease; }
.pendant.off .pk.on { opacity: 0; }
.glow {
  position: absolute; left: 50%; top: 58%; width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 150, 50, 0.30), rgba(255, 120, 30, 0.10) 45%, transparent 72%);
  pointer-events: none; transition: opacity 0.45s ease; animation: flicker 3.2s infinite;
}
.pendant.off .glow { opacity: 0; animation: none; }
@keyframes flicker {
  0%, 100% { opacity: 1; } 18% { opacity: 0.86; } 22% { opacity: 0.97; } 47% { opacity: 0.9; }
  52% { opacity: 1; } 71% { opacity: 0.83; } 76% { opacity: 0.95; }
}
@media (prefers-reduced-motion: reduce) { .glow { animation: none; } }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.more { color: var(--muted); }
.fine { color: var(--faint); font-size: 14px; margin-top: 1em; }
.sandbox-note { color: #7fd1ff; font-size: 14px; }

/* Buttons */
.buy {
  font: inherit; font-weight: 600; font-size: 17px; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); background: rgba(255, 255, 255, 0.06);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.buy.primary {
  border-color: transparent; color: #1b0d02;
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  box-shadow: 0 8px 30px rgba(255, 138, 31, 0.35);
}
.buy:not([disabled]):hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(255, 138, 31, 0.45); }
.buy[disabled] { cursor: default; opacity: 0.85; }
a.buy { display: inline-block; text-decoration: none; }

/* Feature sections */
main { display: block; }
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  max-width: 1120px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.feature.flip .text { order: 2; }
.feature:not(:has(.gallery)) { grid-template-columns: 1fr; max-width: 760px; text-align: center; }
.feature h2 { font-size: clamp(28px, 3.6vw, 40px); }
.feature p { color: var(--muted); font-size: 18px; margin: 0; }
.gallery { display: grid; gap: 14px; align-items: end; justify-items: center; }
.gallery.g2 { grid-template-columns: 1fr 1fr; }
.gallery.g6 { grid-template-columns: repeat(3, 1fr); }
.gallery img { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
#pumpkins .gallery img, #carved .gallery img { width: 100%; }
#make-it-yours .gallery img { width: 46%; }

/* Pricing */
.pricing { text-align: center; max-width: 960px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.pricing h2 { font-size: clamp(30px, 4vw, 44px); }
.pricing > p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.tier { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 18px; }
.tier.featured { border-color: rgba(255, 138, 31, 0.5); box-shadow: 0 0 0 1px rgba(255, 138, 31, 0.25), 0 20px 60px rgba(255, 138, 31, 0.12); }
.tier h3 { font-size: 18px; color: var(--muted); font-weight: 600; }
.tier .price { font-size: 40px; font-weight: 800; margin: 4px 0 18px; }
.tier .buy { width: 100%; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 100px) clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.faq h2 { font-size: clamp(28px, 3.6vw, 40px); text-align: center; margin-bottom: 1em; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--faint); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Documents (terms, refunds, privacy, thanks) */
.doc { max-width: 720px; margin: 0 auto; padding: 140px clamp(16px, 4vw, 48px) 80px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); }
.doc h2 { font-size: 20px; margin-top: 2em; }
.doc p { color: var(--muted); }
.doc .updated { color: var(--faint); font-size: 14px; }
.thanks { text-align: center; }
.thanks .download { margin-top: 2em; }
.license .fine, .thanks > .fine { text-wrap: balance; }
.notfound { text-align: center; }
.notfound h1 + p { margin-bottom: 1.6em; }
.notfound h1[lang] { margin-top: 2.4em; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px clamp(16px, 4vw, 48px) 56px; text-align: center; color: var(--faint); font-size: 14px; }
.foot p { margin: 0.3em 0; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 14px; }
.foot nav a { color: var(--muted); }

/* Phones */
@media (max-width: 760px) {
  .hero { --pw: min(64vw, 270px); --cord: 64px; display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 40px; }
  .stage { order: -1; margin: calc(var(--bar) * -1) calc(clamp(16px, 6vw, 96px) * -1) 0; }
  .hero .intro { max-width: none; }
  .hero .cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .feature { grid-template-columns: 1fr; }
  .feature.flip .text { order: 0; }
  .tiers { grid-template-columns: 1fr; }
  .gallery.g6 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .license { padding: 18px; }
  .key-actions .buy { flex: 1 1 100%; }
}

/* Thanks page: the licence key */
.license { margin: 2.4em auto 0; padding: 24px; max-width: 560px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.license h2 { font-size: 18px; margin: 0 0 14px; color: var(--muted); font-weight: 600; }
.license .key {
  display: block; text-align: left; font: 13px/1.65 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  overflow-wrap: anywhere; word-break: break-all; user-select: all; -webkit-user-select: all;
}
.key-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.key-actions .buy { font-size: 16px; padding: 11px 20px; }
.license .fine { margin: 12px 0 0; }
.license .test { color: #7fd1ff; }
.waiting { color: var(--muted); margin: 0; }
.slow { color: var(--ember-2); margin: 0; }
.steps { text-align: left; max-width: 500px; margin: 2em auto 0; color: var(--muted); padding-left: 1.4em; }
.steps li { margin: 0.4em 0; }
