/* Northfold components
   Additions on top of the luxury layout. Variables only, no hard-coded colours. */

body {
  font-size: var(--type-body);
  -webkit-font-smoothing: antialiased;
}

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

.glass {
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-highlight), var(--shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
}

.btn-buy,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}
.btn-buy {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-buy:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-raised);
  border-color: var(--text);
  color: var(--text);
}
.btn-buy[aria-disabled="true"],
.btn-buy[aria-disabled="true"]:hover {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Layout overrides */
.nowrap { white-space: nowrap; }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); }

h1, h2, h3 { font-weight: var(--weight-display); letter-spacing: var(--tracking-heading); }

/* Header */
.site-header {
  background: var(--glass-bg-solid);
  border-bottom-color: var(--glass-border);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
}
.site-header-inner { padding: 0.75rem 0; min-height: 68px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.site-nav { align-items: center; gap: 0.5rem 2rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); font-size: 0.9375rem; letter-spacing: 0; text-transform: none; }
.site-nav a:hover { color: var(--text); }
.nav-toggle { display: none; }

/* Hero */
.hero { overflow: hidden; }
.hero-image { position: absolute; inset: 0; max-height: none; aspect-ratio: auto; background: var(--field); }
.hero-text { position: relative; padding: clamp(72px, 10vw, 136px) 0 clamp(56px, 6vw, 88px); text-align: left; }
.hero h1 {
  max-width: 1100px;
  margin: 0 0 1.5rem;
  text-wrap: balance;
  font-size: var(--type-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.02;
}
.hero-lead { max-width: 46ch; margin: 0 0 2.25rem; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Before / after slider */
.section-compare { padding-top: 0; }
.compare {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  max-height: calc(100svh - 110px);
  width: 100%;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; pointer-events: none; }
.compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-label {
  position: absolute;
  bottom: 16px;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass-bg-solid);
  color: var(--text);
  font-size: var(--type-small);
}
.compare-label-before { left: 16px; }
.compare-label-after { right: 16px; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--text); }
.compare-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg-solid);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}
.compare-grip::before,
.compare-grip::after {
  content: "";
  border-block: 6px solid transparent;
}
.compare-grip::before { border-right: 7px solid var(--text); }
.compare-grip::after { border-left: 7px solid var(--text); }
.compare-range {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}
.compare-range:focus-visible ~ .compare-handle .compare-grip {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.compare-caption {
  display: grid;
  gap: 0.75rem 3rem;
  margin-top: clamp(32px, 4vw, 56px);
}
.compare-caption h2 { margin: 0; font-size: var(--type-h2); line-height: 1.06; }
.compare-caption p { max-width: 42ch; margin: 0; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }

@media (min-width: 800px) {
  .compare-caption { grid-template-columns: 1fr 1fr; align-items: end; }
}

/* Phones */
@media (max-width: 700px) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
  }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.5rem; }
  .js .site-nav.is-open { display: flex; }
  .hero-actions .btn-buy,
  .hero-actions .btn-ghost { flex: 1 1 100%; }
  .compare { aspect-ratio: 4 / 5; }
  .compare-img { object-position: top center; }
  .compare-grip { width: 48px; height: 48px; }
}

/* Shared section type */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-head { max-width: 1000px; margin-inline: 0; margin-bottom: clamp(40px, 5vw, 72px); text-align: left; }
.section-head h2 { max-width: none; margin: 0; margin-inline: 0; font-size: var(--type-h2); line-height: 1.06; }
.section-intro { margin: 1.25rem 0 0; max-width: 46ch; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }

/* Problem */
.section-problem h2 { max-width: 16ch; font-size: var(--type-h2); line-height: 1.06; }
.section-problem p { max-width: 46ch; margin: 1.5rem 0 0; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }

/* Project grid */
.work-grid { display: grid; gap: clamp(32px, 4vw, 56px) clamp(16px, 2.5vw, 32px); margin: 0; padding: 0; list-style: none; }
.work-link { display: block; border-radius: var(--radius); text-decoration: none; }
.work-image {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: 1rem 1.25rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--text-muted);
  font-size: var(--type-small);
}
.work-meta { padding-top: 1.25rem; }
.work-meta h3 { margin: 0 0 0.35rem; font-size: var(--type-h3); }
.work-meta p { max-width: 42ch; margin: 0 0 0.5rem; color: var(--text-muted); line-height: 1.5; }
.work-price { color: var(--text); font-weight: 600; }
.work-meta-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.work-meta-row h3 { margin: 0; font-size: 1.125rem; }
.work-meta-row span { color: var(--text-muted); font-size: var(--type-small); }

/* Steps */
.steps { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding-top: 1.25rem; border-top: 1px solid var(--border-strong); counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: 1.5rem; color: var(--accent); font-family: var(--font-display); font-size: var(--type-h3); font-weight: var(--weight-display); }
.steps h3 { margin: 0 0 0.5rem; font-size: var(--type-h3); }
.steps p { max-width: 34ch; margin: 0; color: var(--text-muted); line-height: 1.5; }

/* Collections */
.section-pricing { background: var(--field); }
.price-grid { display: grid; gap: 20px; }
.price-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 3vw, 40px); }
.price-card h3 { margin: 0 0 0.5rem; font-size: var(--type-h3); }
.price-card-feature { border-color: var(--accent); }
.price-includes { min-height: 3.2em; margin: 0 0 1.5rem; color: var(--text-muted); line-height: 1.5; }
.price-amount { margin: 0; color: var(--text); font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: var(--weight-display); letter-spacing: var(--tracking-heading); line-height: 1.1; }
.price-card .price-amount { margin-bottom: 1.5rem; }
.price-card .btn-buy { width: 100%; margin-top: auto; }
.price-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0.5rem; color: var(--text-muted); font-size: var(--type-small); }
.price-more:hover { color: var(--text); }

/* Founder */
.founder h2 { max-width: 18ch; font-size: var(--type-h2); line-height: 1.06; }
.founder > p:not(.eyebrow) { max-width: 46ch; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }
.social-list { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.social-list a { display: inline-flex; align-items: center; min-height: 44px; }
.social-list a:hover { color: var(--accent); }

/* FAQ */
.faq { display: grid; gap: 2rem; }
.faq h2 { margin: 0; font-size: var(--type-h2); line-height: 1.06; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 1rem 0; font-size: 1.125rem; font-weight: 500; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--text-muted); font-size: 1.5rem; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { max-width: 58ch; margin: 0 0 1.5rem; color: var(--text-muted); line-height: 1.6; }

/* Final CTA */
.section-final h2 { max-width: 14ch; margin: 0 0 2rem; font-size: var(--type-display); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); line-height: 1.02; }

/* Footer */
.site-footer { padding: clamp(48px, 6vw, 72px) 0 2rem; font-size: var(--type-small); letter-spacing: 0; text-align: left; }
.footer-grid { display: grid; align-items: start; gap: 1.5rem 3rem; }
.footer-grid nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-grid nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.footer-grid .logo { color: var(--text); }
.footer-grid p { margin: 0; }

@media (min-width: 700px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-grid p { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .work-grid-three { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .faq { grid-template-columns: 1fr 2fr; gap: 4rem; }
}

/* Shop and product pages */
.work-image:has(img) { padding: 0; overflow: hidden; background: var(--surface); }
/* product-cover: thumbnails carry their name, so show them uncropped */
.work-image:has(img[src*="product-"]) { aspect-ratio: 1376 / 768; }
.work-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-card[hidden] { display: none; }
.work-meta .product-hero .hero-text { padding-bottom: clamp(40px, 5vw, 64px); }
.hero-kicker { margin: 0 0 1.25rem; color: var(--text-muted); font-size: var(--type-small); }
.hero-kicker a { display: inline-flex; align-items: center; min-height: 44px; }
.product-hero .product-hero .hero-lead { margin-bottom: 1.5rem; }
.product-hero .product-hero .hero-actions { margin-top: 1.5rem; }
.work-image-hero { aspect-ratio: 16 / 9; }
.what-grid { display: grid; gap: 1rem 4rem; }
.what-grid h2 { margin: 0; font-size: var(--type-h2); line-height: 1.06; }
.what-grid p { max-width: 54ch; margin: 0; color: var(--text-muted); font-size: var(--type-lead); line-height: 1.5; }
.section-what { padding-top: 0; }
.inside-list { display: grid; gap: 0 clamp(24px, 4vw, 64px); margin: 0; padding: 0; list-style: none; }
.inside-list li { padding: 1.25rem 0; border-top: 1px solid var(--border); }
.inside-list h3 { margin: 0 0 0.35rem; font-size: var(--type-h3); }
.inside-list h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.inside-list h3 a:hover { color: var(--accent); }
.inside-list p { max-width: 46ch; margin: 0; color: var(--text-muted); line-height: 1.5; }
.bundle-list { margin: 0; padding: 0; list-style: none; }
.bundle-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; border-top: 1px solid var(--border-strong); font-size: var(--type-h3); font-family: var(--font-display); font-weight: var(--weight-display); letter-spacing: var(--tracking-heading); text-decoration: none; }
.bundle-list a:hover { color: var(--accent); }
.bundle-list li:last-child a { border-bottom: 1px solid var(--border-strong); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 48px); }
html:not(.js) .filters { display: none; }
.filter { min-height: 44px; padding: 0 1.25rem; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: transparent; color: var(--text-muted); font: inherit; cursor: pointer; }
.filter:hover { color: var(--text); border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

@media (min-width: 800px) {
  .what-grid { grid-template-columns: 1fr 2fr; }
  .inside-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 700px) {
  .work-grid.work-grid-three { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .work-grid.work-grid-three { grid-template-columns: repeat(3, 1fr); }
}

/* Legal pages */
.legal > * { max-width: 720px; }
.legal h2 { margin: 2.5rem 0 0.5rem; font-size: var(--type-h3); }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 1rem; color: var(--text-muted); line-height: 1.6; }

/* Final check additions */
.eyebrow { font-size: var(--type-small); }
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 20;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-small);
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }
.btn-buy,
.btn-ghost { transition: transform 0.15s ease-out, background-color 0.2s ease-out, color 0.2s ease-out; }
.btn-buy:hover,
.btn-ghost:hover { transform: translateY(-1px); }
.btn-buy:active,
.btn-ghost:active { transform: translateY(0) scale(0.98); }
.btn-buy[aria-disabled="true"]:active { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-buy,
  .btn-ghost { transition: none; }
  .btn-buy:hover,
  .btn-ghost:hover,
  .btn-buy:active,
  .btn-ghost:active { transform: none; }
}
