/* ==========================================================================
   Snowbasin Cloud — site stylesheet
   Editorial, alpine-themed design. No external fonts or assets: system
   font stacks only, so the site loads fully self-contained.
   ========================================================================== */

:root {
  --ink: #14212f;
  --ink-soft: #3d4f61;
  --ink-faint: #64778a;
  --paper: #f5f8fb;
  --snow: #ffffff;
  --line: #dbe4ec;
  --sky-deep: #0e2a43;
  --sky-mid: #1d4a6e;
  --sky-light: #dceaf5;
  --ice: #2f7fb5;
  --ice-dark: #245f88;
  --pine: #2f5d50;
  --sun: #d98a3d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(20 33 47 / 0.06), 0 8px 24px rgb(20 33 47 / 0.08);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ice-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--ice);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--snow);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
  padding-block: 0.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-name .brand-accent {
  color: var(--ice);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: var(--snow);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.98rem;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--sky-light);
}

.site-nav a[aria-current="page"] {
  color: var(--snow);
  background: var(--sky-mid);
}

@media (max-width: 47rem) {
  .nav-toggle {
    display: inline-flex;
  }
  /* JS adds .js to <html>; without JS the menu simply stays visible. */
  .js .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 0.75rem;
  }
  .js .nav-open .site-nav {
    display: flex;
  }
  .site-nav a {
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  color: var(--snow);
  overflow: hidden;
  background: var(--sky-deep);
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgb(10 26 42 / 0.55) 0%,
    rgb(10 26 42 / 0.35) 45%,
    rgb(10 26 42 / 0.78) 100%
  );
}

.hero-inner {
  padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 10vw, 7rem);
  max-width: 46rem;
}

.hero .eyebrow {
  color: #bcd9ef;
}

.hero h1 {
  color: var(--snow);
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  text-wrap: balance;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.35);
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #e4eef7;
  max-width: 40rem;
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.4);
}

.hero-credit,
.figure-credit {
  font-size: 0.78rem;
  color: #b9cddd;
}

.hero-credit {
  position: absolute;
  right: 0.9rem;
  bottom: 0.5rem;
  margin: 0;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.page-hero {
  background: linear-gradient(180deg, var(--sky-deep), var(--sky-mid));
  color: var(--snow);
  position: relative;
  overflow: hidden;
}

.page-hero .hero-inner {
  padding: clamp(2.8rem, 7vw, 4.5rem) 0;
}

.page-hero h1 {
  color: var(--snow);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
}

.page-hero p {
  color: #dbe9f5;
  max-width: 44rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Shared building blocks
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice-dark);
  margin-bottom: 0.9rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--sun);
  color: #24160a;
}

.btn-primary:hover {
  background: #e59a4f;
  color: #24160a;
}

.btn-ghost {
  border-color: rgb(255 255 255 / 0.55);
  color: var(--snow);
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.12);
  color: var(--snow);
}

.section {
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.section-alt {
  background: var(--snow);
  border-block: 1px solid var(--line);
}

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

.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

.lede {
  font-size: 1.16rem;
  color: var(--ink-soft);
}

.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
}

.card {
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1.3rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card h3 {
  font-size: 1.28rem;
  margin-bottom: 0.1rem;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.99rem;
  margin-bottom: 0.6rem;
}

.card .card-link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}

.stat-band {
  background: var(--sky-deep);
  color: var(--snow);
  padding: 2.2rem 0;
}

.stat-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  display: block;
  color: #cfe6f7;
}

.stat-label {
  font-size: 0.9rem;
  color: #9fbdd4;
}

/* --------------------------------------------------------------------------
   Article / prose
   -------------------------------------------------------------------------- */

.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 2.4em;
  padding-top: 1.2rem;
}

.prose h2::before {
  content: "";
  display: block;
  width: 3.2rem;
  height: 3px;
  background: var(--sun);
  border-radius: 2px;
  margin-bottom: 1.05rem;
}

.prose h3 {
  font-size: 1.28rem;
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin: 0 0 1.1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.9rem 1.3rem;
  border-left: 4px solid var(--ice);
  background: var(--sky-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
  font-style: italic;
}

.prose figure {
  margin: 2em 0;
}

.prose figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose figcaption,
.figure-credit {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
  line-height: 1.45;
}

.note {
  background: #fdf3e7;
  border: 1px solid #f0d9bd;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 1.6em 0;
  color: #5f4426;
  font-size: 0.98rem;
}

.article-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

@media (min-width: 64rem) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
  }
}

.toc {
  border: 1px solid var(--line);
  background: var(--snow);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  align-self: start;
  position: sticky;
  top: 5.2rem;
  font-size: 0.95rem;
}

.toc h2 {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.toc li {
  margin-bottom: 0.45em;
}

.toc a {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 1.5em 0;
  padding: 0;
  border-left: 3px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.35rem 1.6rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 0.4rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--ice);
  border: 3px solid var(--paper);
}

.timeline .year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sky-mid);
  display: block;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Diagrams & tables
   -------------------------------------------------------------------------- */

.diagram {
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.diagram svg {
  width: 100%;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.97rem;
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--sky-light);
  color: var(--sky-deep);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Photo strip
   -------------------------------------------------------------------------- */

.photo-duo {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin: 2em 0;
}

.photo-duo figure {
  margin: 0;
}

.photo-duo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--sky-deep);
  color: #c3d6e5;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding: 3rem 0 2rem;
}

.site-footer h2 {
  color: var(--snow);
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.site-footer a {
  color: #9ec7e4;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45em;
}

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.14);
  padding: 1.2rem 0 1.6rem;
  font-size: 0.85rem;
  color: #8fa9bd;
}

.footer-bottom p {
  margin-bottom: 0.35em;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  text-align: center;
  padding: clamp(4rem, 14vw, 8rem) 0;
}

.error-page h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.error-page p {
  color: var(--ink-soft);
  max-width: 32rem;
  margin-inline: auto;
}
