/* =========================================================================
   Coastward — rustbeltstandards.com/coastward
   Coastward's own space: its own palette, not the RBS navy/steel shell.
   Matches the Coastward card on the RBS homepage (Warm Paper, Ink Navy,
   Rust accent).
   ========================================================================= */

:root {
  --ink:        #1C2B39;
  --rust:       #BB4A2E;
  --teal:       #3E6E68;
  --gold:       #C89B3C;
  --paper:      #EDE7DA;

  /* Derived from the five brand colors above. */
  --ink-deep:   #15212C;
  --ink-soft:   #33465A;
  --ink-muted:  #5D6A75;
  --ink-line:   rgba(28, 43, 57, .14);
  --paper-2:    #F5F1E8;
  --paper-dim:  #A9B3BC;
  --dark-line:  rgba(237, 231, 218, .14);
  --rust-hover: #A53F25;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
          Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1160px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -0.022em; }
p, ul { margin: 0; }

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

/* Section anchors land below the sticky header. */
[id] { scroll-margin-top: 80px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 500;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-rust { background: var(--rust); color: #FFF; }
.btn-rust:hover { background: var(--rust-hover); }

.btn-line { border-color: rgba(28, 43, 57, .35); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }

.btn-sm { padding: 9px 16px; font-size: 14px; }

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

.cw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--dark-line);
}

.cw-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding-block: 12px;
}

.cw-brand-group { display: flex; align-items: center; gap: 18px; min-width: 0; }

.cw-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--paper);
}

.cw-brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(237, 231, 218, .16); }

.cw-brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }

.cw-by {
  padding-left: 18px;
  border-left: 1px solid var(--dark-line);
  color: var(--paper-dim);
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.cw-by:hover { color: var(--paper); }

.cw-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 30px); }

.cw-nav > a:not(.btn) {
  color: var(--paper-dim);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.cw-nav > a:not(.btn):hover { color: var(--paper); border-bottom-color: var(--gold); }

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

.cw-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 104px) clamp(88px, 11vw, 132px);
}

.cw-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.cw-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  box-shadow: 0 14px 30px -16px rgba(28, 43, 57, .55);
}

.cw-hero-stamp {
  margin-top: 30px;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cw-hero h1 {
  margin-top: 16px;
  font-size: clamp(2.5rem, 5.8vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

.cw-hero h1 span { color: var(--rust); }

.cw-hero-sub {
  margin-top: 24px;
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 30ch;
}

.cw-hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.cw-hero .shot { margin-inline: auto; max-width: 310px; }

/* Horizon line along the bottom of the hero, echoing the waves in the icon. */
.cw-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  width: 100%;
  height: 46px;
  pointer-events: none;
}

.nowrap { white-space: nowrap; }

.teal-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ===================== Screenshot placeholders =====================
   Every phone frame is a .shot. Until real screenshots land, it holds a
   clearly marked .shot-placeholder. To swap one in, replace the
   placeholder div with:  <img src="/assets/coastward/screenshots/NAME.png" alt="...">
   ================================================================== */

.shot {
  position: relative;
  width: 100%;
  aspect-ratio: 1179 / 2556;
  border-radius: 34px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid rgba(28, 43, 57, .2);
  box-shadow: 0 34px 60px -34px rgba(28, 43, 57, .45);
}

.shot img { width: 100%; height: 100%; object-fit: cover; }

.shot-placeholder {
  position: absolute;
  inset: 9px;
  border: 1.5px dashed rgba(28, 43, 57, .3);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  color: var(--ink-muted);
  background-image: repeating-linear-gradient(
    135deg, rgba(28, 43, 57, .045) 0 1px, transparent 1px 11px);
}

.shot-placeholder .mono { font-size: 10.5px; color: var(--rust); }

.shot-placeholder strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.shot-placeholder code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  word-break: break-all;
}

/* ======================= Why it exists ======================= */

.cw-why {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(64px, 9vw, 112px);
}

.cw-why-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.cw-why h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.cw-why-copy p {
  margin-top: 22px;
  color: #C5CCD2;
  font-size: 1.06rem;
  line-height: 1.68;
  max-width: 58ch;
}

.cw-why-copy p:first-of-type { margin-top: 26px; }

.cw-questions {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--dark-line);
}

.cw-questions li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--dark-line);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.cw-questions .mono { color: var(--gold); flex: none; width: 26px; }

.cw-questions-note {
  margin-top: 20px;
  color: var(--paper-dim);
  font-size: 15px;
}

.cw-questions-note strong { color: var(--paper); font-weight: 600; }

/* ========================== Features ========================== */

.cw-features { padding-block: clamp(64px, 9vw, 112px); }

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 20ch;
}

.section-head p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 54ch;
}

.cw-group-title {
  margin-top: clamp(52px, 7vw, 84px);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--teal);
}

.cw-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink-line);
}

/* Core features: alternating text + phone rows. */
.cw-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 56px);
}

.cw-feature + .cw-feature { border-top: 1px solid var(--ink-line); }

.cw-feature .shot { max-width: 260px; margin-inline: auto; }

.cw-feature.is-flipped .cw-feature-text { order: 2; }

.cw-feature-text { max-width: 440px; justify-self: start; }

.cw-feature-no { color: var(--rust); }

.cw-feature h4 {
  margin-top: 12px;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  letter-spacing: -0.028em;
}

.cw-feature p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

/* Trip-dashboard features: a tighter row of four. */
.cw-mini-grid {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}

.cw-mini .shot { border-radius: 26px; }
.cw-mini .shot-placeholder { border-radius: 19px; inset: 7px; padding: 10px; }

.cw-mini h4 {
  margin-top: 22px;
  font-size: 1.2rem;
  letter-spacing: -0.018em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cw-mini h4 .mono { color: var(--rust); font-size: 11px; }

.cw-mini p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ===================== Beta + roadmap ===================== */

.cw-status {
  background: var(--paper-2);
  border-top: 1px solid var(--ink-line);
  padding-block: clamp(64px, 9vw, 104px);
}

.cw-status-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.cw-status h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.028em;
}

.cw-status p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.66;
  max-width: 46ch;
}

.cw-roadmap {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  border-top: 1px solid var(--ink-line);
}

.cw-roadmap li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--ink-line);
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--ink);
}

.cw-roadmap li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  transform: translateY(-2px) rotate(45deg);
  background: var(--gold);
  border-radius: 1px;
}

/* ========================= Get involved ========================= */

.cw-cta {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(64px, 9vw, 104px);
  position: relative;
  overflow: hidden;
}

.cw-cta-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.cw-cta-icon { width: 88px; height: 88px; border-radius: 20px; border: 1px solid var(--dark-line); }

.cw-cta h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  letter-spacing: -0.032em;
}

.cw-cta p {
  margin-top: 16px;
  color: #C5CCD2;
  font-size: 1.1rem;
  max-width: 52ch;
}

.cw-cta p a {
  color: var(--paper);
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.cw-cta p a:hover { color: #FFF; }

.cw-cta-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.cw-cta .btn-line { border-color: var(--dark-line); color: var(--paper); }
.cw-cta .btn-line:hover { border-color: var(--paper-dim); }

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

.cw-footer {
  background: var(--ink-deep);
  color: var(--paper-dim);
  border-top: 1px solid var(--dark-line);
  padding-block: clamp(40px, 6vw, 56px) 28px;
  font-size: 14.5px;
}

.cw-footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--dark-line);
}

.cw-footer-brand { display: flex; align-items: center; gap: 11px; color: var(--paper); font-weight: 700; font-size: 16px; }
.cw-footer-brand img { width: 30px; height: 30px; border-radius: 7px; }

.cw-footer-parent {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 14px;
}
.cw-footer-parent img { width: 20px; height: 20px; border-radius: 4px; }
.cw-footer-parent:hover { color: var(--paper); }

.cw-footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: flex-start; }

.cw-footer-links a {
  color: var(--paper-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.cw-footer-links a:hover { color: var(--paper); border-bottom-color: var(--gold); }

.cw-footer-bottom {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: #7F8B96;
}

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

@media (max-width: 1000px) {
  .cw-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .cw-mini .shot { max-width: 250px; }
}

@media (max-width: 860px) {
  .cw-by { display: none; }
  .cw-hero-inner,
  .cw-why-inner,
  .cw-status-inner { grid-template-columns: minmax(0, 1fr); }
  .cw-hero .shot { max-width: 270px; margin-inline: 0; }
  .cw-feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cw-feature.is-flipped .cw-feature-text { order: 0; }
  .cw-feature .cw-feature-text { max-width: 560px; }
  .cw-feature .shot { max-width: 250px; margin-inline: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .cw-nav > a:not(.btn) { display: none; }
  .cw-header .wrap { min-height: 62px; }
  .cw-hero-icon { width: 64px; height: 64px; border-radius: 15px; }
  .cw-hero-actions .btn { flex: 1 1 auto; }
  .cw-hero .shot { max-width: 240px; margin-inline: auto; }
  .cw-feature .shot { max-width: 230px; margin-inline: auto; }

  /* Dashboard features go side-by-side: small phone, text beside it. */
  .cw-mini-grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .cw-mini {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
  }
  .cw-mini .shot { border-radius: 18px; }
  .cw-mini .shot-placeholder { inset: 5px; border-radius: 13px; padding: 6px; gap: 4px; }
  .cw-mini .shot-placeholder strong { font-size: 12px; }
  .cw-mini .shot-placeholder code { display: none; }
  .cw-mini h4 { margin-top: 0; }

  .cw-cta-inner { grid-template-columns: minmax(0, 1fr); }
  .cw-cta-icon { width: 64px; height: 64px; border-radius: 15px; }
  .cw-cta-actions .btn { flex: 1 1 auto; }
}
