/* Sombra brand kit: see brand/BRAND.md */
:root {
  --black: #000000;
  --bg: #0c0c0c;          /* page background: softer than pure black behind white text */
  --white: #ffffff;
  --light: #ffffff;       /* text on black */
  --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: 1rem;
  --text-ml: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --text-lg: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  --text-xl: clamp(2rem, 1.5rem + 1.8vw, 2.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: 0;            /* sharp corners everywhere */
  --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(--bg);
  color: var(--light);
  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: 500; }
p { margin: 0; }
a { color: inherit; }

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

/* Small labels: plain Inter Regular, sentence case, no tracking, high contrast */
.eyebrow {
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--grain);
}

h2 {
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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: 0;
  font: 500 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); }
/* Secondary: outlined, for repeat actions like the header offer. Orange stays for the page's one main action. */
.button-secondary { background: transparent; color: var(--light); box-shadow: inset 0 0 0 1px var(--light); }
.button-secondary:hover { background: var(--light); color: var(--black); }
.button-small { min-height: 44px; 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-1) var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; flex-shrink: 0; }
.site-header .brand, .site-footer .brand { padding-block: 10px; margin-block: -10px; }
.site-header .brand img { width: auto; height: 32px; }
.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--text-sm);
}
.site-header nav a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;   /* tap target, Apple HIG minimum */
  color: var(--grain);
  text-decoration: none;
  transition: color 150ms ease;
}
.site-header nav a:not(.button):hover { color: var(--light); }

/* Phones: logo and button on top, page links in a row underneath */
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
  .site-header .brand img { height: 24px; }
  .site-header nav { display: contents; }
  .site-header nav a:not(.button) { order: 3; }
  .site-header nav a:not(.button):first-child { margin-left: 0; }
  .site-header nav .button { order: 2; }
  .site-header::after { content: ""; order: 2; flex-basis: 100%; }
}

/* 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 - var(--header-h, 61px)), 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); }
/* Big poster headline: Extra Bold, all caps, packed tight */
.hero h1 {
  font-size: clamp(2rem, 1rem + 3.6vw, 4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  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: 500; }
.hero-alt { color: var(--grain); font-size: var(--text-sm); }
.hero-alt a {
  color: var(--light);
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.hero-alt a:hover { color: var(--grain); }

/* 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: 0;
  background: var(--bg);
}
/* 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: 500;
  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: 0;
  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 { 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 h3 { font-size: var(--text-ml); line-height: 1.2; }
.pack h4 { font-size: var(--text-md); line-height: 1.2; }
.pack-link {
  /* grow the tap target to 44px without moving the layout */
  padding-block: 10px;
  margin-block: -10px;
  color: var(--grain);
  font-size: var(--text-sm);
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.pack-link:hover { color: var(--light); }


.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: 500;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.all-packs a:hover { color: var(--grain); }

/* 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: 500;
  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: 500;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.gallery-link:hover { color: var(--grain); }

/* 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: 500;
  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; }

/* FAQ: native details, no script */
.faq { padding-block: var(--s-8); border-top: 1px solid var(--line); }
.faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
  padding-block: var(--s-2);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: var(--text-ml); font-weight: 400; color: var(--grain); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover::after { color: var(--light); }
.faq details p { padding-bottom: var(--s-3); color: var(--grain); max-width: 60ch; }

/* 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: 500; }
.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: 0;
  background: var(--bg);
  color: var(--light);
  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: 500;
  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; flex-wrap: wrap; gap: 0 var(--s-3); }
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--grain);
  text-decoration: none;
  transition: color 150ms ease;
}
.site-footer nav a:hover { color: var(--light); }
.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: 500;
  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: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.code {
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.08em;
  user-select: all;
}
.code-copy { border: 1px solid var(--grain); background: transparent; color: var(--light); }
.code-copy:hover { border-color: var(--light); }
.thanks-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.thanks-back { color: var(--light); font-size: var(--text-sm); text-underline-offset: 3px; }

/* Pack pages: buy box (images left, details right), sticky section links, numbered sections */
.buy {
  display: grid;
  gap: var(--s-4);
  padding-block: var(--s-4) var(--s-6);
}
@media (min-width: 960px) {
  .buy { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; padding-top: var(--s-6); }
  .buy-box { position: sticky; top: calc(var(--header-h, 61px) + var(--s-3)); }
}
.buy-media { display: grid; gap: var(--s-1); min-width: 0; }
.buy-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.buy-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-1); }
.buy-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 150ms ease, border-color 150ms ease;
}
.buy-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.buy-thumb:hover { opacity: 1; }
.buy-thumb[aria-current="true"] { opacity: 1; border-color: var(--light); }
.buy-box { display: grid; gap: var(--s-2); align-content: start; }
.buy-box h1 {
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.buy-sub { color: var(--grain); font-size: var(--text-ml); max-width: 36ch; }
.buy-includes { margin: var(--s-1) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.buy-includes li { padding-block: var(--s-2); border-bottom: 1px solid var(--line); font-size: var(--text-sm); color: var(--grain); }
.buy-includes strong { color: var(--light); font-weight: 500; }
.buy-price { font-size: var(--text-ml); font-weight: 500; letter-spacing: -0.02em; margin-top: var(--s-1); }
.button-block { width: 100%; justify-content: center; }
.buy-trust { color: var(--grain); font-size: var(--text-sm); text-align: center; }

.pack-nav {
  position: sticky;
  top: var(--header-h, 61px);
  z-index: 5;
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  padding: 0 var(--gutter);
  background: var(--bg);
  border-block: 1px solid var(--line);
  font-size: var(--text-sm);
}
@media (max-width: 640px) { .pack-nav { top: 0; position: relative; } }
.pack-nav a { display: inline-flex; align-items: center; min-height: 56px; color: var(--grain); text-decoration: none; white-space: nowrap; }
.pack-nav a:hover { color: var(--light); }

.pack-section { padding-block: var(--s-8); border-top: 1px solid var(--line); scroll-margin-top: 140px; }
.pack-section:first-of-type { border-top: 0; }
.pack-section h2 {
  max-width: 22ch;
  margin: var(--s-1) 0 var(--s-4);
  font-size: var(--text-lg);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pack-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (min-width: 960px) { .pack-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pack-row figure { margin: 0; }
.pack-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--s-2);
  margin: 0 0 var(--s-4);
  padding: 0;
  list-style: none;
}
.works-grid > li { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); }
.works-grid h3 { font-size: var(--text-md); margin-bottom: var(--s-1); }
.works-grid p, .pack-aside { color: var(--grain); font-size: var(--text-sm); max-width: 60ch; }
.pack-section .faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
.pack-section details { border-bottom: 1px solid var(--line); }

/* Inner pages: packs, install guide, contact */
.site-header nav a[aria-current="page"] { color: var(--light); }
.page-head { display: grid; gap: var(--s-2); justify-items: start; padding-block: var(--s-8) var(--s-4); }
.page-head h1 {
  max-width: 16ch;
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-head .lede { margin-top: 0; }
.packs-all { padding-block: var(--s-4) var(--s-8); }
.pack-name { font-size: var(--text-md); line-height: 1.2; }
.pack-meta { color: var(--grain); font-size: var(--text-sm); }
.steps-list { margin: var(--s-2) 0; padding-left: 1.2em; display: grid; gap: var(--s-1); color: var(--light); font-size: var(--text-sm); }
.contact-value { color: var(--light) !important; font-size: var(--text-md) !important; font-weight: 500; margin-bottom: var(--s-1); user-select: all; }
.contact-value a, .pack-aside a, .faq details a { color: var(--light); text-underline-offset: 3px; }
