/*
 * Shelvanize landing page. Tokens come from tokens.css; this file is layout and
 * type only. Layout rules carried from the Brickanize record: no fixed heights on
 * text-bearing containers (min-height only), 44px minimum tap targets, visible
 * focus, reduced-motion respected (the page ships no motion at all).
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sv-paper);
  color: var(--sv-ink);
  font: 400 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-wordmark {
  font-family: "Iowan Old Style", "Palatino Nova", Palatino, Charter, Georgia, serif;
  color: var(--sv-ink);
  text-wrap: balance;
}

a {
  color: var(--sv-spruce);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--sv-spruce-deep); }

a:focus-visible,
:focus-visible {
  outline: 3px solid var(--sv-spruce);
  outline-offset: 2px;
  border-radius: 2px;
}

main { display: block; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */

.hero {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 0;
  text-align: center;
}

.hero-app-icon {
  border-radius: 22.5%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.hero-wordmark {
  margin: 1rem 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tm { font-size: 0.55em; letter-spacing: 0; }

h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.85rem, 6vw, 3.15rem);
  line-height: 1.14;
  font-weight: 600;
}

.hero-sub {
  margin: 1.25rem auto 0;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--sv-ink-soft);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0.5rem 1rem;
  min-height: 2.75rem;
  border: 1px solid var(--sv-paper-edge);
  border-radius: 999px;
  background: var(--sv-paper-raised);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--sv-ink-soft);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sv-brass);
}

/* ---------- The shelf motif ---------- */

.shelfscape {
  max-width: 34rem;
  margin: 3rem auto 0;
  padding: 0 1rem;
}

.spines {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
}

.s {
  display: block;
  width: 1.65rem;
  border-radius: 3px 3px 0 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: none;
}

.s.thin { width: 1.05rem; }

/* Spine heights: enough spread for the jumbled/ordered story to read at a glance. */
.h1 { height: 3.4rem; }
.h2 { height: 3.9rem; }
.h3 { height: 4.4rem; }
.h4 { height: 4.9rem; }
.h5 { height: 5.4rem; }
.h6 { height: 5.9rem; }
.h7 { height: 6.4rem; }
.h8 { height: 6.9rem; }

.c-spruce  { background: color-mix(in srgb, var(--sv-spruce) 82%, var(--sv-paper)); }
.c-deep    { background: color-mix(in srgb, var(--sv-spruce) 55%, var(--sv-ink)); }
.c-neutral { background: color-mix(in srgb, var(--sv-ink) 26%, var(--sv-paper)); }
.c-brass   { background: var(--sv-brass); }

/* The call-number label the icon wears, echoed on one spine per shelf. */
.s.marked { position: relative; }

.s.marked::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0.55rem;
  height: 0.8rem;
  border-radius: 2px;
  background: var(--sv-paper);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.shelf-bar {
  height: 0.55rem;
  border-radius: 2px;
  background: var(--sv-shelf);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

/* ---------- Arrangement band ---------- */

.arrangement {
  margin-top: 4.5rem;
  background: var(--sv-spruce);
  color: var(--sv-on-spruce);
}

.band-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}

.kicker {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sv-on-spruce) 86%, var(--sv-spruce));
}

.arrangement h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: var(--sv-on-spruce);
}

.arrangement p:not(.kicker) {
  margin: 1rem auto 0;
  max-width: 40rem;
  color: color-mix(in srgb, var(--sv-on-spruce) 92%, var(--sv-spruce));
}

/* The ordered shelf sits on the spruce band: lighten the neutrals so the
   height gradient stays legible on the dark ground. */
.arrangement .c-neutral { background: color-mix(in srgb, var(--sv-on-spruce) 55%, var(--sv-spruce)); }
.arrangement .c-deep    { background: color-mix(in srgb, var(--sv-ink) 42%, var(--sv-spruce)); }
.arrangement .c-spruce  { background: color-mix(in srgb, var(--sv-on-spruce) 28%, var(--sv-spruce)); }
.arrangement .s { border-color: rgba(0, 0, 0, 0.25); }
.arrangement .shelf-bar { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); }

/* ---------- Features ---------- */

/* Four cards stay a 2x2 at every width where more than one column fits —
   auto-fit would go 3+1 with an orphan on common laptop widths. */
.features {
  max-width: 62rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 44rem) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

.feature {
  background: var(--sv-paper-raised);
  border: 1px solid var(--sv-paper-edge);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
}

.feature h3 {
  margin: 0;
  font-size: 1.25rem;
}

.feature p {
  margin: 0.6rem 0 0;
  color: var(--sv-ink-soft);
}

/* ---------- Roadmap strip ---------- */

.roadmap {
  max-width: 62rem;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.roadmap p {
  margin: 0;
  padding: 1.1rem 1.5rem;
  border: 1px dashed color-mix(in srgb, var(--sv-brass) 60%, var(--sv-paper-edge));
  border-radius: 14px;
  color: var(--sv-ink-soft);
}

.roadmap-label {
  display: inline-block;
  margin-right: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sv-brass-ink);
}

/* ---------- Footer ---------- */

footer {
  max-width: 62rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--sv-ink-soft);
}

footer p { margin: 0.4rem 0 0; }

.fine-print { font-size: 0.875rem; }

/* 320px reflow budget (WCAG 1.4.10): 12 spines x 1.15rem + 11 x 0.2rem gaps
   + 2rem shelfscape padding ≈ 282px, inside the narrowest viewport. */
@media (max-width: 480px) {
  .hero { padding-top: 3rem; }
  .spines { gap: 0.2rem; }
  .s { width: 1.15rem; }
  .s.thin { width: 0.75rem; }
  .status-chip { font-size: 0.875rem; }
}

/* On narrow phones the hard break fights natural wrapping and orphans the last
   word — let text-wrap: balance do the layout there. */
@media (max-width: 25em) {
  h1 br { display: none; }
}
