@import url('tokens.css');

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

html {
  scroll-behavior: smooth;
}

body.site-page {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.12;
  margin: 0;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* —— Header (matches homepage landing-header) —— */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 0.125rem;
  padding-inline: 1rem;
  background: color-mix(in oklch, var(--card) 50%, var(--bg));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.landing-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 2.5rem;
  min-height: 2.5rem;
  flex-wrap: nowrap;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}

.landing-brand-logo-slot {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.landing-brand-logo-slot .landing-brand-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.75rem;
  height: 3.75rem;
  transform: translate(-50%, -50%);
  object-fit: contain;
  margin: 0;
  pointer-events: none;
}

.landing-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.0625rem;
  min-width: 0;
}

.landing-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  white-space: nowrap;
}

.landing-brand small {
  display: block;
  font-family: var(--serif);
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--muted-fg);
  white-space: nowrap;
}

.landing-header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 0.85rem;
  font-size: 0.8125rem;
}

.landing-header-nav a {
  color: var(--muted-fg);
  text-decoration: none;
  font-weight: 500;
}

.landing-header-nav a:hover,
.landing-header-nav a.active,
.landing-header-nav a[aria-current='page'] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary);
  color: var(--primary-fg);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.landing-header-cta:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* Footer brand (separate from header) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.brand small {
  font-family: var(--serif);
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--muted-fg);
  white-space: nowrap;
}

/* —— Page hero —— */
.mini-hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
  background: var(--hero-overlay),
    url('assets/images/forest-fall.jpeg') center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.mini-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}

.mini-hero .container {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.mini-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.mini-hero .lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 auto 1.5rem;
  max-width: 36rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: transparent;
}

.mini-hero .btn:not(.primary) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

/* —— Sections —— */
.section {
  padding: 4rem 0;
}

.section.alt {
  background: color-mix(in oklch, var(--card) 55%, var(--bg));
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin-bottom: 0.75rem;
}

.muted {
  color: var(--muted-fg);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 85%, var(--fg) 6%);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--primary);
}

.icon svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card.visual {
  position: relative;
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #fff;
  padding: 1.25rem;
}

.card.visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--img) center / cover;
  opacity: 0.55;
}

.card.visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0.2 0.05 265 / 0.85), transparent 55%);
}

.card.visual > * {
  position: relative;
  z-index: 1;
}

.card.visual h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.flow .card::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 800;
  font-family: var(--sans);
  background: color-mix(in oklch, var(--secondary) 45%, var(--card));
  color: var(--fg);
}

.flow {
  counter-reset: step;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.price strong {
  font-family: var(--serif);
  font-size: 2.25rem;
}

.price-card {
  display: flex;
  flex-direction: column;
}

.price-card .btn {
  margin-top: auto;
}

.price-card.featured {
  outline: 2px solid color-mix(in oklch, var(--primary) 35%, transparent);
  box-shadow: var(--shadow-lg);
}

ul.clean {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

ul.clean li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--muted-fg);
  border-top: 1px solid var(--border);
}

ul.clean li::before {
  content: '✓';
  margin-right: 0.5rem;
  color: var(--primary);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: center;
}

.image-panel {
  min-height: 18rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, oklch(0.35 0.08 265 / 0.08), oklch(0.35 0.08 265 / 0.2)),
    var(--img) center / cover;
  box-shadow: var(--shadow);
}

.note {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 3px solid color-mix(in oklch, var(--secondary) 70%, var(--primary));
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.wide {
  margin-top: 1.5rem;
}

.microcopy {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

/* —— Footer (compact, matches header chrome) —— */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 50%, var(--bg));
  padding: 0.5rem 1rem;
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 2.25rem;
  flex-wrap: wrap;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}

.site-footer-brand img {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
  flex-shrink: 0;
}

.site-footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.12;
}

.site-footer-brand strong {
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-footer-brand small {
  font-family: var(--serif);
  font-size: 0.6875rem;
  font-weight: 500;
  font-style: italic;
  color: var(--muted-fg);
  white-space: nowrap;
}

.site-footer-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.site-footer-copy {
  white-space: nowrap;
}

.site-footer-sep {
  opacity: 0.4;
  user-select: none;
}

.site-footer-nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.site-footer-nav a {
  color: var(--muted-fg);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.site-footer-nav a:hover,
.site-footer-nav a.active,
.site-footer-nav a[aria-current='page'] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— CTA band (reuse on inner pages) —— */
.page-cta {
  margin: 2rem 0 0;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    color-mix(in oklch, var(--primary) 6%, var(--bg)),
    var(--card),
    color-mix(in oklch, var(--secondary) 20%, var(--bg))
  );
}

.page-cta h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-cta p {
  color: var(--muted-fg);
  margin: 0 auto 1.25rem;
  max-width: 32rem;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .grid.two,
  .grid.three,
  .grid.four,
  .split {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .landing-header-nav a:not(.landing-header-cta) {
    display: none;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--max), calc(100% - 1.75rem));
  }

  .mini-hero {
    padding: 2.75rem 0 2.25rem;
  }

  .site-footer-inner {
    align-items: flex-start;
  }

  .site-footer-bar {
    width: 100%;
  }
}
