/* ============================================================
   KBStudios — Kitty Focus landing page
   A single hero. Type, spacing, radii and shadows follow the
   design handoff; the palette is sampled from the wallpaper.
   ============================================================ */

:root {
  /* Ink */
  --ink:          #43382E;
  --ink-body:     #4A3F35;
  --ink-muted:    #574A3F;
  --muted-body:   #6B5C4E;
  /* Amber */
  --amber:        #F2CE6B;
  --amber-border: #E0B348;
  --bronze:       #8A6A2F;
  /* Dusk — sampled straight out of the hero wallpaper */
  --sky:          #F4ECDF;  /* wallpaper sky; the hero band must match it */
  --dusk-ink:     #6F5F71;  /* the near range, darkened for text — the ranges
                               themselves are too light against cream to read
                               at small sizes */
  --rule:         #DFD5DD;  /* a tint of the ranges; changelog line and markers */
  --icon-tile:    #E7DCCB;
  --glass:        rgba(240,232,220,0.86);
  --glass-border: rgba(255,255,255,0.65);
  /* Layout */
  --container:    1000px;
  --gutter:       28px;
  --rhythm:       84px;
  --gap:          18px;
  /* Motion */
  --ease-out:     cubic-bezier(.22,.61,.36,1);
  --ease-soft:    cubic-bezier(.16,1,.3,1);
  --t-fast:       140ms;
  --t-mid:        320ms;
}

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

body {
  margin: 0;
  /* Matches the band, so a viewport taller than the hero shows no seam. */
  background: var(--sky);
  color: var(--ink-body);
  font-family: 'Quicksand', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink-body); text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--amber); }

/* No border-radius here: the outline already follows each element's own
   corners, and setting one would re-round the element itself on focus —
   which snapped the button to a different shape the moment you tabbed to it. */
:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   HERO BAND
   ============================================================ */

.hero-band {
  position: relative;
  overflow: hidden;
  /* The wallpaper's own sky colour, so the band and the artwork are seamless
     however tall the hero gets. Also the fallback if the image can't load. */
  background: var(--sky);
  /* The hero is the whole page now, so it has to fill short viewports —
     otherwise the wallpaper's sand would stop mid-screen. */
  min-height: 100vh;
  min-height: 100svh;
}

/* Kitty Focus's own desktop wallpaper, full-bleed behind the hero.

   It starts 32% down the band rather than at the very top, and that offset is
   load-bearing: the wallpaper's ridgeline sits at 46% of its own height, so
   the offset is what pushes the mountains clear of the hero copy. Without it
   the note under the button lands on mauve at about 2.8:1. The wallpaper's sky
   is the same cream as the band's background, so the strip of bare band above
   it is invisible.

   Where the number comes from: at narrower widths the ridge lands at
   `bandHeight x (0.46 + 0.54 x offset)`, and the band's floor is its content
   height (~920px), since `min-height` only ever makes it taller. Anything that
   changes the hero's height changes this — shortening the screenshot panels
   once pushed the clearance to -11px. Re-check at ~2560px too: that is where
   the crop rides the ridge highest and the margin is thinnest. */
.hero-wall {
  position: absolute; top: 32%; right: 0; bottom: 0; left: 0;
  overflow: hidden; z-index: 0;
}
.hero-wall img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Biased right of centre so the sun survives the crop on narrow viewports. */
  object-position: 66% 50%;
  will-change: transform;
  /* The 1.08 scale is the parallax's travel room — without it, drifting the
     wallpaper down would pull its own bottom edge into view. */
  transform: translate3d(0, var(--wall-shift, 0px), 0) scale(1.08);
}
.hero-wall.is-missing { display: none; }

/* Fine film grain — keeps the warm band from reading flat */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-inner { position: relative; padding-bottom: var(--rhythm); }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 24px;
}
.wordmark { font-weight: 700; font-size: 16px; letter-spacing: .02em; color: var(--ink-body); }
.site-header a { font-weight: 600; font-size: 14px; }

.link-underline { position: relative; transition: color var(--t-fast) var(--ease-out); }
.link-underline::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-mid) var(--ease-soft);
}
.link-underline:hover { color: var(--bronze); }
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero content */
.hero { position: relative; text-align: center; padding: 74px 0 44px; }

.badge-row { display: inline-flex; align-items: center; gap: 12px; padding-bottom: 20px; }
.app-icon {
  width: 52px; height: 52px; border-radius: 14px; overflow: hidden; display: block;
  background: var(--icon-tile); border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 6px 18px rgba(74,63,53,.14);
  animation: icon-float 6s var(--ease-soft) infinite alternate;
}
.app-icon .img-slot, .app-icon img { width: 100%; height: 100%; }
@keyframes icon-float {
  from { transform: translateY(0) rotate(-1.5deg); }
  to   { transform: translateY(-5px) rotate(1.5deg); }
}
.eyebrow {
  font-weight: 600; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dusk-ink);
}

.h1 {
  font-weight: 700; font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.04; letter-spacing: -.02em;
  margin: 0 auto 20px; max-width: 18ch; color: var(--ink);
}
/* Word-by-word mask reveal */
.h1 .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .09em; }
.h1 .word > span {
  display: inline-block;
  transform: translateY(115%) rotate(3deg);
  opacity: 0;
  animation: word-in .95s var(--ease-soft) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes word-in { to { transform: translateY(0) rotate(0); opacity: 1; } }

/* Held to a single line, which is why this is a fluid size rather than the
   handoff's clamp. The line measures 27.19x its own font-size, so one line
   costs ~17.1px at 520px wide and only ~12.0px at 375px — unreadable. Hence
   the breakpoint below: one line down to 520px, then it wraps at a legible
   17px.

   3.2vw, not the 3.28vw the 520px case strictly needs: the extra ~2.7% of
   slack absorbs font-rendering differences across platforms and the brief
   fallback-font flash before Quicksand loads, either of which would clip a
   nowrap line. If this copy changes, re-measure — the ratio above is specific
   to this string. */
.hero-sub {
  font-size: min(20px, 3.2vw); line-height: 1.55;
  margin: 0 auto 32px; max-width: none; color: var(--ink-muted);
  white-space: nowrap;
}
@media (max-width: 520px) {
  .hero-sub {
    white-space: normal;
    font-size: 17px;
    max-width: 34ch;
    text-wrap: balance;
  }
}

/* ── Button ──────────────────────────────────────────────────
   Rectangular, and the only thing hover does is bloom a soft amber glow
   around the edge. Nothing moves, nothing lightens: the fill stays put.
   (This replaces the handoff's pill radius and its #F2CE6B → #F7DC8E
   hover fill — both were deliberately dropped, not overlooked.)        */
.cta-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.btn-note { font-weight: 600; font-size: 13px; color: var(--muted-body); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 10px;
  background: var(--amber); border: 1px solid var(--amber-border);
  color: var(--ink-body); font-weight: 700; font-size: 16.5px;
  font-family: inherit; cursor: pointer;
  padding: 16px 32px;
  box-shadow: 0 6px 16px rgba(120,95,45,.2);
  transition: box-shadow 260ms var(--ease-out);
}
/* Base drop shadow, then a tight ring, then the glow falling off outside it. */
.btn:hover {
  background: var(--amber);
  box-shadow:
    0 6px 16px rgba(120,95,45,.2),
    0 0 0 3px rgba(242,206,107,.55),
    0 0 18px 4px rgba(242,206,107,.6);
}

.btn__glyph {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}

/* ── Hero screenshot panels ──────────────────────────────── */
.shots { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: stretch; perspective: 1400px; }

.panel {
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(74,63,53,.16);
  padding: 14px; min-width: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transform-style: preserve-3d;
  transition: box-shadow 500ms var(--ease-out), transform 600ms var(--ease-soft);
}
/* Both screenshots are landscape window captures (~16:9), so the frames match
   their shape and the panels are equal. The original design paired one wide
   screen with a tall sidebar; forcing a landscape capture into that portrait
   frame cropped it to an unreadable vertical sliver. */
.panel { flex: 1 1 320px; }
.panel .img-slot { aspect-ratio: 16 / 9; height: auto; }

.panel.is-tilting {
  transition: box-shadow 400ms var(--ease-out), transform 120ms linear;
  box-shadow: 0 30px 60px rgba(74,63,53,.24);
}
.panel .img-slot { transform: translateZ(26px); }

/* ============================================================
   FEATURES
   ============================================================ */

.h2 {
  font-weight: 700; font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -.02em; margin: 0 0 40px; color: var(--ink);
}
.h2--lede { margin-bottom: 18px; }

.features { background: var(--sky); padding: var(--rhythm) 0 0; }

.lede {
  max-width: 62ch; margin: 0 0 46px;
  font-size: 17px; line-height: 1.65; color: var(--ink-muted);
}

/* No cards, no icons, no rules — the features are set as a spec list, grouped
   under quiet labels that reuse the hero eyebrow's treatment. Alignment and
   whitespace do the separating. */
.spec + .spec { margin-top: 46px; }

.spec__label {
  margin: 0 0 6px;
  font-weight: 600; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dusk-ink);
}

.spec__items { margin: 0; }

/* Name and description share a baseline; the name column is fixed so the
   descriptions line up down the whole section. */
.spec__row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0 30px;
  padding: 15px 0;
  max-width: 78ch;
}
.spec__row dt {
  font-weight: 700; font-size: 16px; color: var(--ink);
}
.spec__row dd {
  margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted-body);
}

@media (max-width: 620px) {
  .spec__row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 13px 0;
  }
}

/* ============================================================
   CHANGELOG
   ============================================================ */

.changelog { background: var(--sky); padding: var(--rhythm) 0; }

/* Releases hang off a single rule, newest first. The rule is drawn on the
   <ol> and the markers on each <li>, so adding or removing a release needs
   no other change. */
.log {
  list-style: none; margin: 0; padding: 0;
  position: relative;
  max-width: 68ch;
}
.log::before {
  content: ''; position: absolute; z-index: 0;
  left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: var(--rule);
}
.release { position: relative; padding: 0 0 38px 34px; }
.release:last-child { padding-bottom: 0; }
.release::before {
  content: ''; position: absolute; z-index: 1;
  left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--sky); border: 3px solid var(--rule);
}
/* The newest release gets the amber marker — the one the download matches. */
.release:first-child::before {
  background: var(--amber); border-color: var(--amber-border);
}

.release__meta {
  margin: 0 0 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
}
.release__v {
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  color: var(--dusk-ink);
  font-variant-numeric: tabular-nums;
}
.release__date { font-weight: 600; font-size: 13px; color: var(--muted-body); }

.release__h { font-weight: 700; font-size: 19px; margin: 0 0 10px; color: var(--ink); }

.release__list { list-style: none; margin: 0; padding: 0; }
.release__list li {
  position: relative; padding-left: 18px; margin-top: 7px;
  font-size: 15px; line-height: 1.6; color: var(--muted-body);
}
.release__list li::before {
  content: ''; position: absolute;
  left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rule);
}

/* ── Closing note ──────────────────────────────────────────── */
.page-outro { background: var(--sky); padding: 0 0 var(--rhythm); }
.page-outro p {
  margin: 0 auto;
  text-align: center;
  font-size: 14px; font-weight: 600; line-height: 1.6;
  color: var(--ink-body);
  /* Caps the measure. With the current copy `balance` settles on two even
     lines (~57 characters each) on desktop and three on a phone. */
  max-width: 62ch;
  text-wrap: balance;
}
.page-outro a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(74,63,53,.45);
  transition: text-decoration-color var(--t-fast) var(--ease-out);
}
.page-outro a:hover { text-decoration-color: currentColor; }

/* ── Image slots (flat placeholder until assets land) ────── */
.img-slot {
  position: relative; display: block; overflow: hidden;
  width: 100%; height: var(--h, auto); border-radius: var(--r, 0);
  background: #DFD7D4;
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.img-slot::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #8E8087;
  transition: opacity var(--t-mid) var(--ease-out);
}
.img-slot--bare::after { content: none; }
.img-slot.is-loaded { background: none; }
.img-slot.is-loaded::after { opacity: 0; }
.img-slot.is-missing img { display: none; }

/* ============================================================
   MOTION PRIMITIVES
   ============================================================ */

/* On-load entrances — only armed once JS confirms it can animate them */
.js-ready [data-anim] { opacity: 0; }
.js-ready [data-anim="fade-down"] { animation: fade-down .8s var(--ease-soft) forwards var(--d, 0s); }
.js-ready [data-anim="fade-up"]   { animation: fade-up .9s var(--ease-soft) forwards var(--d, 0s); }
.js-ready [data-anim="rise"]      { animation: rise 1.1s var(--ease-soft) forwards var(--d, 0s); }

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(46px) scale(.97); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Scroll reveals — kept gentler than the hero's entrances, because this is
   reference material people scan rather than a sequence they watch. */
.js-ready [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 600ms var(--ease-soft), transform 600ms var(--ease-soft);
}
.js-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   REDUCED MOTION — everything resolves instantly, nothing loops
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js-ready [data-anim],
  .js-ready [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .h1 .word > span { opacity: 1; transform: none; }
  .hero-wall img { transform: none; }
}
