/*
 * Wellspring: components
 * Every value comes from tokens.css. Load tokens.css first.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ws-white);
  color: var(--ws-text);
  font-family: var(--ws-sans);
  font-size: var(--ws-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ws-link); }
h1, h2, h3, h4 { margin: 0; font-family: var(--ws-serif); font-weight: var(--ws-weight-head); line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--ws-focus); }

.ws-container { width: 100%; max-width: var(--ws-container); margin: 0 auto; padding: 0 24px; }
.ws-narrow { max-width: var(--ws-narrow); margin: 0 auto; padding: 0 24px; }
.ws-section { padding: var(--ws-section) 0; }
.ws-section--mist { background: var(--ws-mist); }
.ws-section--sand { background: var(--ws-sand); }
.ws-section--sun { background: var(--ws-sun); }
.ws-section--ink { background: var(--ws-ink); color: var(--ws-white); }
.ws-section--ink .ws-soft { color: var(--ws-faint); }
.ws-center { text-align: center; }
.ws-center .ws-lead { margin-left: auto; margin-right: auto; }

.ws-label {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 var(--ws-text-label)/1.3 var(--ws-sans);
  text-transform: uppercase; letter-spacing: var(--ws-tracking-label);
}
.ws-label--soft { color: var(--ws-soft); }
.ws-label--rule::before { content: ""; width: 28px; height: 3px; background: var(--ws-sun); }
.ws-h1 { font-size: var(--ws-text-hero); line-height: 1.08; }
.ws-h2 { font-size: var(--ws-text-h2); }
.ws-h3 { font-size: var(--ws-text-h3); line-height: 1.25; }
.ws-lead { font-size: var(--ws-text-lead); line-height: 1.5; max-width: 620px; }
.ws-soft { color: var(--ws-soft); }
.ws-small { font-size: var(--ws-text-small); }
.ws-under { background: linear-gradient(transparent 72%, var(--ws-sun) 72%, var(--ws-sun) 94%, transparent 94%); padding: 0 .06em; }

/* ---------- Buttons ---------- */
.ws-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px;
  font: 700 14px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 0; border-radius: var(--ws-radius);
  background: var(--ws-sun); color: var(--ws-ink);
  transition: background .2s var(--ws-ease), color .2s, box-shadow .2s;
}
.ws-btn:hover { background: var(--ws-sun-deep); }
.ws-btn svg { width: 16px; height: 16px; flex: none; }
.ws-btn--ink { background: var(--ws-ink); color: var(--ws-white); }
.ws-btn--ink:hover { background: var(--ws-ink-2); }
.ws-btn--ghost { background: transparent; color: var(--ws-ink); box-shadow: inset 0 0 0 1px var(--ws-ink); }
.ws-btn--ghost:hover { background: var(--ws-ink); color: var(--ws-white); }
.ws-btn--light { background: transparent; color: var(--ws-white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.ws-btn--light:hover { background: var(--ws-white); color: var(--ws-ink); }
.ws-btn--sm { height: 42px; padding: 0 18px; font-size: 13px; }
.ws-btn--block { width: 100%; }
.ws-link { color: var(--ws-link); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--ws-sun); }
.ws-link:hover { border-bottom-color: var(--ws-link); }

/* ---------- Header ---------- */
.ws-header { position: sticky; top: 0; z-index: 20; background: var(--ws-white); border-bottom: var(--ws-line); }
.ws-header-inner { display: flex; align-items: center; gap: 40px; height: var(--ws-header); }
.ws-logo { display: inline-flex; align-items: center; gap: 10px; font: 500 22px/1 var(--ws-serif); letter-spacing: .02em; color: var(--ws-ink); text-decoration: none; white-space: nowrap; }
.ws-logo-mark { width: 18px; height: 26px; flex: none; }
.ws-nav { display: flex; gap: 32px; margin-right: auto; }
.ws-nav a { font: 600 var(--ws-text-label)/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label); color: var(--ws-ink); text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; }
.ws-nav a:hover, .ws-nav a.is-active { border-bottom-color: var(--ws-sun); }
.ws-header-actions { display: flex; align-items: center; gap: 24px; }
.ws-header-actions .ws-signin { font: 600 var(--ws-text-label)/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label); color: var(--ws-ink); text-decoration: none; white-space: nowrap; }

/* ---------- Hero with a drawn scene ---------- */
.ws-hero { position: relative; overflow: clip; min-height: 640px; display: flex; align-items: center; padding: 72px 0; color: var(--ws-white); background: var(--ws-lagoon); }
.ws-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.ws-hero .ws-container { position: relative; z-index: 2; }
.ws-hero-copy { max-width: 560px; text-align: center; }
.ws-hero-copy .ws-h1 { text-shadow: 0 2px 24px rgba(11, 92, 112, .35); }
.ws-hero-copy .ws-lead { margin: 18px auto 0; }
.ws-hero-plain { background: var(--ws-white); color: var(--ws-ink); min-height: 0; }

/* ---------- The pledge card (white card on a scene) ---------- */
.ws-pledge { margin-top: 36px; background: var(--ws-white); color: var(--ws-ink); border-radius: var(--ws-radius); box-shadow: var(--ws-shadow); text-align: left; }
.ws-pledge-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 40px; background: var(--ws-mist); border-bottom: var(--ws-line); }
.ws-pledge-tab { height: 34px; border: 0; border-radius: var(--ws-radius); background: transparent; font: 600 14px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--ws-soft); cursor: pointer; white-space: nowrap; }
.ws-pledge-tab.is-active { background: var(--ws-sun); color: var(--ws-ink); }
.ws-pledge-body { padding: 24px 16px 28px; }
.ws-pledge-body .ws-label { margin-bottom: 14px; }
.ws-pledge-note { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-size: var(--ws-text-small); }
.ws-pledge-note svg { width: 18px; height: 18px; flex: none; }

/* ---------- Segmented amount tiles ---------- */
.ws-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ws-tile { position: relative; }
.ws-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ws-tile span { display: flex; align-items: baseline; justify-content: center; gap: 4px; height: 50px; align-items: center; padding: 0 8px; border-radius: var(--ws-radius); background: var(--ws-mist); color: var(--ws-soft); font: 500 17px/1 var(--ws-sans); cursor: pointer; white-space: nowrap; transition: background .15s; }
.ws-tile span small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ws-tile:hover span { background: var(--ws-mist-2); }
.ws-tile input:checked + span { background: var(--ws-sun); color: var(--ws-ink); font-weight: 700; }
.ws-tile input:focus-visible + span { box-shadow: var(--ws-focus); }
.ws-tile--wide { grid-column: span 2; }

/* ---------- Cards, grids, stats ---------- */
.ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ws-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ws-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ws-card { background: var(--ws-white); border: var(--ws-line); border-radius: var(--ws-radius); padding: 32px; }
.ws-card--mist { background: var(--ws-mist); border-color: transparent; }
.ws-card--shadow { border-color: transparent; box-shadow: var(--ws-shadow-sm); }
.ws-card .ws-h3 { margin: 18px 0 10px; }
.ws-card-art { aspect-ratio: 16 / 10; margin: -32px -32px 24px; overflow: hidden; border-radius: var(--ws-radius) var(--ws-radius) 0 0; }
.ws-card-art svg { width: 100%; height: 100%; }
.ws-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ws-sun-soft); color: var(--ws-ink); }
.ws-icon svg { width: 24px; height: 24px; }
.ws-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.ws-split--flip > :first-child { order: 2; }
.ws-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.ws-stat-num { display: inline-block; font: 500 clamp(40px, 4.6vw, 60px)/1 var(--ws-serif); padding-bottom: 10px; border-bottom: 4px solid var(--ws-sun); }
.ws-stat-label { margin-top: 16px; color: var(--ws-soft); font-size: var(--ws-text-small); }
.ws-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--ws-radius); background: var(--ws-mist); font: 700 11px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.ws-badge--sun { background: var(--ws-sun); }
.ws-badge--lagoon { background: var(--ws-lagoon); color: var(--ws-white); }
.ws-quote { font: 400 clamp(26px, 3vw, 38px)/1.3 var(--ws-serif); font-style: italic; }
.ws-quote-by { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.ws-avatar { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ws-sun); color: var(--ws-ink); font: 600 17px/1 var(--ws-serif); flex: none; }
.ws-avatar--lagoon { background: var(--ws-lagoon); color: var(--ws-white); }
.ws-progress { height: 10px; background: var(--ws-mist-2); border-radius: var(--ws-radius-pill); overflow: hidden; }
.ws-progress i { display: block; height: 100%; background: var(--ws-sun); }
.ws-callout { display: flex; gap: 16px; padding: 24px; background: var(--ws-sun-soft); border-left: 4px solid var(--ws-sun); border-radius: var(--ws-radius); }

/* ---------- Forms ---------- */
.ws-form { display: grid; gap: 20px; }
.ws-field { display: grid; gap: 8px; }
.ws-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ws-input, .ws-select, .ws-textarea {
  width: 100%; height: 52px; padding: 0 16px;
  font: 400 16px/1.4 var(--ws-sans); color: var(--ws-text);
  background: var(--ws-white); border: 1px solid var(--ws-mist-2); border-radius: var(--ws-radius);
  transition: border-color .15s, box-shadow .15s;
}
.ws-textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.ws-input:focus, .ws-select:focus, .ws-textarea:focus { outline: none; border-color: var(--ws-lagoon); box-shadow: var(--ws-focus); }
.ws-hint { font-size: 13px; color: var(--ws-soft); }
.ws-check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--ws-text-small); color: var(--ws-soft); }
.ws-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ws-ink); flex: none; }
.ws-divider { display: flex; align-items: center; gap: 16px; color: var(--ws-faint); font: 600 12px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label); }
.ws-divider::before, .ws-divider::after { content: ""; flex: 1; height: 1px; background: var(--ws-mist-2); }

/* ---------- Pricing ---------- */
.ws-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: var(--ws-mist); border-radius: var(--ws-radius); }
.ws-toggle button { height: 38px; padding: 0 20px; border: 0; border-radius: var(--ws-radius); background: transparent; font: 600 13px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ws-soft); cursor: pointer; white-space: nowrap; }
.ws-toggle button.is-active { background: var(--ws-sun); color: var(--ws-ink); }
.ws-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.ws-plan { display: flex; flex-direction: column; gap: 20px; padding: 36px 32px; background: var(--ws-white); border: var(--ws-line); border-radius: var(--ws-radius); }
.ws-plan--featured { border: 0; box-shadow: var(--ws-shadow); border-top: 6px solid var(--ws-sun); }
.ws-plan-name { font: 500 26px/1.2 var(--ws-serif); }
.ws-price { display: flex; align-items: baseline; gap: 6px; }
.ws-price b { font: 500 52px/1 var(--ws-serif); }
.ws-price span { color: var(--ws-soft); font-size: var(--ws-text-small); }
.ws-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ws-list li { position: relative; padding-left: 30px; }
.ws-list li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--ws-sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%231c2023' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.ws-plan .ws-btn { margin-top: auto; }
.ws-table-wrap { overflow-x: auto; border: var(--ws-line); border-radius: var(--ws-radius); background: var(--ws-white); }
.ws-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--ws-text-small); }
.ws-table th, .ws-table td { padding: 16px 20px; text-align: left; border-bottom: var(--ws-line); }
.ws-table thead th { font: 600 12px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label); background: var(--ws-mist); }
.ws-table td:not(:first-child), .ws-table th:not(:first-child) { text-align: center; }
.ws-table tr:last-child td { border-bottom: 0; }
.ws-yes { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ws-sun); box-shadow: 0 0 0 1px var(--ws-sun-deep); }
.ws-no { color: var(--ws-faint); }
.ws-faq { display: grid; gap: 0; border-top: var(--ws-line); }
.ws-faq details { border-bottom: var(--ws-line); padding: 22px 0; }
.ws-faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font: 500 20px/1.35 var(--ws-serif); }
.ws-faq summary::-webkit-details-marker { display: none; }
.ws-faq summary::after { content: "+"; font: 400 26px/1 var(--ws-sans); color: var(--ws-sun-deep); flex: none; }
.ws-faq details[open] summary::after { content: "\2212"; }
.ws-faq details p { margin-top: 12px; color: var(--ws-soft); max-width: 640px; }

/* ---------- Article ---------- */
.ws-article-head { padding: clamp(48px, 7vw, 96px) 0 40px; }
.ws-article-head .ws-h1 { margin: 18px 0 24px; font-size: clamp(36px, 4.6vw, 56px); }
.ws-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--ws-soft); font-size: var(--ws-text-small); }
.ws-article-meta b { color: var(--ws-ink); font-weight: 600; }
.ws-article-cover { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.ws-article-cover figure { margin: 0; aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--ws-radius); background: var(--ws-lagoon); }
.ws-article-cover svg { width: 100%; height: 100%; }
.ws-article-cover figcaption { margin-top: 12px; font-size: 13px; color: var(--ws-soft); }
.ws-prose { font-size: 19px; line-height: 1.75; }
.ws-prose > * + * { margin-top: 1.2em; }
.ws-prose h2 { font-size: 32px; margin-top: 1.8em; }
.ws-prose h3 { font-size: 24px; margin-top: 1.5em; }
.ws-prose > p:first-child::first-letter { float: left; font: 500 76px/.82 var(--ws-serif); margin: 8px 12px 0 0; color: var(--ws-ink); }
.ws-prose ul { padding-left: 1.2em; }
.ws-prose li + li { margin-top: .4em; }
.ws-prose li::marker { color: var(--ws-sun-deep); }
.ws-prose blockquote { margin: 2em 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--ws-sun); font: italic 400 26px/1.4 var(--ws-serif); }
.ws-author { display: flex; gap: 18px; align-items: center; padding: 28px 0; border-top: var(--ws-line); border-bottom: var(--ws-line); }

/* ---------- Footer ---------- */
.ws-footer { background: var(--ws-ink); color: var(--ws-white); padding: 80px 0 32px; }
.ws-footer a { color: var(--ws-mist-2); text-decoration: none; }
.ws-footer a:hover { color: var(--ws-sun); }
.ws-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.ws-footer-grid h4 { font: 600 12px/1 var(--ws-sans); text-transform: uppercase; letter-spacing: var(--ws-tracking-label); color: var(--ws-faint); margin-bottom: 18px; }
.ws-footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--ws-text-small); }
.ws-footer .ws-logo { color: var(--ws-white); }
.ws-footer-sub { display: flex; gap: 8px; margin-top: 20px; max-width: 380px; }
.ws-footer-sub .ws-input { background: var(--ws-ink-2); border-color: var(--ws-ink-2); color: var(--ws-white); }
.ws-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--ws-ink-2); font-size: 13px; color: var(--ws-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .ws-nav { display: none; }
  .ws-grid, .ws-plans { grid-template-columns: 1fr; }
  .ws-grid--4, .ws-stats { grid-template-columns: repeat(2, 1fr); }
  .ws-footer-grid { grid-template-columns: 1fr 1fr; }
  .ws-split { grid-template-columns: 1fr; }
  .ws-split--flip > :first-child { order: 0; }
}
@media (max-width: 600px) {
  .ws-header-inner { gap: 16px; }
  .ws-header-actions { margin-left: auto; gap: 14px; }
  .ws-header-actions .ws-signin { display: none; }
  .ws-hero { min-height: 0; padding: 48px 0 56px; }
  .ws-pledge-tabs { padding: 12px 16px; }
  .ws-grid--2, .ws-field-row { grid-template-columns: 1fr; }
  .ws-card { padding: 24px; }
  .ws-card-art { margin: -24px -24px 20px; }
  .ws-footer-grid { grid-template-columns: 1fr; }
  .ws-btn { padding: 0 20px; }
}

/* ---------- Scene fills (for inline SVG drawings) ---------- */
.ws-f-sun { fill: var(--ws-sun); }
.ws-f-sun-soft { fill: var(--ws-sun-soft); }
.ws-f-lagoon { fill: var(--ws-lagoon); }
.ws-f-lagoon-deep { fill: var(--ws-lagoon-deep); }
.ws-f-sky { fill: var(--ws-sky); }
.ws-f-clay { fill: var(--ws-clay); }
.ws-f-field { fill: var(--ws-field); }
.ws-f-white { fill: var(--ws-white); }
.ws-f-sand { fill: var(--ws-sand); }
.ws-f-ink { fill: var(--ws-ink); }
.ws-f-mist { fill: var(--ws-mist-2); }
.ws-s-ink { fill: none; stroke: var(--ws-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ws-s-white { fill: none; stroke: var(--ws-white); stroke-width: 2; stroke-linecap: round; }
