/* ==========================================================================
   Tumble Cove — marketing site stylesheet
   Brand system locked in BRAIN.md (2026-07-22). Self-contained, no CDNs.
   Palette: warm sand · sea-glass teal · coral · sunset gold · deep-sea ink
   ========================================================================== */

/* ---- Self-hosted fonts (OFL 1.1, embeddable) ---------------------------- */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
  font-style: normal;
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Locked brand palette */
  --sand:      #f6e7c8;
  --teal:      #69c6be;
  --coral:     #ff8a6b;
  --gold:      #ffc65c;
  --ink:       #1e3d52;

  /* Derived tints/shades */
  --sand-hi:   #fdf5e6;
  --sand-deep: #efd8ad;
  --teal-deep: #4aa79f;
  --teal-hi:   #a7e0da;
  --coral-deep:#f26a48;
  --ink-soft:  #3a5a72;
  --ink-faint: #6d8497;

  /* Block-critter colors (colorblind: each has a shape too) */
  --c-red:    #ff6b6b;  /* crab   — circle   */
  --c-blue:   #4d96ff;  /* fish   — square   */
  --c-green:  #3ab54a;  /* turtle — triangle */
  --c-yellow: #ffcf3d;  /* star   — star     */
  --c-purple: #9b5de5;  /* urchin — diamond  */
  --c-orange: #ff9f1c;  /* gull   — hexagon  */

  /* Surfaces */
  --bg:        var(--sand);
  --surface:   #fffdf8;
  --surface-2: #fdf3df;
  --line:      #e7d4ae;

  /* Type */
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Nunito", "Segoe UI", system-ui, sans-serif;

  /* Shape & depth */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --shadow-sm: 0 2px 8px rgba(30, 61, 82, .08);
  --shadow-md: 0 10px 30px rgba(30, 61, 82, .12);
  --shadow-lg: 0 24px 60px rgba(30, 61, 82, .18);
  --ring: 0 0 0 4px rgba(105, 198, 190, .35);

  /* Rhythm */
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05rem, 18px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: .8em 1.5em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(255, 138, 107, .4); }
.btn-primary:hover { background: var(--coral-deep); box-shadow: 0 12px 26px rgba(242, 106, 72, .45); }
.btn-ghost { background: rgba(255, 255, 255, .6); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: var(--teal); }

/* ---- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 231, 200, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(231, 212, 174, .7);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 38px; height: 38px; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(30,61,82,.18)); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { color: var(--ink-soft); font-weight: 700; font-size: .98rem; }
.nav-links a:hover { color: var(--teal-deep); text-decoration: none; }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% -10%, #ffe6b8 0%, rgba(255,230,184,0) 55%),
    linear-gradient(180deg, #bfeef1 0%, #d9f2e6 32%, var(--sand) 100%);
  padding-top: clamp(2.5rem, 6vw, 5rem);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-bottom: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; font-size: .82rem; color: var(--teal-deep);
  background: rgba(255, 255, 255, .65); border: 1px solid var(--teal-hi);
  padding: .4em .9em; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 600; margin-bottom: .35em; }
.hero .lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--ink-soft); max-width: 34ch; }
@media (max-width: 860px) { .hero .lede { margin-inline: auto; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
@media (max-width: 860px) { .hero-cta { justify-content: center; } }
.hero-note { margin-top: 1rem; font-size: .92rem; color: var(--ink-faint); }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(30,61,82,.18)); }

/* floaty critters */
@keyframes bob { 0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); } 50% { transform: translateY(-10px) rotate(var(--rot,0deg)); } }
.float { animation: bob 5s ease-in-out infinite; }
.float.d1 { animation-delay: .0s; }
.float.d2 { animation-delay: .8s; }
.float.d3 { animation-delay: 1.6s; }

/* wave divider */
.wave-sep { display: block; width: 100%; height: auto; margin-top: -1px; }

/* ---- Sections ----------------------------------------------------------- */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 46ch; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head .kicker {
  font-family: var(--font-display); font-weight: 600; color: var(--coral);
  text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; margin-bottom: .5rem;
}
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

.alt { background: linear-gradient(180deg, #fffdf8 0%, #fdf3df 100%); }

/* ---- Feature cards ------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.7rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .ico { width: 56px; height: 56px; margin-bottom: 1rem; }
.card h3 { font-size: 1.3rem; margin-bottom: .35em; }
.card p { color: var(--ink-soft); margin: 0; font-size: 1rem; }

/* ---- Block-critter legend ---------------------------------------------- */
.critters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.critter {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.1rem 1rem; text-align: center; box-shadow: var(--shadow-sm);
}
.critter svg { width: 74px; height: 74px; margin: 0 auto .5rem; }
.critter b { font-family: var(--font-display); font-weight: 600; display: block; color: var(--ink); }
.critter span { font-size: .86rem; color: var(--ink-faint); }

/* ---- Islands band ------------------------------------------------------- */
.islands-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.1rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.6rem 1.2rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 5vw, 2.8rem); color: var(--teal-deep); line-height: 1; }
.stat .lbl { color: var(--ink-soft); font-weight: 700; margin-top: .35rem; }

/* ---- Split feature rows ------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.split + .split { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.split.reverse .split-media { order: 2; }
@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; text-align: center; }
  .split.reverse .split-media { order: 0; }
}
.split-media svg { width: 100%; height: auto; border-radius: var(--r-xl); }
.split h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.split p { color: var(--ink-soft); }
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 780px) { .tag-list { justify-content: center; } }
.tag-list li {
  background: rgba(105,198,190,.16); color: var(--teal-deep); border: 1px solid var(--teal-hi);
  padding: .35em .85em; border-radius: 999px; font-weight: 700; font-size: .9rem;
}

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-inner {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff; border-radius: var(--r-xl); padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-inner h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.cta-inner p { color: rgba(255,255,255,.9); max-width: 40ch; margin-inline: auto; }
.cta-inner .btn-primary { background: #fff; color: var(--coral-deep); }
.cta-inner .btn-primary:hover { background: var(--sand-hi); }
.pill-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.4rem; }
.pill { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: #fff; padding: .4em 1em; border-radius: 999px; font-weight: 700; font-size: .9rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #cfe0e8; padding-block: clamp(2.5rem, 5vw, 3.5rem); font-size: .95rem; }
.site-footer a { color: #a7e0da; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: #fff; margin-bottom: .6rem; }
.footer-brand .mark { width: 34px; height: 34px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .7rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.trader { color: #8fa9b8; font-size: .86rem; line-height: 1.55; margin-top: .8rem; max-width: 40ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; color: #8fa9b8; font-size: .85rem; }

/* ==========================================================================
   Legal / support article pages
   ========================================================================== */
.page-hero {
  background: linear-gradient(180deg, #cfeef0 0%, var(--sand) 100%);
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-hero .updated { color: var(--ink-soft); font-weight: 700; }
.doc { max-width: 760px; margin-inline: auto; padding-block: clamp(2.5rem, 5vw, 4rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2.2rem; padding-bottom: .3rem; border-bottom: 2px solid var(--line); }
.doc h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.doc p, .doc li { color: #2c4a5f; }
.doc a { text-decoration: underline; }
.callout {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 5px solid var(--teal);
  border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.callout.warm { border-left-color: var(--coral); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.5rem; margin-bottom: 2rem; }
.toc ul { margin: .3rem 0 0; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem 1.7rem; box-shadow: var(--shadow-sm); margin: 1.5rem 0;
}
.contact-card .email { font-family: var(--font-display); font-size: 1.25rem; color: var(--teal-deep); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; margin-top: 1rem; }

table.plain { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .96rem; }
table.plain th, table.plain td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { font-family: var(--font-display); font-weight: 600; color: var(--ink); background: var(--surface-2); }

/* ---- FAQ (support) ------------------------------------------------------ */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0 1.3rem; margin-bottom: .8rem; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 600; color: var(--ink);
  padding: 1.1rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--teal-deep); transition: transform .2s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding-bottom: 1.2rem; margin: 0; color: var(--ink-soft); }
