/* KitzenCraft — static storefront styles. No external fonts or scripts. */
:root {
  --ink: #0B0D12;
  --surface: #12151C;
  --raised: #1A1E27;
  --line: #272C38;
  --text: #ECEEF3;
  --muted: #9AA2B5;
  --amber: #FFB224;
  --amber-press: #E89B0C;
  --mint: #3DDC97;
  --radius: 14px;
  --wrap: 1120px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  overflow-wrap: anywhere;
}

img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }

/* Hero headline: "Day" / "night" / "weather" are filled with vector art (sky and grass, starry
   sky with a moon, snow turning into a rain storm): assets/media/fx-*.svg, drawn for this site.
   Each word has a textured layer and, for night and weather, a light motion layer on top
   (twinkling stars, falling snow and rain), which only moves without reduced motion.
   The words stay in normal text order, so the sentence reads unchanged to screen readers.
   Fallback: without background-clip:text support they render as ordinary text (never invisible). */
.hero h1 { font-weight: 900; }
.hero h1 .fx { color: inherit; }
/* Hovering "weather" shakes only that word, as in a strong storm (beam.js draws the storm behind it). */
.hero h1 .fx-weather { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .fx-weather:hover { animation: fx-shake .14s linear infinite; }
}
@keyframes fx-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-2px, 1px) rotate(-.8deg); }
  40% { transform: translate(2px, -1.5px) rotate(.6deg); }
  60% { transform: translate(-1.5px, -1px) rotate(-.5deg); }
  80% { transform: translate(1.5px, 2px) rotate(.8deg); }
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 .fx {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /* If an image fails to load the word is filled with this colour, never invisible. */
    background-color: var(--text);
  }
  .hero h1 .fx-day { background-image: url("media/fx-day.svg"); }
  .hero h1 .fx-night {
    background-image: url("media/fx-night-motion.svg"), url("media/fx-night.svg");
    /* lifts the dark blue word off the near-black page */
    filter: drop-shadow(0 0 10px rgba(90, 130, 255, .45));
  }
  .hero h1 .fx-weather { background-image: url("media/fx-weather-motion.svg"), url("media/fx-weather.svg"); }

  /* Sun flare: one small, intense hot point just outside the top-left corner of "Day",
     plus thin rays fading out. Absolute pseudo-elements, so no layout shift. */
  .hero h1 .fx-day { position: relative; }

  .hero h1 .fx-day::before,
  .hero h1 .fx-day::after {
    content: "";
    position: absolute;
    pointer-events: none;
    mix-blend-mode: screen;
  }

  /* Hot core with a short halo, centred on the D’s top-left corner. */
  .hero h1 .fx-day::before {
    left: -0.42em;
    top: -0.12em;
    width: 0.84em;
    height: 0.84em;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%,
      #fffdf4 0 7%,
      #ffefc4 12%,
      rgba(255, 206, 122, .7) 22%,
      rgba(255, 174, 78, .25) 38%,
      rgba(255, 160, 60, 0) 62%);
  }

  /* Rays: thin spokes, strongest near the core, gone by the word’s middle. */
  .hero h1 .fx-day::after {
    left: -1em;
    top: -0.70em;
    width: 2em;
    height: 2em;
    background: repeating-conic-gradient(from 8deg at 50% 50%,
      rgba(255, 238, 196, .6) 0deg 0.7deg,
      rgba(255, 238, 196, 0) 1.5deg 22.5deg);
    -webkit-mask-image: radial-gradient(circle at 50% 50%,
      rgba(0, 0, 0, .95) 0 6%, rgba(0, 0, 0, .5) 20%, rgba(0, 0, 0, 0) 46%);
    mask-image: radial-gradient(circle at 50% 50%,
      rgba(0, 0, 0, .95) 0 6%, rgba(0, 0, 0, .5) 20%, rgba(0, 0, 0, 0) 46%);
  }
}
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--amber); color: var(--ink); padding: 8px 12px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, .88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.header-cta { flex-shrink: 0; white-space: nowrap; }
.nav a {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}
.nav a[aria-current="page"] { color: var(--text); background: var(--raised); }
.nav .sep { width: 1px; margin: 8px 6px; background: var(--line); flex-shrink: 0; }

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .nav {
    order: 3;
    width: calc(100% + 40px);
    margin: 6px -20px 0;
    padding: 0 16px 10px;
    scroll-snap-type: x proximity;
  }
  .nav a { scroll-snap-align: start; }
  .header-cta { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:active { background: var(--amber-press); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:active { background: var(--raised); }
.btn-free { background: transparent; color: var(--mint); border-color: rgba(61, 220, 151, .4); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--text); background: var(--raised); }
  .btn-primary:hover { background: #FFC14D; }
  .btn-ghost:hover { border-color: #3A4150; background: var(--surface); }
  .btn-free:hover { border-color: var(--mint); }
  .card-link:hover { border-color: #3A4150; }
  .foot-links a:hover { color: var(--text); }
}

/* ---------- Placeholders (must all be replaced before going live) ---------- */
.ph {
  color: var(--amber);
  background: rgba(255, 178, 36, .08);
  outline: 1px dashed rgba(255, 178, 36, .55);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0 4px;
}
.slot {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: .9rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.025) 14px 28px),
    var(--surface);
  border: 1px dashed #3A4150;
  border-radius: var(--radius);
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.hero { padding-block: clamp(56px, 10vw, 120px) clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr 1fr; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: .875rem; color: var(--muted); }

/* Hero offer band: static tag + clock above the buttons. Not a banner: no box, no motion, no countdown. */
.offer-band { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 0; font-size: calc(1.75rem - 3px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.offer-tag, .offer-time { display: inline-flex; align-items: center; gap: 9px; }
.offer-ico { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 0 8px rgba(255, 178, 36, .55)); }
.offer-off { font-weight: 800; letter-spacing: .03em; color: var(--amber); text-shadow: 0 0 14px rgba(255, 178, 36, .75), 0 0 22px rgba(255, 178, 36, .28); }
.offer-time { color: var(--text); text-shadow: 0 0 14px rgba(255, 255, 255, .22), 0 0 30px rgba(255, 178, 36, .18); }
.offer-sep { width: 1px; height: 22px; background: var(--line); }
.offer-band + .hero-actions { margin-top: 14px; }
@media (max-width: 860px) {
  .offer-band { margin-top: 20px; gap: 10px; font-size: calc(1.3rem - 3px); }
  .offer-ico { width: 19px; height: 19px; }
  .offer-sep { height: 17px; }
}
@media (max-width: 420px) {
  .offer-band { font-size: calc(1.05rem - 3px); gap: 8px; }
  .offer-ico { width: 16px; height: 16px; }
}
.hero .slot { aspect-ratio: 16 / 10; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.card-link { display: flex; flex-direction: column; text-decoration: none; transition: border-color 150ms ease; }
.step-num {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 8px; background: var(--raised);
  font-family: var(--mono); font-weight: 700; color: var(--amber);
}

/* ---------- Product cards / catalog ---------- */
.catalog { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product-card { display: flex; flex-direction: column; gap: 14px; }
.product-card .slot { aspect-ratio: 16 / 9; }
.product-card h3 { margin: 0; }
.product-card .desc { color: var(--muted); margin: 0; flex: 1; }
.price { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.price small { font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card-actions .btn { flex: 1 1 140px; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag-free { color: var(--mint); border-color: rgba(61, 220, 151, .4); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Product page ---------- */
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.product-top { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 920px) { .product-top { grid-template-columns: minmax(0, 1fr); } }

.gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.gallery > * { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 9; }
.gallery-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }

.buy-box { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 920px) { .buy-box { position: static; } }
.buy-box .btn { width: 100%; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .925rem; color: var(--muted); }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "✓"; color: var(--mint); font-weight: 700; flex-shrink: 0; }

.video { aspect-ratio: 16 / 9; }
.feature-list { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .feature-list { grid-template-columns: minmax(0, 1fr); } }
.feature-list .card h3 { margin-bottom: 6px; }
.feature-list .card p { margin: 0; color: var(--muted); }

.included { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.included li { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; padding: 14px 18px; background: var(--surface); }
.included li + li { border-top: 1px solid var(--line); }
.included .file { font-family: var(--mono); font-size: .9rem; color: var(--text); }
.included .what { color: var(--muted); }
@media (max-width: 600px) { .included li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
.legal table { min-width: 560px; }
th, td { overflow-wrap: normal; }
th, .nowrap { white-space: nowrap; }
.price-table { min-width: 520px; }
.legal th { white-space: normal; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--surface); }
td.yes { color: var(--mint); font-weight: 700; }
td.no { color: #5A6275; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  font-weight: 650;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono); color: var(--muted); font-size: 1.2rem;
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- Legal ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal ul, .legal ol { padding-left: 1.3em; margin: 0 0 1em; display: grid; gap: 6px; }
.legal .table-wrap { margin: 0 0 1.2em; }
.legal td { vertical-align: top; font-size: .92rem; }
.legal a { color: var(--amber); }
.legal-pending { border-left: 3px solid var(--amber); padding: 16px 20px; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- Checkout consent ---------- */
.consent { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
.consent legend { padding: 0 6px; }
.consent label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: .85rem; line-height: 1.5; color: #C3C8D4; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--amber); cursor: pointer; }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; }
.consent-hint { margin: -4px 0 0; color: var(--amber); }

/* ---------- Real product media ---------- */
.media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero .media { aspect-ratio: 16 / 10; }
.product-card .media { aspect-ratio: 16 / 9; }
.gallery figure { margin: 0; position: relative; }
.gallery figure .media { aspect-ratio: 16 / 9; height: 100%; }
.gallery figcaption {
  position: absolute; left: 10px; bottom: 10px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(11, 13, 18, .78); color: var(--text);
  font-size: .8rem; font-family: var(--mono);
}
video.media { aspect-ratio: 16 / 9; background: #000; }
.media-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* Demo loops (clips.js plays them while on screen) */
video.is-auto { cursor: pointer; touch-action: manipulation; }
.hero-clip, .clip-grid figure { margin: 0; position: relative; }
.hero-clip figcaption, .clip-grid figcaption {
  position: absolute; left: 10px; bottom: 10px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(11, 13, 18, .78); color: var(--text);
  font-size: .8rem; font-family: var(--mono);
  white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.tour { margin: 24px 0 0; }
.tour-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tour-picks [aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.clip-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .clip-grid { grid-template-columns: minmax(0, 1fr); } }
.card.has-media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.has-media > .media { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; }
.card-body { padding: 20px 24px 24px; }

.install { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; max-width: 760px; }
.install li { counter-increment: step; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; color: #C3C8D4; }
.install li::before {
  content: counter(step);
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; background: var(--raised);
  font-family: var(--mono); font-weight: 700; color: var(--amber);
}
.install strong { color: var(--text); }
.code {
  margin: 20px 0 0; padding: 16px 18px; max-width: 760px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; font-size: .85rem; line-height: 1.6; color: #C3C8D4;
  overflow-wrap: normal; white-space: pre;
}
.code .c { color: #6B7489; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  font-size: .925rem;
}
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-grid h4 { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--mono); font-weight: 600; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-links a { color: #C3C8D4; text-decoration: none; display: inline-block; padding: 4px 0; }
.foot-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.foot-legal p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .faq summary::after { transition: none; }
  .btn:active { transform: none; }
}
