/* ============================================================
   WhaleTales — landing page (light theme)
   ============================================================ */

:root {
  --bg:            #ffffff;
  --bg-soft:       #f6f7f9;
  --border:        #e5e7eb;
  --border-strong: #d5d8dd;
  --text:          #0b0d12;
  --text-mid:      #4a5160;
  /* was #878e9c, which came out at 3.3:1 on white — under the 4.5:1 WCAG AA
     floor, and this drives the footer fine print and the form note. #666d7a is
     the same blue-grey a few steps darker: 5.2:1 on white, 4.8:1 on --bg-soft,
     so it clears AA against both surfaces it actually sits on. */
  --text-dim:      #666d7a;
  /* pulled from the wordmark: navy lettering, gold coin accents */
  --accent:        #1c4b8a;
  --accent-hover:  #143a6d;
  --accent-light:  #3a7bc8;
  --accent-deep:   #12325c;
  --gold:          #e2a52c;

  /* PT Serif for display, Inter for reading — the serif gives headlines an
     editorial voice; Georgia is the closest fallback if it fails to load */
  --font-display: "PT Serif", Georgia, "Times New Roman", serif;
  --up:            #17a565;
  --dn:            #e03434;

  --btc:  #f7931a;
  --eth:  #6b7bb8;
  --bnb:  #f0b90b;
  --sol:  #14b8a6;
  --xrp:  #0aa5c8;
  --usdt: #26a17b;
  --usdc: #2775ca;
  --doge: #c2a633;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* nothing on the page is meant to scroll sideways — this stops a stray
     wide element (an embed, an oversized image) from shifting the whole
     layout and clipping the edges, which is how the footer got cut off */
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* cv11 gives Inter the single-storey 'a'; ss01 tidies the 'g' — subtle, but
     it's what stops Inter reading as generic UI type */
  font-feature-settings: "cv11", "ss01";
  font-optical-sizing: auto;
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: rgba(28, 75, 138, .15);
}

/* no image can ever exceed its container, whatever its intrinsic size */
img {
  max-width: 100%;
  height: auto;
}

/* ---------------- navbar ---------------- */

.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* fixed height — the bar stays this tall no matter how big the logo gets */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* negative margins pull the logo out of the flow so its extra height
   overflows the bar instead of stretching it */
/* 124px logo in a 62px bar: the -31px top/bottom margins pull it out of the
   flow, so the extra 62px overhangs instead of stretching the navbar */
.logo-img {
  height: 124px;
  width: auto;
  display: block;
  margin: -31px 0;
}

@media (prefers-reduced-motion: reduce) {
  .thanks-inner { animation: none; }
  .thanks-badge polyline { animation: none; stroke-dashoffset: 0; }
  .phone { animation: none; }
  .hero .eyebrow i { animation: none; }
}

/* ---------------- hero ---------------- */

/* two off-centre blooms — a warm one behind the phone, a fainter one top-left —
   so the section has some depth instead of sitting on flat white */
.hero {
  padding: 70px 24px 70px;
  position: relative;
  background:
    radial-gradient(820px 430px at 76% 42%, rgba(58, 123, 200, .13), transparent 70%),
    radial-gradient(620px 300px at 8% -40px, rgba(28, 75, 138, .07), transparent 70%);
}

/* both columns shrink-wrap and justify-content centers the pair as one unit,
   so leftover width splits evenly left and right instead of pooling between */
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 40px;
  align-items: center;
}

.hero-copy { width: 620px; }

.eyebrow {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 400;
  color: var(--text);
}

/* pill, so the kicker reads as a label rather than a stray line of text */
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 6px 15px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-mid);
}

/* gold, echoing the coins in the wordmark, against the navy elsewhere */
.hero .eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 165, 44, .45); }
  70%      { box-shadow: 0 0 0 6px rgba(226, 165, 44, 0); }
}

/* the lines are short now, so this can carry more weight than the 40px the
   longer headline needed and still sit comfortably in the 620px column */
.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.18;
  font-weight: 700;
  /* serifs need far less negative tracking than a grotesque — the strokes
     already carry the eye, and tightening past this crowds the terminals */
  letter-spacing: -0.012em;
  /* the <br> sets the break on desktop; balance is the safety net at widths
     where it's hidden, so no single word is left stranded on the last line */
  text-wrap: balance;
}

.sub {
  margin: 0 0 28px;
  font-size: 22px;
  line-height: 1.35;
  color: var(--accent);
  font-weight: 400;
}

/* the hero sub is a paragraph now, not a one-line tagline — 22px purple was
   shouting over the headline, so it drops to body size and body colour here
   only, leaving the short tagline on the thank-you page as it was */
/* 58ch keeps the line length in the comfortable 55-75 character range for
   reading; 1.65 leading and a hair of negative tracking suit Inter at this size */
.hero .sub {
  font-size: 18px;
  line-height: 1.65;
  letter-spacing: -0.006em;
  color: var(--text-mid);
  max-width: 58ch;
}

/* the two specifics carry the whole claim, so they step up to full-strength
   text with a gold marker sweep behind them — the eye lands there first, and
   the rest of the sentence stays quiet */
.hero .sub strong {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(transparent 62%, rgba(226, 165, 44, .32) 0);
  padding: 0 1px;
}

.form-note {
  margin: 11px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* beehiiv's loader injects its form right after the script tag in here.
   min-height reserves the old form's footprint so the async insert can't
   reflow the hero mid-paint, and the width clamp keeps a wide embed from
   overflowing the column and nudging the whole row sideways. */
.signup-embed {
  width: 100%;
  max-width: 620px;
  /* matches the 58px the injected form is clamped to below — at 54px the slot
     grew by 4px the moment the embed landed, which was a measurable layout
     shift on every load */
  min-height: 58px;
}

/* beehiiv sets these dimensions inline, hence the overrides. It reserves far
   more height than the form actually draws, which inflates this column and
   drags the phone mockup down with it — the clamp cuts that dead space while
   still leaving room for an inline validation message. */
.signup-embed iframe,
.signup-embed > div {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 56px;
  max-height: 58px !important;
  border: 0;
}

/* ---------------- phone mockup ---------------- */

/* nudged right on its own so the text block stays exactly where it is */
.hero-phone {
  display: flex;
  justify-content: center;
  transform: translateX(16px);
  position: relative;
  /* no-op while the phone is the taller column; a guard so a third-party
     embed growing the copy column can never push the phone down the row */
  align-self: start;
}

/* halo sits between the section background and the handset — hence z-index on
   both, rather than a negative index that would hide it behind .hero's gradient */
.hero-phone::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  height: 330px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 123, 200, .34), transparent 68%);
  filter: blur(26px);
  z-index: 0;
}

.phone {
  width: 265px;
  height: 540px;
  border-radius: 38px;
  background: #1c1f26;
  padding: 9px;
  box-shadow: 0 30px 70px rgba(15, 18, 28, .26), 0 4px 14px rgba(15, 18, 28, .1);
  position: relative;
  z-index: 1;
  animation: float 6.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}

/* side buttons */
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: 3px;
  background: #33373f;
  border-radius: 2px;
}

.phone::before { left: -3px; top: 124px; height: 48px; }
.phone::after  { right: -3px; top: 140px; height: 68px; }

.phone-screen {
  height: 100%;
  border-radius: 30px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 5px;
  font-size: 11px;
  font-weight: 600;
  color: #10131a;
}

.status-bar .notch {
  width: 68px;
  height: 20px;
  border-radius: 12px;
  background: #10131a;
}

.status-icons { display: flex; align-items: center; gap: 5px; }

.si { height: 11px; fill: #10131a; color: #10131a; }
.si:nth-child(1) { width: 17px; }
.si:nth-child(2) { width: 15px; }
.si:nth-child(3) { width: 24px; }

.mail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 10px;
  border-bottom: 1px solid #eceef1;
}

.mail-actions { display: flex; gap: 14px; }

.mi {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #6c7381;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mi.dots { fill: #6c7381; stroke: none; }

/* min-width/min-height 0 — a flex item defaults to min-size:auto, so the
   1572px-tall screenshot inside was forcing this box past the phone screen
   instead of being clipped by it */
.mail-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 0;
  background: #fff;
}

/* the screenshot is far taller than the screen — pinned to the top and clipped
   by .mail-body's overflow, so it reads as the top of a real email */
.email-shot {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #ecedf0;
  border-radius: 6px;
}

.email-card {
  border: 1px solid #ecedf0;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
}

.email-hero {
  background: linear-gradient(150deg, #9dc3ea 0%, #2a6bb5 48%, #12325c 100%);
  padding: 14px 16px 22px;
  color: #fff;
}

.email-brand {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 14px;
  opacity: .95;
}

.email-title {
  display: block;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.email-content { padding: 12px 14px; }

.sponsor {
  margin: 0 0 12px;
  font-size: 9px;
  color: #5b6270;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sponsor-logo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 11px;
  color: #10131a;
}

.sponsor-logo i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2f6df6;
  display: inline-block;
}

blockquote {
  margin: 0 0 14px;
  font-size: 9.5px;
  line-height: 1.5;
  color: #262b35;
}

blockquote cite {
  display: block;
  margin-top: 5px;
  font-size: 8.5px;
  color: #7b8291;
}

.email-chart {
  background: #12141a;
  border-radius: 4px;
  padding: 7px;
  margin-bottom: 12px;
}

.chart-tag {
  display: inline-block;
  font-size: 7px;
  font-weight: 600;
  color: #fff;
  background: #2b3040;
  border-radius: 3px;
  padding: 2px 5px;
  margin-bottom: 5px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 52px;
  fill: none;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.chart-svg .line-a { stroke: #3b82f6; }
.chart-svg .line-b { stroke: #ef4444; }

.email-headline {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #10131a;
}

.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 0 4px;
  border-top: 1px solid #eceef1;
  background: #fff;
}

.tab { position: relative; display: inline-flex; }

.ti { width: 22px; height: 22px; fill: none; stroke: #6c7381; }
/* one shade down from #e0402f: the white "99+" on that red measured 4.3:1,
   just under AA, and the badge is real text so the audit counts it. The icon
   moves with it so the two still read as the same red. */
.ti.fill-red { fill: #d93a28; stroke: none; }

.badge {
  position: absolute;
  top: -6px;
  left: -8px;
  background: #d93a28;
  color: #fff;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 4px;
  line-height: 1.3;
}

.home-bar {
  width: 130px;
  height: 4px;
  border-radius: 3px;
  background: #10131a;
  margin: 4px auto 8px;
}

/* ---------------- thank you ---------------- */

.thanks {
  padding: 80px 24px 100px;
  display: flex;
  justify-content: center;
  text-align: center;
  /* soft accent bloom behind the badge, fading out before the copy starts */
  background: radial-gradient(760px 340px at 50% -40px, rgba(28, 75, 138, .11), transparent 70%);
}

.thanks .eyebrow {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* same gradient as the mock email header, so the two read as one brand.
   solid navy is the base: transparent text is applied ONLY where background-clip
   is supported, otherwise the word would render invisible rather than unstyled */
.wordmark { color: var(--accent); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark {
    background: linear-gradient(120deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ---- confetti ---- */

/* longhands before inset — inset lands in iOS Safari 14.5, and without them
   older builds would leave this fixed layer collapsed at its flow position */
.confetti {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 100;
}

.confetti .piece {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  opacity: 0;
  animation-name: fall;
  animation-timing-function: cubic-bezier(.28, .62, .5, 1);
  animation-fill-mode: forwards;
}

@keyframes fall {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); }
}

.thanks-inner {
  width: 100%;
  max-width: 620px;
  animation: rise .5s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.thanks-badge {
  width: 66px;
  height: 66px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(28, 75, 138, .32);
}

.thanks-badge svg { width: 32px; height: 32px; }

/* the check draws itself in — dash length is the full path length */
.thanks-badge polyline {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw .45s .25s ease-out forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.thanks h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.thanks .sub { margin: 0 0 34px; }

.thanks-note {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  text-align: left;
  padding: 17px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
}

.thanks-note p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-mid);
}

.thanks-note b { color: var(--text); font-weight: 600; }

.note-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks-list {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 15px;
  text-align: left;
}

.thanks-list li {
  display: flex;
  gap: 13px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text-mid);
}

.thanks-list b { color: var(--text); font-weight: 600; }

.thanks-list .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

/* ---------------- footer ---------------- */

.foot {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 22px 24px;
}

/* hairline sits on this row now, since the fine print moved above it */
.foot-inner {
  max-width: 1180px;
  margin: 16px auto 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.foot-links {
  display: flex;
  gap: 22px;
}

.foot-links a { color: var(--text-mid); }

.foot-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* flex gap only arrived in iOS Safari 14.1 — without this the footer links and
   the social icons would sit flush against each other on older iPhones */
@supports not (row-gap: 1px) {
  .foot-links a + a { margin-left: 22px; }
  .foot-social a + a { margin-left: 10px; }
  .hero .eyebrow i { margin-right: 9px; }
  .thanks-list li + li { margin-top: 15px; }
}

/* 38px tap targets, comfortably above the 24px minimum for touch */
.foot-social {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 18px;
  display: flex;
  gap: 10px;
}

.foot-social a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: color .15s, border-color .15s, background .15s;
}

.foot-social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.foot-social a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* hairline separates the fine print from the links above it; plain block
   layout and a max-width, so it renders identically in every browser */
.foot-disclaimer {
  max-width: 1180px;
  margin: 0 auto;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-dim);
}

/* ---------------- responsive ---------------- */

/* ---- stacked hero ----
   once the two columns stack, a left-aligned block sitting under a centred
   phone reads as a broken desktop layout, so the whole column centres and the
   hero becomes a deliberate one-column design instead */
@media (max-width: 1000px) {
  .hero {
    padding: 54px 24px 66px;
    /* blooms recentre over the stacked column rather than off to one side */
    background:
      radial-gradient(680px 380px at 50% 8%, rgba(58, 123, 200, .12), transparent 70%),
      radial-gradient(520px 260px at 50% 100%, rgba(28, 75, 138, .06), transparent 70%);
  }
  .hero-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 44px;
  }
  /* the column is centred in the viewport, but its text runs left — easier to
     read than centred paragraphs, and the form edge lines up with the copy */
  .hero-copy {
    width: 100%;
    max-width: 620px;
    text-align: left;
  }
  .hero h1 { font-size: 40px; }
  .hero .sub { font-size: 17px; }
  .hero-phone { transform: none; }
}

@media (max-width: 560px) {
  .hero { padding: 36px 18px 50px; }
  .hero h1 { font-size: 30px; }
  /* the forced break is tuned for the desktop column width — let it reflow */
  .hero h1 br { display: none; }
  .hero .eyebrow { font-size: 11px; margin-bottom: 14px; }
  /* drop the desktop measure cap — on a phone the viewport is already narrower
     than 58ch, and keeping a cap just adds lines and wastes the right margin */
  .hero .sub { font-size: 16px; max-width: none; }
  .form-note { font-size: 12.5px; }

  /* the handset shrinks with the viewport so it stays a supporting image
     rather than a 540px wall pushing the footer off the bottom */
  .phone {
    width: 228px;
    height: 462px;
    border-radius: 32px;
    padding: 8px;
  }
  .phone-screen { border-radius: 25px; }
  .phone::before { top: 104px; height: 40px; }
  .phone::after { right: -3px; top: 118px; height: 58px; }
  .hero-phone::before { width: 236px; height: 236px; }

  .nav-inner { height: 54px; padding: 0 18px; }
  .logo-img { height: 82px; margin: -14px 0; }
  .foot-inner { flex-direction: column; text-align: center; }
  .foot-disclaimer { text-align: center; font-size: 11px; }
  .foot-social { justify-content: center; flex-wrap: wrap; }
  .thanks { padding: 50px 18px 70px; }
  .thanks h1 { font-size: 34px; }
}

/* iPhone SE / older small Androids — 320px wide with the browser chrome eating
   into it, so the last few fixed sizes need one more step down */
@media (max-width: 360px) {
  .hero h1 { font-size: 27px; }
  .logo-img { height: 72px; margin: -9px 0; }
  .phone { width: 206px; height: 418px; }
  .hero-phone::before { width: 212px; height: 212px; }
  .foot-social { gap: 8px; }
  .foot-social a { width: 36px; height: 36px; }
}
