/* ============================================================
   CHI-CAL ADVENTURES — design tokens & components
   Palette: deep lake navy, warm cream, sunset gold
   ============================================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1.5rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* Surfaces — warm cream */
  --color-bg: #faf7f1;
  --color-surface: #fffdf9;
  --color-surface-offset: #f2ede3;
  --color-divider: #e4ddd0;
  --color-border: oklch(0.35 0.03 250 / 0.14);

  /* Ink */
  --color-text: #1d2431;
  --color-text-muted: #5a6373;
  --color-text-faint: #8f97a5;
  --color-text-inverse: #f7f3ea;

  /* Deep lake navy (dark sections) */
  --color-deep: #16222e;
  --color-deep-2: #1d3040;
  --color-deep-border: oklch(0.95 0.02 90 / 0.14);

  /* Accents */
  --color-primary: #1d3d4d;        /* lake navy — buttons, links */
  --color-primary-hover: #122b38;
  --color-accent: #c98a3a;         /* sunset gold */
  --color-accent-soft: #e9b86e;
  --color-waterline: #8fa9b8;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.25 0.02 250 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.25 0.02 250 / 0.09);
  --shadow-lg: 0 12px 32px oklch(0.25 0.02 250 / 0.13);

  --content-default: 1080px;
  --content-narrow: 680px;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', Arial, sans-serif;
}

/* ============ Base helpers ============ */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}

.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-4);
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.skip-link:focus {
  top: var(--space-3);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.13 0.02 250 / 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(0.95 0.02 90 / 0.1);
}

.header-inner {
  max-width: var(--content-default);
  margin-inline: auto;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-inverse);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--color-accent-soft);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-name em {
  font-style: italic;
  color: var(--color-accent-soft);
  margin-left: 0.35em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  color: oklch(0.95 0.02 90 / 0.85);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a:hover {
  color: #fff;
}

.site-nav .nav-cta {
  color: var(--color-deep);
  background: var(--color-accent-soft);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full, 9999px);
  font-weight: 600;
}
.site-nav .nav-cta:hover {
  background: #f0c784;
}

.nav-toggle {
  display: none;
  color: var(--color-text-inverse);
  padding: var(--space-2);
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-deep);
    border-bottom: 1px solid var(--color-deep-border);
    padding: var(--space-2) var(--space-5) var(--space-4);
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: var(--space-3) 0;
    font-size: var(--text-base);
  }
  .site-nav .nav-cta {
    text-align: center;
    margin-top: var(--space-2);
  }
}

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

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-deep);
}

.hero-scene {
  position: absolute;
  inset: 0;
}
.hero-scene svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding: var(--space-24) var(--space-5) clamp(var(--space-16), 10vh, var(--space-24));
}

.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--color-accent-soft);
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: 1.05;
  color: #f7f3ea;
  max-width: 16ch;
  margin-bottom: var(--space-5);
}

.hero-lede {
  font-size: var(--text-lg);
  font-weight: 300;
  color: oklch(0.92 0.02 90 / 0.85);
  max-width: 44ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

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

.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full, 9999px);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-accent-soft);
  color: var(--color-deep);
}
.btn-primary:hover {
  background: #f0c784;
}

.btn-ghost {
  border-color: oklch(0.95 0.02 90 / 0.4);
  color: #f7f3ea;
}
.btn-ghost:hover {
  border-color: oklch(0.95 0.02 90 / 0.8);
  background: oklch(0.95 0.02 90 / 0.08);
}

.btn-ghost-dark {
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-ghost-dark:hover {
  border-color: var(--color-text-faint);
}

.btn-wide {
  width: 100%;
}

/* ============ Section headers ============ */

.kicker {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.kicker-light {
  color: var(--color-accent-soft);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1.12;
  max-width: 22ch;
  margin-bottom: var(--space-4);
}

.section-lede {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  font-weight: 300;
  max-width: 52ch;
}

/* ============ Story ============ */

.story {
  background: var(--color-bg);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

@media (min-width: 900px) {
  .story-grid {
    grid-template-columns: 5fr 7fr;
  }
  .story-art {
    order: 2;
  }
}

.story-art svg {
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

.story-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.story-copy .story-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}

/* ============ Charters ============ */

.charters {
  background: var(--color-surface-offset);
}

.section-head {
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-12));
}

.charter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .charter-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .charter-feature {
    grid-column: span 4;
    grid-row: span 2;
  }
  .charter-grid > .charter-card:not(.charter-feature) {
    grid-column: span 2;
  }
}

.charter-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

.charter-tag {
  align-self: flex-start;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--color-deep);
  background: var(--color-accent-soft);
  border-radius: 9999px;
  padding: var(--space-1) var(--space-3);
}

.charter-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-lg);
}

.charter-card p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.charter-list {
  list-style: none;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.charter-list li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  position: relative;
}
.charter-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ============ Beyond ============ */

.beyond {
  background: var(--color-deep);
  color: var(--color-text-inverse);
}

.beyond-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
}

@media (min-width: 900px) {
  .beyond-inner {
    grid-template-columns: 6fr 5fr;
    align-items: start;
  }
}

.beyond-copy p {
  color: oklch(0.9 0.02 90 / 0.75);
  max-width: 46ch;
}

.beyond-list {
  display: flex;
  flex-direction: column;
}

.beyond-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-deep-border);
}
.beyond-item:last-child {
  border-bottom: 1px solid var(--color-deep-border);
}

.beyond-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-accent-soft);
  min-width: 2.4ch;
  line-height: 1.4;
}

.beyond-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.beyond-item p {
  font-size: var(--text-sm);
  color: oklch(0.9 0.02 90 / 0.65);
}

/* ============ Inquire ============ */

.inquire {
  background: var(--color-bg);
}

.inquire-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
}

@media (min-width: 900px) {
  .inquire-inner {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

.inquire-copy p {
  color: var(--color-text-muted);
  max-width: 40ch;
}

.inquire-form,
.form-result {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  box-shadow: var(--shadow-md);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 620px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3);
  background: var(--color-surface);
  font-size: var(--text-base);
  min-height: 44px;
  width: 100%;
}
.field textarea {
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}
.field input[aria-invalid='true'],
.field select[aria-invalid='true'] {
  border-color: #b3403a;
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
  text-align: center;
}

/* Form result */
.form-result {
  border: 1px solid var(--color-divider);
}

.form-result h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.result-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

#result-text {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  padding: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  resize: vertical;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

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

.site-footer {
  background: var(--color-deep);
  color: var(--color-text-inverse);
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-deep-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.footer-brand .brand-mark {
  color: var(--color-accent-soft);
}

.footer-line {
  color: oklch(0.9 0.02 90 / 0.7);
  font-size: var(--text-sm);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.footer-nav a {
  color: oklch(0.9 0.02 90 / 0.8);
  text-decoration: none;
  font-size: var(--text-sm);
}
.footer-nav a:hover {
  color: #fff;
}

.footer-small {
  font-size: var(--text-xs);
  color: oklch(0.9 0.02 90 / 0.45);
}

/* ============ Reveal on scroll ============ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
