/* K9 KLUB — editorial, spec-sheet styling in the spirit of styl.inc */
:root {
  --bg: #f0f8fa;
  --card: #f6fbfc;
  --fg: #1a2931;
  --muted: #e9f4f7;
  --muted-fg: #566d75;
  --border: #d8e4e7;
  --primary: #116379;
  --primary-fg: #f8fdfe;
  --bright: #1fc4ef;
  --secondary: #d2eef4;
  --ink: #051621;
  --ink-card: #0c222e;
  --ink-border: #243b47;
  --ink-fg: #dce7ea;
  --ink-muted: #7d97a0;
  --radius: 0.5rem;
  --sans: "DM Sans", system-ui, sans-serif;
  --serif: "Lora", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--secondary); color: var(--primary); }
.wrap { width: min(1160px, 100% - 3rem); margin-inline: auto; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); line-height: 1; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
@media (min-width: 640px) { .label { font-size: 0.75rem; } }
.label .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bright); margin-right: 0.55rem; vertical-align: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bright) 25%, transparent); }
.lede { font-size: 1.125rem; color: var(--muted-fg); max-width: 34rem; }


/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 500 0.95rem/1 var(--sans);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, black); }
.btn-outline { border-color: var(--border); background: transparent; color: var(--fg); }
.btn-outline:hover { border-color: color-mix(in srgb, var(--primary) 60%, transparent); background: var(--muted); }
.btn-sm { padding: 0.6rem 0.95rem; font-size: 0.875rem; }
.link { font-weight: 500; color: var(--primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.link:hover { text-decoration-color: var(--primary); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; }
.logo-word { font: 600 1.35rem/1 var(--serif); letter-spacing: -0.02em; }
.logo-word em { font-style: italic; color: var(--primary); }
.logo .label { font-size: 0.625rem; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a:not(.btn) { font-size: 0.875rem; text-decoration: none; color: var(--muted-fg); transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--fg); }
@media (max-width: 820px) { .nav-links a:not(.btn) { display: none; } .logo .label { display: none; } }

/* Hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 4rem; align-items: end; }
.hero h1 { margin: 1.75rem 0 1.5rem; }
.hero .lede { margin-bottom: 2rem; }
.hero-meta { display: flex; gap: 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.hero-meta div { display: grid; gap: 0.2rem; }
.hero-meta strong { font: 600 1.5rem/1 var(--serif); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 3rem; } }

/* Spec card (hero figure) */
figure { margin: 0; }
.figure-cap { display: flex; justify-content: space-between; margin-top: 0.75rem; }
.spec {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 1px 0 rgba(17, 99, 121, 0.04), 0 30px 60px -30px rgba(5, 22, 33, 0.25);
  overflow: hidden;
}
.spec-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.spec-head .live { color: var(--primary); }
.spec-title { padding: 1.25rem 1.25rem 0.25rem; }
.spec-title h3 { font-size: 1.6rem; }
.spec-title p { color: var(--muted-fg); font-size: 0.9rem; margin-top: 0.25rem; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 1.25rem; }
.slot {
  font-family: var(--mono); font-size: 0.8rem; text-align: center;
  padding: 0.65rem 0.25rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
}
.slot.taken { color: color-mix(in srgb, var(--muted-fg) 55%, transparent); text-decoration: line-through; background: transparent; }
.slot.picked { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.spec-rows { border-top: 1px solid var(--border); }
.spec-row { display: flex; justify-content: space-between; padding: 0.7rem 1.25rem; font-size: 0.9rem; }
.spec-row + .spec-row { border-top: 1px dashed var(--border); }
.spec-row span:last-child { font-family: var(--mono); font-size: 0.8rem; }

/* Ticker */
.ticker { margin-top: clamp(3.5rem, 8vw, 6rem); border-block: 1px solid var(--border); overflow: hidden; }
.ticker-track { display: flex; gap: 3rem; width: max-content; padding: 0.95rem 0; animation: scroll 38s linear infinite; }
.ticker-track span { white-space: nowrap; }
.ticker-track span::before { content: "✳"; color: var(--bright); margin-right: 3rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
section { padding: clamp(4.5rem, 10vw, 7.5rem) 0; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: end; margin-bottom: 3.5rem; }
.sec-head .label { grid-column: 1 / -1; display: flex; gap: 0.75rem; align-items: center; }
.sec-head .label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sec-head p { color: var(--muted-fg); max-width: 30rem; }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; } }

/* Indexed feature list */
.index-list { border-top: 1px solid var(--fg); }
.index-item {
  display: grid; grid-template-columns: 5rem 1.1fr 1.6fr auto; gap: 1.5rem; align-items: baseline;
  padding: 1.75rem 0; border-bottom: 1px solid var(--border);
  transition: background 0.25s, padding 0.25s;
}
.index-item:hover { background: var(--card); padding-inline: 1rem; }
.index-item p { color: var(--muted-fg); }
.index-item .tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); background: var(--secondary); padding: 0.3rem 0.55rem; border-radius: 999px; white-space: nowrap; }
@media (max-width: 820px) {
  .index-item { grid-template-columns: 3rem 1fr; }
  .index-item p, .index-item .tag { grid-column: 2; }
  .index-item .tag { justify-self: start; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--fg); margin-bottom: 3rem; }
.step { padding: 2rem 2rem 2rem 0; display: grid; gap: 0.85rem; align-content: start; }
.step + .step { border-left: 1px solid var(--border); padding-left: 2rem; }
.step .num { font: 600 3.5rem/1 var(--serif); color: var(--primary); }
.step p { color: var(--muted-fg); }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { border-left: 0; padding: 1.75rem 0; border-bottom: 1px solid var(--border); }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; }
.faq-list { border-top: 1px solid var(--fg); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; font: 500 1.15rem/1.35 var(--sans); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); color: var(--primary); transition: transform 0.25s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { color: var(--muted-fg); padding: 0 3rem 1.5rem 0; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Final CTA */
.final { padding-top: 0; }
.final-card {
  border: 1px solid var(--border); border-radius: calc(var(--radius) * 2);
  background: linear-gradient(180deg, var(--card), var(--muted));
  padding: clamp(2.5rem, 7vw, 5.5rem); text-align: center; display: grid; gap: 1.5rem; justify-items: center;
}
.final-card h2 { font-size: clamp(2.25rem, 5vw, 4rem); max-width: 16ch; }
.final-card p { color: var(--muted-fg); max-width: 30rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2.5rem; font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
.foot-grid p { color: var(--muted-fg); max-width: 22rem; margin-top: 0.75rem; }
.foot-col { display: grid; gap: 0.55rem; align-content: start; }
.foot-col .label { margin-bottom: 0.35rem; }
.foot-col a { text-decoration: none; color: var(--muted-fg); }
.foot-col a:hover { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Entrance */
.fade-up { opacity: 0; transform: translateY(14px); animation: fadeUp 0.8s cubic-bezier(.2,.7,.2,1) forwards; }
.s1 { animation-delay: 0.05s; } .s2 { animation-delay: 0.15s; } .s3 { animation-delay: 0.25s; } .s4 { animation-delay: 0.35s; } .s5 { animation-delay: 0.45s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

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

h1 em, h2 em { font-style: italic; color: var(--primary); }
.sec-head.stacked { grid-template-columns: 1fr; margin: 0; }

/* Embedded styl storefront */
#book { scroll-margin-top: 72px; }
.book .sec-head h2 em { font-style: italic; color: var(--primary); }
.book-embed { min-height: 20rem; border-top: 1px solid var(--fg); padding-top: 2rem; }
.book-fallback { margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted-fg); }

/* Hero photo background (photos come from /img/puppies) */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.hero-bg-panel { position: relative; overflow: hidden; }
.hero-bg-panel img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  transition: opacity 1.4s ease;
}
.hero-bg-panel img.is-hidden { opacity: 0; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0, transparent 22%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--bg) 86%, transparent) 0%,
      color-mix(in srgb, var(--bg) 68%, transparent) 46%,
      color-mix(in srgb, var(--bg) 8%, transparent) 100%);
}
.hero .ticker { position: relative; background: var(--bg); }
.hero .figure-cap .label { background: var(--bg); padding: 0.2rem 0.45rem; border-radius: 4px; }
@media (max-width: 900px) {
  .hero-bg-panel:not(:first-child) { display: none; }
  .hero-bg::after { background: color-mix(in srgb, var(--bg) 78%, transparent); }
}
