/* ==========================================================================
   Breathe Affirm Manifest
   Warm Caribbean shallows — turquoise water over pale sand, soft edges,
   generous air. Nothing sharp, nothing clinical.
   ========================================================================== */

:root {
  /* water */
  --abyss:    #0F4E5F;
  --sea:      #1B7F96;
  --lagoon:   #4FB2C0;
  --shallow:  #8FD3D9;
  --mist:     #E2F1F2;

  /* sand + warm ground */
  --sand:     #F5EDE2;
  --ground:   #FCFAF6;
  --surface:  #FFFFFF;

  /* ink, softened — never pure black */
  --ink:      #26383D;
  --ink-soft: #5D757C;
  --ink-faint:#8FA4A9;
  --rule:     #E3E0D8;
  --rule-soft:#EFEDE6;

  /* late sun */
  --sun:      #DE9C56;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --pad: clamp(1.4rem, 5vw, 3.5rem);
  --shell: 1140px;
  --round: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17.5px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sea); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--lagoon);
  outline-offset: 4px;
  border-radius: 6px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }
.col { max-width: var(--measure); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 300; text-wrap: balance; margin: 0; }

h1 { font-size: clamp(2.5rem, 6.4vw, 4.3rem); line-height: 1.12; letter-spacing: -0.005em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.2; }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.6rem); line-height: 1.3; font-weight: 400; }

p { margin: 0 0 1.2em; }
strong { font-weight: 600; }

.wordmark {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.lede { font-size: clamp(1.08rem, 2vw, 1.24rem); line-height: 1.72; color: var(--ink-soft); }

/* ---------- header ---------- */

.site-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.7rem 0;
  flex-wrap: wrap;
}
.site-head a { text-decoration: none; }
.brand { color: var(--ink); }
.nav { display: flex; gap: clamp(1.1rem, 3vw, 2.4rem); font-size: 0.92rem; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--sea); }

.hero .site-head .brand,
.hero .site-head .nav a { color: rgba(255,255,255,0.9); }
.hero .site-head .nav a:hover,
.hero .site-head .nav a[aria-current="page"] { color: #fff; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(143,211,217,0.32) 0%, rgba(15,78,95,0) 62%),
    linear-gradient(168deg, #2C93A6 0%, #1B7F96 38%, #0F4E5F 100%);
}
/* PHOTO SLOT — drop a Cayman / Seven Mile Beach shot in as assets/img/hero.jpg,
   set --hero-photo: url(/assets/img/hero.jpg) and add data-photo to .hero. */
.hero[data-photo] {
  background:
    linear-gradient(168deg, rgba(27,127,150,0.70) 0%, rgba(15,78,95,0.82) 100%),
    var(--hero-photo, none) center / cover no-repeat;
}

/* soft sand curve instead of a hard section edge */
.hero::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -1px;
  height: clamp(42px, 6vw, 92px);
  background: var(--ground);
  border-radius: 100% 100% 0 0 / 100% 100% 0 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(5.5rem, 13vw, 9.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr 0.9fr; } }

.hero h1 { color: #fff; max-width: 16ch; font-weight: 300; }
.hero .lede { color: rgba(255,255,255,0.9); max-width: 44ch; margin-top: 1.7rem; }
.hero .ask {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-style: italic;
  color: var(--shallow);
  margin: 1.4rem 0 0;
}

/* ---------- opt-in card ---------- */

.optin {
  background: var(--surface);
  color: var(--ink);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: var(--round);
  box-shadow: 0 30px 70px -30px rgba(15,78,95,0.45);
}
.optin h2 { font-size: clamp(1.5rem, 3vw, 1.85rem); margin-bottom: 0.5rem; }
.optin p.small { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 1.5rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.05rem; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); }
.field input {
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--ground);
  color: var(--ink);
  width: 100%;
}
.field input:focus { border-color: var(--lagoon); background: #fff; }

.btn {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  padding: 1rem 1.6rem;
  border: 0;
  border-radius: 100px;
  background: var(--sea);
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.btn:hover { background: var(--abyss); transform: translateY(-1px); }
.btn-inline { width: auto; }

.fineprint { font-size: 0.86rem; color: var(--ink-faint); margin: 1rem 0 0; text-align: center; }

/* ---------- sections ---------- */

section { padding: clamp(4rem, 10vw, 7rem) 0; }
section.sand { background: var(--sand); }
section.mist { background: var(--mist); }
.sec-head { margin-bottom: clamp(2.4rem, 5vw, 3.5rem); max-width: 46ch; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- pillars ---------- */

.pillars { display: grid; gap: clamp(1.4rem, 3vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

.pillar {
  background: var(--surface);
  border-radius: var(--round);
  padding: clamp(2rem, 4vw, 2.6rem) clamp(1.6rem, 3vw, 2.1rem) clamp(2.2rem, 4vw, 2.8rem);
  box-shadow: 0 18px 44px -28px rgba(38,56,61,0.30);
  text-align: center;
}
.pillar .mark { width: 60px; height: 60px; margin: 0 auto 1.5rem; display: block; color: var(--lagoon); }
.pillar h3 { margin-bottom: 0.7rem; color: var(--abyss); }
.pillar p { color: var(--ink-soft); margin: 0; font-size: 1rem; line-height: 1.75; }

/* ---------- get started ---------- */

.start-grid { display: grid; gap: clamp(2.2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 880px) { .start-grid { grid-template-columns: 1fr 1fr; } }
.start-grid h2 { margin-bottom: 0.9rem; }

.marks { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2rem; font-size: 0.98rem; color: var(--ink-soft); }
.marks span { display: inline-flex; align-items: center; gap: 0.55rem; }
.marks span::before {
  content: "";
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--shallow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F4E5F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- blog ---------- */

.posts { display: flex; flex-direction: column; gap: 1rem; }
.post-row {
  background: var(--surface);
  border-radius: var(--round);
  padding: clamp(1.5rem, 3vw, 2rem);
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  box-shadow: 0 14px 36px -28px rgba(38,56,61,0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
@media (min-width: 780px) {
  .post-row { grid-template-columns: 9rem 1fr; gap: 0 2.2rem; align-items: baseline; }
}
.post-row:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -28px rgba(38,56,61,0.42); }
.post-row .meta { font-size: 0.9rem; color: var(--ink-faint); }
.post-row h3 { color: var(--abyss); margin-bottom: 0.4rem; }
.post-row p { color: var(--ink-soft); margin: 0; font-size: 1rem; max-width: 60ch; }

.article { padding-top: clamp(2.5rem, 6vw, 4rem); }
.article-head { max-width: var(--measure); margin-bottom: 2.8rem; }
.article-head .meta { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 1rem; }
.prose { max-width: var(--measure); font-size: 1.08rem; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2.8rem 0 0.9rem; color: var(--abyss); }
.prose h3 { margin: 2.2rem 0 0.7rem; }
.prose > p:first-of-type { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.7; }
.prose blockquote {
  margin: 2.4rem 0;
  padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--lagoon);
  font-family: var(--display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--abyss);
}

.tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2.8rem; }
.tag { font-size: 0.86rem; padding: 0.35rem 0.85rem; background: var(--mist); color: var(--sea); border-radius: 100px; }

.article-cta {
  margin: 3.5rem 0 0;
  padding: clamp(2rem, 4vw, 2.8rem);
  background: var(--sand);
  max-width: var(--measure);
  border-radius: var(--round);
  text-align: center;
}
.article-cta h3 { color: var(--abyss); margin-bottom: 0.6rem; }
.article-cta p { color: var(--ink-soft); margin-bottom: 1.6rem; }
.article-cta .btn { width: auto; }

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: clamp(2.2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; } }
.contact-item { margin-bottom: 2rem; }
.contact-item .k { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 0.25rem; }
.contact-item .v { font-size: 1.1rem; }

/* ---------- footer ---------- */

.site-foot {
  background: var(--abyss);
  color: rgba(255,255,255,0.76);
  padding: clamp(3rem, 7vw, 4.5rem) 0 2.2rem;
  font-size: 0.96rem;
}
.foot-grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot a { color: rgba(255,255,255,0.9); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .brand { color: #fff; display: inline-block; margin-bottom: 0.9rem; }
.foot-col h4 { font-family: var(--body); font-size: 0.96rem; font-weight: 600; color: var(--shallow); margin: 0 0 0.9rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.foot-legal { padding-top: 1.8rem; font-size: 0.9rem; color: rgba(255,255,255,0.6); }

.site-foot.foot-min { padding: 2.4rem 0; }
.site-foot.foot-min .foot-legal { padding-top: 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- GHL embedded form ---------- */
.ghl-form {
  position: relative;
  width: 100%;
  min-height: 572px;      /* matches the form's data-height; the GHL script resizes after load */
}
.ghl-form iframe { display: block; width: 100%; height: 572px; }
/* the embed brings its own card styling, so the wrapper stays plain */
.optin:has(.ghl-form) { padding: clamp(0.6rem, 1.5vw, 1rem); }

/* ==========================================================================
   Article artwork
   Every image carries width/height from build.py, so the browser reserves the
   space before the bytes land. aspect-ratio here is belt and braces for the
   cropped thumbnails, where the rendered box is not the file's own ratio.
   ========================================================================== */

.article-art {
  margin: 0 0 clamp(1.6rem, 4vw, 2.6rem);
  border-radius: var(--round);
  overflow: hidden;
  background: var(--mist);
}
.article-art img {
  display: block;
  width: 100%;
  height: auto;
}

.post-row.has-art {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: center;
}
.post-art {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 4 / 3;
}
.post-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 700px) {
  .post-row.has-art {
    grid-template-columns: 1fr;
  }
  .post-art { aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   Offer banners
   Two shapes. The mid-article one is quiet and inline — it interrupts reading,
   so it earns its place by being small. The end-of-article one is the real
   ask, and can afford weight because the reader has finished.
   ========================================================================== */

.offer {
  border-radius: var(--round);
  margin: clamp(2rem, 5vw, 3rem) 0;
}

.offer-mid {
  background: var(--mist);
  border-left: 3px solid var(--lagoon);
  padding: clamp(1.2rem, 3vw, 1.6rem) clamp(1.3rem, 3vw, 1.8rem);
}
.offer-mid .eyebrow { margin-bottom: 0.35rem; }
.offer-mid h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  margin: 0 0 0.4rem;
}
.offer-mid p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.offer-end {
  background: var(--abyss);
  color: var(--mist);
  padding: clamp(1.8rem, 4vw, 2.6rem);
}
.offer-end .eyebrow { color: var(--shallow); }
.offer-end h3 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 0.6rem;
}
.offer-end p {
  color: var(--shallow);
  margin: 0 0 1.4rem;
  max-width: 46ch;
}
.offer-end .btn {
  background: var(--sun);
  color: #2A1A08;
  border-color: var(--sun);
}
.offer-end .btn:hover { filter: brightness(1.06); }

/* With artwork, the banner becomes two columns. */
.offer.has-art {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  overflow: hidden;
}
.offer.has-art.offer-end { padding: 0; }
.offer.has-art.offer-end .offer-copy { padding: clamp(1.8rem, 4vw, 2.6rem); }
.offer-art { display: block; }
.offer-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

@media (max-width: 700px) {
  .offer.has-art {
    grid-template-columns: 1fr;
  }
  .offer-art img { aspect-ratio: 16 / 9; }
}

/* A ghost button for the quieter mid-article ask. */
.btn-ghost {
  background: transparent;
  color: var(--abyss);
  border: 1.5px solid var(--abyss);
}
.btn-ghost:hover {
  background: var(--abyss);
  color: #fff;
}

/* An original smaller than the column renders at its own size, centred,
   rather than being upscaled into softness. build.py sets the max-width. */
.article-art.is-narrow {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons inside offer banners size to their label rather than the box. */
.offer .btn {
  display: inline-flex;
  align-items: center;
  width: auto;
  align-self: start;
}

/* The "not purchasable yet" line. Quiet, but present. */
.offer-note {
  font-size: 0.88rem !important;
  font-style: italic;
  opacity: 0.85;
  margin: -0.4rem 0 1.1rem !important;
  max-width: 42ch;
}
.offer-mid .offer-note { color: var(--ink-faint); }
.offer-end .offer-note { color: var(--shallow); }

/* The Vault masthead carries a long heading; give it room to breathe rather
   than stacking onto four lines in a 46ch column. */
.sec-head h1 { max-width: 18ch; }
@media (min-width: 700px) {
  .posts + .offer,
  .sec-head { max-width: 62ch; }
}

/* The Vault's personal note under the lede — quieter than the lede, still
   comfortably readable. */
.vault-note {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 58ch;
  margin-top: 0.9rem;
}
