/* Sombra brand kit: see brand/BRAND.md */
:root {
  --black: #000000;
  --white: #ffffff;
  --grain: #818181;      /* supporting text on black, 5.4:1 */
  --film-base: #dbd3c3;  /* light sections */
  --orange: #fa6b1c;     /* calls to action only, always with black text */
  --orange-hover: #ff7e36;
  --orange-press: #e35a0e;
  --line: #262626;       /* hairlines on black */
  --error: #ff8a6a;

  /* Web font is Inter, a close free match for the Roobert PRO covers and wordmark. */
  --font: "Inter", system-ui, sans-serif;

  /* Type scale */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-ml: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --text-lg: clamp(2rem, 1.3rem + 2.4vw, 3rem);
  --text-xl: clamp(2.75rem, 1.6rem + 3.6vw, 4.75rem);

  /* Space scale, 8px base */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-12: 6rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --radius: 8px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* z-index scale: only the sticky header overlays anything */
  --z-header: 10;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The cover subtitle style from the kit: small, bold, all caps, 18% tracking */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grain);
}

h2 {
  font-size: var(--text-lg);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

section { padding-inline: var(--gutter); }

.section-head {
  display: grid;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
}

/* Buttons: pill, flat orange, black text */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: 999px;
  font: 700 var(--text-sm) / 1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms var(--ease-out);
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.button-primary { background: var(--orange); color: var(--black); }
.button-primary:hover { background: var(--orange-hover); }
.button-primary:active { background: var(--orange-press); }
.button-primary:disabled { background: var(--orange); }
.button-small { min-height: 36px; padding: 0 var(--s-2); font-size: var(--text-xs); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-2) var(--gutter);
  background: var(--black);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; flex-shrink: 0; }
.site-header .brand img { width: auto; height: 36px; } /* matches the header button height */
.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--text-sm);
}
.site-header nav a:not(.button) {
  color: var(--grain);
  text-decoration: none;
  transition: color 150ms ease;
}
.site-header nav a:not(.button):hover { color: var(--white); }

@media (max-width: 640px) {
  .site-header nav a:not(.button) { display: none; }
  .site-header .brand img { height: 30px; }
}

/* Hero: a full-bleed before/after, like the listing covers.
   Mobile: the photo runs edge to edge under the header, then the headline and signup.
   Desktop: headline and signup on the left, the photo filling the right half. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "media" "copy" "signup";
  gap: var(--s-3);
  padding: 0 0 var(--s-8);
}
@media (max-width: 959px) {
  .hero .eyebrow { margin-bottom: var(--s-1); }
  .lede { margin-top: var(--s-2); }
}
.hero-copy { grid-area: copy; padding-inline: var(--gutter); }
.hero-media { grid-area: media; margin: 0; }
.hero-signup { grid-area: signup; padding-inline: var(--gutter); }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy media" "signup media";
    grid-template-rows: 1fr auto;
    gap: 0;
    min-height: min(calc(100svh - 69px), 60rem);
    padding: 0;
  }
  .hero-copy { align-self: end; padding: var(--s-8) var(--s-6) var(--s-4) var(--gutter); }
  .hero-signup { padding: 0 var(--s-6) var(--s-8) var(--gutter); }
  .hero-media { height: 100%; }
}

/* No photos: one column, no empty space where the photo would be */
.hero:has(.hero-media[hidden]) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "signup";
  grid-template-rows: auto;
  gap: var(--s-4);
  min-height: 0;
  padding-block: var(--s-8);
}

.hero .eyebrow { margin-bottom: var(--s-2); }
/* Cover title from the kit: bold, all caps, tight leading, 5% tracking */
.hero h1 {
  font-size: clamp(2.25rem, 0.9rem + 5vw, 5.25rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lede {
  margin-top: var(--s-3);
  max-width: 40ch;
  color: var(--grain);
  font-size: var(--text-ml);
  line-height: 1.5;
}

.hero-signup {
  display: grid;
  gap: var(--s-2);
  max-width: calc(32rem + 2 * var(--gutter));
}
.hero-offer { font-size: var(--text-ml); font-weight: 700; }
.hero-alt { color: var(--grain); font-size: var(--text-sm); }
.hero-alt a {
  color: var(--white);
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.hero-alt a:hover { color: var(--orange); }

/* Before / after */
.compare {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 5 / 4; /* shorter on phones so the signup reaches the first screen */
  background: var(--line);
  user-select: none;
}
@media (min-width: 960px) {
  .compare { height: 100%; aspect-ratio: auto; }
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-before {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--white);
}
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  translate: -50% -50%;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--black);
}
/* Comparison labels from the kit: small tracked caps in the bottom corners */
.compare-label,
.compare-hint {
  position: absolute;
  z-index: 2;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.6);
}
.compare-label { bottom: var(--s-3); }
.compare-label-before { left: var(--s-3); }
.compare-label-after { right: var(--s-3); }
.compare-hint {
  top: var(--s-3);
  left: 50%;
  translate: -50% 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  text-shadow: none;
  white-space: nowrap;
  transition: opacity 200ms ease-in;
}
.compare[data-touched] .compare-hint { opacity: 0; }
.compare-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(.compare-range:focus-visible) {
  outline: 2px solid var(--orange);
  outline-offset: -4px;
}

/* Packs */
.packs { padding-block: var(--s-8); border-top: 1px solid var(--line); }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--s-4) var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pack-grid-featured { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }

.pack { display: flex; flex-direction: column; gap: var(--s-1); }
.pack img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
  margin-bottom: var(--s-1);
}
.pack img.fit-contain { object-fit: contain; background: var(--black); }
.pack h3 { font-size: var(--text-ml); line-height: 1.2; }
.pack h4 { font-size: var(--text-md); line-height: 1.2; }
.pack-link {
  color: var(--grain);
  font-size: var(--text-sm);
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.pack-link:hover { color: var(--white); }

.more-title { margin: var(--s-8) 0 var(--s-3); }

.pack-soon {
  justify-content: center;
  padding: var(--s-3);
  aspect-ratio: auto;
  border: 1px dashed var(--grain);
  border-radius: var(--radius);
}
.pack-soon p:not(.eyebrow) { color: var(--grain); font-size: var(--text-sm); }

.all-packs { margin-top: var(--s-6); }
.all-packs a {
  font-weight: 700;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.all-packs a:hover { color: var(--orange); }

/* Featured galleries: a two-column masonry of one pack's photos, then its story and link.
   Modeled on an editorial portfolio layout; the photos do the talking. */
.gallery { padding-block: var(--s-8); border-top: 1px solid var(--line); }
.gallery-grid { columns: 1; column-gap: var(--s-2); }
@media (min-width: 640px) {
  .gallery-grid { columns: 2; }
}
.gallery-grid figure {
  margin: 0 0 var(--s-2);
  break-inside: avoid;
}
.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--line);
}
.gallery-copy {
  display: grid;
  gap: var(--s-2);
  max-width: 40rem;
  margin-top: var(--s-4);
}
.gallery-copy h2 {
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-transform: uppercase;
}
.gallery-copy p:not(.eyebrow) { color: var(--grain); font-size: var(--text-ml); }
.gallery-link {
  justify-self: start;
  font-weight: 700;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.gallery-link:hover { color: var(--orange); }

/* How it works */
.how { padding-block: var(--s-8); border-top: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li { display: grid; gap: var(--s-1); align-content: start; }
.step-num {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1;
  color: var(--grain);
}
.steps h3 { font-size: var(--text-md); }
.steps p { color: var(--grain); font-size: var(--text-sm); max-width: 36ch; }

/* Signup: the one Film Base section, black on cream */
.signup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: var(--s-6);
  align-items: end;
  margin: var(--s-8) var(--gutter);
  padding: var(--s-8) var(--s-4);
  border-radius: var(--radius);
  background: var(--film-base);
  color: var(--black);
}
.signup .eyebrow { color: #4d4a44; } /* 5.9:1 on Film Base */
.signup-copy { display: grid; gap: var(--s-2); }
.signup-copy p:not(.eyebrow) { max-width: 44ch; }

.signup-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-1); min-width: 0; }
.signup-form label { font-size: var(--text-sm); font-weight: 700; }
.signup-row { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.signup-row input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--s-2);
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font: inherit;
  transition: border-color 150ms ease;
}
.signup-row input:hover { border-color: var(--grain); }
.signup-row input:focus-visible { border-color: var(--orange); outline-offset: 1px; }
.signup-row input[aria-invalid="true"] { border-color: var(--error); }
.signup-row input:disabled { opacity: 0.55; cursor: not-allowed; }
.signup-row input::placeholder { color: var(--grain); opacity: 1; } /* 5.3:1 on black */

.signup .signup-row input { background: var(--white); color: var(--black); border-color: #8a8478; }
.signup .signup-row input:hover { border-color: var(--black); }
.signup .signup-row input::placeholder { color: #6b6b6b; } /* 5.3:1 on white */

.form-status { font-size: var(--text-sm); }
.form-status[data-state="error"] { color: var(--error); }
.signup .form-status[data-state="error"] { color: #a3300f; } /* 4.7:1 on Film Base */
.form-status a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}
.form-note { color: var(--grain); font-size: var(--text-xs); }
.signup .form-note { color: #4d4a44; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-6) var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--grain);
  font-size: var(--text-sm);
}
.site-footer .brand img { width: auto; height: 28px; }
.site-footer nav { display: flex; gap: var(--s-3); }
.site-footer nav a {
  color: var(--grain);
  text-decoration: none;
  transition: color 150ms ease;
}
.site-footer nav a:hover { color: var(--white); }
.fine { font-size: var(--text-xs); }

/* Thank-you page, reached from the confirm button in Kit's email */
.thanks {
  display: grid;
  justify-items: start;
  gap: var(--s-3);
  max-width: 40rem;
  padding: var(--s-8) var(--gutter) var(--s-12);
}
.thanks h1 {
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.thanks .lede { margin-top: 0; }
.code-card {
  display: grid;
  justify-items: start;
  gap: var(--s-1);
  width: 100%;
  padding: var(--s-3);
  border: 1px dashed var(--grain);
  border-radius: var(--radius);
}
.code-label { color: var(--grain); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.code {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: 0.08em;
  user-select: all;
}
.code-copy { border: 1px solid var(--grain); background: transparent; color: var(--white); }
.code-copy:hover { border-color: var(--white); }
.thanks-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.thanks-back { color: var(--white); font-size: var(--text-sm); text-underline-offset: 3px; }
