/* =========================================================================
   Cairn River — stylesheet
   Edit the custom properties below to retune the palette and rhythm.
   ========================================================================= */

:root {
  /* ---- Colour palette -------------------------------------------------- */
  /* Warm off-white page background — paper, not screen-white */
  --bg:            #FAF7F2;
  /* Slightly darker surface for alternating sections */
  --surface:       #F1ECE3;
  /* Hairline borders, very soft */
  --border:        #E2DCD1;

  /* Deep slate body text — high contrast on --bg (passes WCAG AAA) */
  --text:          #1E2A30;
  /* Muted text for supporting copy (passes WCAG AA) */
  --text-muted:    #5E6A72;

  /* Deep moss-green accent for links, CTAs, the logomark.
     Earthy, calm, fits the cairn/trail metaphor (moss on stone, wooded path).
     Deliberately out of the financial-services-blue colour family. */
  --accent:        #3F5A3D;
  --accent-hover:  #2F4A2D;
  /* Very soft tint of the accent, used sparingly */
  --accent-soft:   #ECF0EA;

  /* ---- Type & rhythm --------------------------------------------------- */
  --font-sans:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure:       60ch;        /* comfortable reading width for prose */
  --page-max:      1080px;      /* outer page width */
  --radius:        6px;

  --space-1:       0.5rem;
  --space-2:       1rem;
  --space-3:       1.5rem;
  --space-4:       2.5rem;
  --space-5:       4rem;
  --space-6:       6rem;
}

/* =========================================================================
   Reset & base
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;     /* 17px base */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}

h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 var(--space-2); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); }

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

img, svg { display: block; max-width: 100%; }

/* =========================================================================
   Layout primitives
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.prose {
  max-width: var(--measure);
  color: var(--text);
}
.prose.muted { color: var(--text-muted); }

.section {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
}
.section-muted { background: var(--surface); }

.section-eyebrow,
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: var(--space-3); top: var(--space-3); }

/* =========================================================================
   Header
   ========================================================================= */

.site-header {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.brand-mark { color: var(--accent); flex: none; }
.brand-word { font-size: 1.0625rem; }

.site-nav {
  display: flex;
  gap: var(--space-3);
  margin-left: auto;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}
.site-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-lg { padding: 0.8rem 1.4rem; font-size: 1rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-5), 9vw, var(--space-6)) 0 var(--space-6);
}
/* Decorative topographic-contour background. Faded toward the left so it
   doesn't compete with the headline text. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('hero-bg.svg') no-repeat right center / auto 130%;
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 35%, transparent 80%);
          mask-image: linear-gradient(to left, #000 0%, #000 35%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero h1 {
  margin-bottom: var(--space-3);
}
.lede {
  max-width: var(--measure);
  font-size: 1.1875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* =========================================================================
   Feature list
   ========================================================================= */

.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}
.feature-list li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}
.feature-list h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}
.feature-list p {
  color: var(--text-muted);
  margin: 0;
  max-width: 48ch;
}

/* =========================================================================
   Product tour / screenshots
   ========================================================================= */

.product-tour {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.product-shot {
  margin: 0;
}

.product-shot-copy {
  max-width: var(--measure);
  margin-bottom: var(--space-3);
}
.product-shot-copy h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.product-shot-copy p {
  color: var(--text-muted);
  margin: 0;
}

/* Calm, product-led frame — hairline border, soft radius, gentle lift only */
.product-shot-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(30, 42, 48, 0.05);
}

.screenshot-image {
  width: 100%;
  height: auto;
  border-radius: 3px;
}

/* Supporting shots sit a touch narrower so the featured record stays dominant */
.product-shot:not(.product-shot-featured) {
  max-width: 860px;
}

/* =========================================================================
   Early access form
   ========================================================================= */

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

.early-access-form {
  max-width: 420px;
  margin-top: var(--space-3);
}

.early-access-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-2);
}

.early-access-form label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.early-access-form input[type="email"],
.early-access-form input[type="text"] {
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.early-access-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.early-access-form .form-helper {
  margin-top: var(--space-2);
  font-size: 0.875rem;
}

.form-message {
  margin: var(--space-2) 0 0;
  font-size: 0.9375rem;
  min-height: 1.4em;
}
.form-message-success { color: var(--accent); }
.form-message-error { color: #A33B3B; }

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0 var(--space-5);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
}
.footer-brand .brand-mark { color: var(--accent); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-left: auto;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); }
.footer-meta {
  width: 100%;
  margin: var(--space-2) 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* =========================================================================
   Cookie banner
   ========================================================================= */

/* The browser default [hidden]{display:none} loses to our display:flex below,
   so make the hidden attribute explicit for this element. */
.cookie-banner[hidden] { display: none; }

.cookie-banner {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  box-shadow: 0 6px 24px rgba(30, 42, 48, 0.08);
  z-index: 50;
}
.cookie-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  flex: 1 1 280px;
}
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

/* =========================================================================
   Legal pages
   ========================================================================= */

.legal {
  padding: var(--space-5) 0 var(--space-6);
}
.legal .container { max-width: 760px; }
.legal h1 { margin-bottom: var(--space-2); }
.legal h2 {
  font-size: 1.25rem;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}
.legal p, .legal li {
  color: var(--text);
  max-width: var(--measure);
}
.legal ul { padding-left: 1.2rem; }
.legal .updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 720px) {
  .site-nav { display: none; }
  .header-inner { gap: var(--space-2); }
  .header-actions { margin-left: auto; }
  .section { padding: var(--space-5) 0; }
  .feature-list { grid-template-columns: 1fr; }
  .footer-nav { margin-left: 0; width: 100%; }
  .hero::before {
    background-size: auto 110%;
    background-position: right -120px center;
    opacity: 0.65;
  }
}

@media (max-width: 420px) {
  .header-actions .btn-ghost { display: none; }
}
