/* =====================================================================
 * Trail Status Pro — public site (trailstatuspro.com)
 * Mirrors the iOS app's design system: teal-on-near-black, system font,
 * generous whitespace, hairline borders. Apple-HIG spacing + Laws of UX
 * (clear hierarchy, one primary action per view, aesthetic-usability).
 * ===================================================================== */

:root {
  /* App palette — from Color+Brand.swift */
  --bg:          #0A0A0B;          /* appBackground */
  --bg-2:        #0e0f11;
  --surface:     #15171A;          /* cardSurface */
  --surface-2:   #1b1e22;
  --border:      rgba(255,255,255,0.08);
  --border-hi:   rgba(255,255,255,0.16);

  --teal:        #3FAEC0;          /* brandAccent */
  --teal-bright: #6FD0E0;          /* brandAccentText */
  --teal-deep:   #2E91A1;          /* brandAccentPressed */
  --teal-soft:   rgba(63,174,192,0.12);
  --teal-strong: rgba(63,174,192,0.28);
  --orange:      #E88A2F;          /* the "PRO" mark */
  --olive:       #93A33F;          /* the "STATUS" wordmark */

  /* Status (semantic, from TrailStatus) */
  --open:    #2B9D5B;
  --caution: #E0A22B;
  --closed:  #D8453A;

  --text:     #ffffff;             /* textPrimary */
  --text-dim: rgba(255,255,255,0.64);
  --text-mute:rgba(255,255,255,0.42);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r: 14px;
  --r-lg: 22px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* soft teal aurora at the top, fading to pure dark */
  background-image: radial-gradient(1200px 600px at 50% -200px, rgba(63,174,192,0.10), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--teal-bright); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; display: block; }
strong { color: var(--text); }

h1, h2, h3, h4 { color: var(--text); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal-bright); margin: 0 0 14px;
}
.lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--text-dim); max-width: 640px; }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-left: auto; margin-right: auto; }

/* --- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--teal); color: #04191d; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--teal-bright); color: #04191d; transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border-hi); }
.btn.secondary:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn.sm { padding: 9px 18px; font-size: 14px; }

/* --- Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; }

/* Stacked TRAIL / STATUS wordmark + vertical PRO pill. Two tight
   uppercase lines beside a rotated orange-outline pill, sized to sit
   in the compact sticky header (and reused in the footer). */
.wordmark { display: inline-flex; align-items: stretch; gap: 6px; }
.wm-lines {
  display: flex; flex-direction: column; justify-content: center;
  line-height: 0.86; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.01em; font-size: 16px;
}
.wm-trail { color: var(--text); }
.wm-status { color: var(--olive); }
.wm-pro {
  display: inline-flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  border: 2px solid var(--orange); color: var(--orange);
  border-radius: 7px; padding: 3px 2px;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 10px; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: #04191d; }
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links a.hide-sm { display: none; }
}

/* --- Sections -------------------------------------------------------- */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { margin-top: 16px; }

/* --- Home hero ------------------------------------------------------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-family: var(--mono); font-size: 12px; color: var(--text-mute); margin-top: 16px; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
}

/* --- Full-bleed photo hero (Home) ----------------------------------- */
.hero-photo {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-photo .bg {
  position: absolute; inset: 0;
  background-image: url("/assets/hero.jpg");
  background-size: cover; background-position: center 40%;
}
.hero-photo .scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.30) 0%, transparent 30%, rgba(10,10,11,0.35) 60%, rgba(10,10,11,0.92) 100%),
    radial-gradient(120% 80% at 20% 100%, rgba(10,10,11,0.55), transparent 60%);
}
.hero-photo .wrap { position: relative; padding-bottom: 72px; padding-top: 120px; }
.hero-photo h1 { max-width: 15ch; text-shadow: 0 2px 24px rgba(0,0,0,0.4); }
.hero-photo .lede { color: rgba(255,255,255,0.90); max-width: 30ch; margin: 20px 0 30px; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.hero-photo .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo .hero-note { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 16px; }

/* --- Device frame (phone) ------------------------------------------- */
.device {
  position: relative; margin: 0 auto; width: 100%; max-width: 300px;
  background: #000; border: 1px solid var(--border-hi);
  border-radius: 42px; padding: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(63,174,192,0.10),
              0 10px 40px rgba(63,174,192,0.12);
}
.device img { border-radius: 32px; width: 100%; }
.device.tilt { transform: rotate(-2deg); }

/* --- Feature rows (alternating) ------------------------------------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature-row .device { max-width: 280px; }
.feature-row.reverse .copy { order: 2; }
.feature-row.reverse .art { order: 1; }
.feature-row h2 { margin-bottom: 16px; }
.feature-row ul { padding-left: 0; list-style: none; margin: 20px 0 0; }
.feature-row li { padding-left: 26px; position: relative; margin: 10px 0; color: var(--text-dim); }
.feature-row li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 999px; background: var(--teal); }
@media (max-width: 880px) {
  .feature-row { grid-template-columns: 1fr; gap: 32px; text-align: center; padding: 40px 0; }
  .feature-row.reverse .copy { order: 1; } .feature-row.reverse .art { order: 2; }
  .feature-row ul { display: inline-block; text-align: left; }
}

/* --- Card grid ------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px;
}
.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft);
  display: grid; place-items: center; color: var(--teal); margin-bottom: 16px; font-size: 22px; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 15px; }

/* --- Status pills (to echo the app) --------------------------------- */
.pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #04191d; }
.pill.open { background: var(--open); color: #eafff2; }
.pill.caution { background: var(--caution); color: #2a1d02; }
.pill.closed { background: var(--closed); color: #fff0ef; }

/* --- Steps (how it works) ------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.step .n { counter-increment: step; font-family: var(--mono); color: var(--teal-bright); font-size: 14px; letter-spacing: 0.1em; }
.step .n::before { content: "0" counter(step); }
.step h3 { margin: 12px 0 8px; }
.step p { margin: 0; font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* --- Full-bleed band (brand art) ------------------------------------ */
.band { position: relative; padding: 120px 0; text-align: center; overflow: hidden; }
.band .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.band .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,0.55), rgba(10,10,11,0.82)); }
.band .wrap { position: relative; }

/* --- Give-back callout ---------------------------------------------- */
.callout { background: var(--teal-soft); border: 1px solid var(--teal-strong); border-radius: var(--r-lg); padding: 40px; text-align: center; }
.callout h2 { color: var(--teal-bright); }

/* --- Legal ----------------------------------------------------------- */
.legal { padding: 64px 0 40px; }
.legal .updated { font-family: var(--mono); color: var(--text-mute); font-size: 13px; }
.legal h1 { font-size: 34px; margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; margin: 24px 0 8px; }
.legal ul { padding-left: 22px; } .legal li { margin: 6px 0; }
.legal-note { background: var(--teal-soft); border: 1px solid var(--teal-strong); border-radius: var(--r); padding: 16px 18px; margin: 24px 0; }

/* --- Contact form ---------------------------------------------------- */
.form { max-width: 560px; margin: 0 auto; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--text-dim); }
.form input, .form textarea, .form select {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); font: inherit; font-size: 16px; padding: 12px 14px; width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--teal); }
.form .btn { justify-content: center; }
.form-note { font-size: 13px; color: var(--text-mute); text-align: center; }

/* --- Footer ---------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 48px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-mute); margin-bottom: 14px; font-weight: 700; }
.footer a { display: block; color: var(--text-dim); font-size: 15px; margin: 8px 0; }
.footer a:hover { color: var(--text); }
.footer .tagline { color: var(--text-dim); font-size: 15px; max-width: 280px; }
.footer .legalbar { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 22px; color: var(--text-mute); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
