/* Brisa's site in its own brand, "Mar": sea green to blue, white wind, Nunito. Light and dark.
   The structure follows deckrama.app. The sketch it came from: ~/Developer/backstage/brisa/sketches/site-mar. */
@font-face {
  font-family: "Nunito";
  src: url(fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ink: #0B2B3C;        /* 13.6:1 on the page */
  --ink-2: #3F5F6E;      /* 6.4:1 */
  --ink-3: #6C8894;
  --page: #F3FBFC;
  --tile: #FFFFFF;
  --hair: #CFE6EC;
  --agua: #43E3C6;
  --ceu: #1FA6F0;
  --azul: #2A62EE;
  --button: #1B6FF0;     /* white on it, 4.6:1 */
  --button-hover: #155FD4;
  --link: #1257C4;
  --ghost: #C8CED8;      /* a piece that didn't arrive yet, as in the house */
  --mar: linear-gradient(135deg, var(--agua) 0%, var(--ceu) 52%, var(--azul) 100%);
  --sky: linear-gradient(180deg, #CFF3F2 0%, #E6F8FA 58%, var(--page) 100%);
  --nav: rgb(226 247 248 / .8);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
  --pad: clamp(20px, 4vw, 40px);
  --section: clamp(56px, 7vw, 88px);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EAF6FB;      /* 15.9:1 on the page */
    --ink-2: #A9C3CE;
    --ink-3: #7893A0;
    --page: #06141F;
    --tile: #0E2433;
    --hair: #1D3B4E;
    --link: #7DB8FF;
    --ghost: #3A4954;
    --sky: linear-gradient(180deg, #0B3550 0%, #082335 58%, var(--page) 100%);
    --nav: rgb(9 44 66 / .8);
  }
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font: 500 17px/1.5 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--button); outline-offset: 3px; border-radius: 6px; }
.in { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; padding: 8px 14px; border-radius: 10px; background: var(--tile); }

h1, h2, h3 { font-weight: 800; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(27px, 3.4vw, 36px); line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.25; }
.lede { margin-top: 8px; color: var(--ink-2); font-size: 19px; max-width: 56ch; }

kbd {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .35em; margin: 0 1px;
  border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 6px; background: var(--tile); color: var(--ink);
  font: 700 .78em/1 var(--font); vertical-align: .08em;
}

.button {
  display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--button); color: #FFF;
  font-weight: 800; text-decoration: none; transition: background-color .15s;
}
.button:hover { background: var(--button-hover); }
.button-small { padding: 8px 18px; font-size: 15px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10; background: var(--nav);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
}
.nav-in { display: flex; align-items: center; gap: 26px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--ink); font-size: 23px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.mark { width: 27px; height: 27px; fill: none; stroke: var(--button); stroke-width: 58; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }

/* Hero: the words on the left, the live test (the house and its score) on the right. */
.hero { position: relative; overflow: hidden; margin-top: -60px; padding: calc(60px + clamp(28px, 5vw, 64px)) 0 clamp(40px, 6vw, 72px); background: var(--sky); }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1; letter-spacing: -.03em; }
/* Japanese, Korean and Chinese: wider letters, so a smaller title, and lines that break between phrases. */
:lang(ja) .hero h1, :lang(ko) .hero h1, :lang(zh) .hero h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.16; letter-spacing: -.01em; }
:lang(ja) :is(h1, h2, h3), :lang(zh) :is(h1, h2, h3) { word-break: auto-phrase; }
:lang(ko) :is(h1, h2, h3, p) { word-break: keep-all; }
.hero-sub { margin-top: 18px; max-width: 30ch; color: var(--ink-2); font-size: clamp(19px, 2vw, 22px); font-weight: 600; line-height: 1.38; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.hero .badges { margin-top: 28px; }
.badge img { width: auto; height: 46px; }
.hero-note { margin-top: 10px; color: var(--ink-2); font-size: 15px; font-weight: 600; }

.wind { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--ceu); stroke-width: 2; stroke-linecap: round; opacity: .28; pointer-events: none; }
.wind path { stroke-dasharray: 140 520; animation: blow 9s linear infinite; }
.wind path:nth-child(2) { stroke-dasharray: 220 640; animation-duration: 12s; animation-delay: -4s; opacity: .7; }
.wind path:nth-child(3) { stroke-dasharray: 90 420; animation-duration: 7s; animation-delay: -2s; }
.wind path:nth-child(4) { stroke-dasharray: 180 700; animation-duration: 14s; animation-delay: -7s; opacity: .6; }
@keyframes blow { to { stroke-dashoffset: -660; } }
@media (prefers-reduced-motion: reduce) { .wind path { animation: none; } html { scroll-behavior: auto; } }

.stage { position: relative; height: clamp(280px, 33vw, 400px); }
.stage-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline: none; }
.stage-canvas:active { cursor: grabbing; }
.tip {
  position: absolute; left: 0; top: 0; z-index: 2; display: grid; gap: 1px; max-width: 240px; padding: 10px 12px;
  border-radius: 12px; background: color-mix(in srgb, var(--tile) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgb(0 0 0 / .16), 0 0 0 1px color-mix(in srgb, var(--hair) 60%, transparent);
  font-size: 13px; line-height: 1.35; pointer-events: none;
}
.tip[hidden] { display: none; }
.tip b { font-size: 15px; font-weight: 800; }
.tip span { color: var(--ink-2); }
.tip .tip-state { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--ink); font-weight: 700; }
.tip .tip-state::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* The score under the house: the count, what it means, one bar segment per piece and what to do next. */
.score {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center;
  padding: 16px 20px 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--tile) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hair) 70%, transparent), 0 18px 40px -24px rgb(11 43 60 / .35);
}
.score-number { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-number b { color: color-mix(in oklab, var(--v, var(--ink-3)) 88%, var(--ink)); transition: color .5s; }
.score-number span { color: var(--ink-3); font-size: .5em; font-weight: 700; letter-spacing: 0; }
.score-label { font-size: 15px; font-weight: 800; }
.score-text { color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.score-bar { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 10px; }
.score-bar i { flex: 1; height: 8px; border-radius: 4px; background: var(--c, var(--ghost)); transition: background-color .5s; }
.score-action { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 34px; margin-top: 10px; }
.score-action:empty { visibility: hidden; }
.action { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.action-link { font-size: 15px; font-weight: 700; }
.glyph { width: 16px; height: 16px; }

.test-pieces { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Sections */
.section { padding-top: var(--section); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 26px; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; }
.steps p { margin-top: 4px; color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.step-n { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tile); box-shadow: 0 0 0 1px var(--hair); font-weight: 800; }
.step-go { background: var(--mar); color: #06243A; box-shadow: none; }

.keys { white-space: nowrap; }

/* What Brisa does: one panel in the sea's deep blue, white on it (5.6:1; the texts, 4.9:1). */
.head-center { text-align: center; }
.head-center .lede { margin-inline: auto; }
.panel {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(26px, 3.4vw, 44px) clamp(20px, 3vw, 40px);
  margin-top: 30px; padding: clamp(24px, 4vw, 48px); border-radius: 32px; list-style: none;
  background: linear-gradient(135deg, #1763DE 0%, #2456D8 100%); color: #FFF;
}
.panel li { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: #FFF; }
.feature-icon svg { width: 26px; height: 26px; fill: none; stroke: #1763DE; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.panel h3 { font-size: 20px; }
.panel p { margin-top: 4px; color: #E6F0FF; font-size: 16px; line-height: 1.4; }
.panel strong { color: #FFF; font-weight: 800; }

.faq { max-width: 720px; margin-top: 14px; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-size: 18px; font-weight: 800; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 64ch; }

/* Closing: the sea, with ink on it (9.9:1 on the green, 5.9:1 on the blue). */
.closing { padding: var(--section) 0; }
.closing-card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: clamp(22px, 3.4vw, 36px); border-radius: 28px; background: linear-gradient(120deg, var(--agua) 0%, var(--ceu) 100%); color: #06243A; }
.closing-card > img { width: 64px; height: 64px; filter: drop-shadow(0 8px 14px rgb(6 36 58 / .25)); }
.closing-text { flex: 1; min-width: 200px; }
.closing-text p { font-weight: 700; }

/* Footer */
.footer { padding: 28px 0 44px; border-top: 1px solid var(--hair); font-size: 15px; }
.footer-in { display: grid; grid-template-columns: auto 1fr; gap: 14px 28px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.footer-brand svg { width: auto; height: 20px; color: var(--ink); fill: currentColor; }
.footer-links, .footer-languages { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links { justify-content: flex-end; }
.footer-languages { grid-column: 1 / -1; }
.footer a { color: var(--ink-2); }
.footer-brand, .footer-languages a { text-decoration: none; }
.footer-languages a[aria-current] { color: var(--ink); font-weight: 800; }
.footer-legal { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-sub { max-width: 36ch; }
  .panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .panel { grid-template-columns: 1fr; border-radius: 26px; }
  .stage { height: 300px; }
  .footer-in { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .badge img { height: 42px; }
}
