/* bydda's site: the base every page shares (colour, type, buttons, surfaces), the nav, the footer, and the inner
   pages' layouts (page header, legal and policy pages, the 404). The homepage's own styles are inline in index.html and
   in home/; the get started flow's in start/index.html. Uses design-system/tokens.css for fonts and brand colours. */

:root {
  --bg: #FFFFFF; --band: #F6F5F2; --card: #FFFFFF; --card-2: #F6F5F2; --well: #F6F5F2;
  --text: #141216; --head: #141216; --text-2: #5D5963; --text-3: #6B6671; --hair: #E5E2E6; --hair-2: #D6D2D8;
  --on: #141216; --on-text: #fff;
  --surface: #F6F5F2;   /* a box on this ground: a fill a step off it, never an outline */
  --ai-soft: #FDECE8; --ai-text: #C23B2A; --ex-soft: #E9F0FE; --ex-text: #1F55CC; --lv-soft: #E2F5EA; --lv-text: #0F6E3E;
  --c-check: #FFF2E4; --c-ai: #F06A55; --c-ex: #7EA2FF; --c-lv: #5CD69A; --lead: #E5513E;
  --ease: cubic-bezier(.2,.7,.2,1);
  --wrap: 1240px;
}
.dark {
  --bg: #141216; --card: #1A181D; --card-2: #201E24; --well: #252229;
  --text: #F4F2F6; --head: #FFFFFF; --text-2: #A8A3AE; --text-3: #8A8490; --hair: rgba(255,255,255,.08); --hair-2: rgba(255,255,255,.14);
  --on: #FFFFFF; --on-text: #141216;
  --surface: #1C1A20;
  --ai-soft: rgba(240,106,85,.14); --ai-text: #F06A55; --ex-soft: rgba(126,162,255,.14); --ex-text: #7EA2FF; --lv-soft: rgba(92,214,154,.14); --lv-text: #5CD69A;
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--bd-font-body); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.ico { width: 16px; height: 16px; flex: none; }

/* type */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.eyebrow::before { content: ""; width: 11px; height: 11px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cg fill='%23141216'%3E%3Ccircle cx='5.5' cy='2' r='1.12'/%3E%3Ccircle cx='8.53' cy='3.75' r='1.12'/%3E%3Ccircle cx='8.53' cy='7.25' r='1.12'/%3E%3Ccircle cx='5.5' cy='9' r='1.12'/%3E%3Ccircle cx='2.47' cy='7.25' r='1.12'/%3E%3Ccircle cx='2.47' cy='3.75' r='1.12'/%3E%3C/g%3E%3Ccircle cx='5.5' cy='5.5' r='1.5' fill='%23E5513E'/%3E%3C/svg%3E") center / contain no-repeat; }
.dark .eyebrow::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cg fill='%23F4F2F6'%3E%3Ccircle cx='5.5' cy='2' r='1.12'/%3E%3Ccircle cx='8.53' cy='3.75' r='1.12'/%3E%3Ccircle cx='8.53' cy='7.25' r='1.12'/%3E%3Ccircle cx='5.5' cy='9' r='1.12'/%3E%3Ccircle cx='2.47' cy='7.25' r='1.12'/%3E%3Ccircle cx='2.47' cy='3.75' r='1.12'/%3E%3C/g%3E%3Ccircle cx='5.5' cy='5.5' r='1.5' fill='%23E5513E'/%3E%3C/svg%3E"); }
h1, h2 { margin: 0; font-family: var(--bd-font-display); font-weight: 500; font-stretch: 110%; color: var(--head); }
h1 { font-size: clamp(38px, 4.3vw, 62px); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.06; letter-spacing: -0.032em; text-wrap: balance; }
h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -0.015em; color: var(--head); }
.lede { margin: 0; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 34em; }
.small { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.fine { font-size: 13px; color: var(--text-3); }
/* a kicker over a headline inside a section, in capitals; its number, if it has one, in bydda's red */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.kicker i { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ai-text); }
.head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 10px; font: 500 15px/1 var(--bd-font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.btn--light { background: #fff; color: #141216; } .btn--light:hover { background: #E9E6EC; }
.btn--go { height: 48px; padding: 0 22px; background: var(--bd-color-action); color: #fff; } .btn--go:hover { background: var(--bd-color-action-hover); }
.btn--ghost { height: 48px; padding: 0 22px; background: rgba(255,255,255,.09); color: var(--text); } .btn--ghost:hover { background: rgba(255,255,255,.14); }
.link { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 500; color: var(--head); text-decoration: none; }
.link .ico { transition: translate .2s var(--ease); } .link:hover .ico { translate: 3px 0; }
:focus-visible { outline: 2px solid var(--bd-color-expert); outline-offset: 3px; border-radius: 6px; }

/* sections and surfaces */
.sec { padding: clamp(88px, 10vw, 136px) 0; }
.band { background: var(--band); }
.sec.dark { background: var(--bg); }   /* a dark band brings its own ground */
.card { position: relative; border-radius: 18px; background: var(--card); }

/* tags: soft tints of the brand's roles */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--text-2); background: var(--well); }
.tag--ai { color: var(--ai-text); background: var(--ai-soft); }
.tag--ex { color: var(--ex-text); background: var(--ex-soft); }
.tag--lv { color: var(--lv-text); background: var(--lv-soft); }

/* ---------- the nav ---------- */
/* the nav sits over the hero as the page opens. Once you scroll, it stays at the top on a darker glass: it's fixed
   from the moment its resting place would pass that point, so it never jumps, and only its glass fades in */
.nav-slot { display: flow-root; position: relative; z-index: 50; height: 94px; }   /* holds the nav and its top margin, so nothing below moves when it turns fixed */
.nav { position: relative; z-index: 50; display: flex; align-items: center; gap: 34px; max-width: var(--wrap); height: 58px; margin: 18px auto 0; padding: 0 8px 0 20px; border-radius: 14px; background: rgba(255,255,255,.05); transition: background-color .35s var(--ease), box-shadow .35s var(--ease), -webkit-backdrop-filter .35s, backdrop-filter .35s; }
.nav.stuck { position: fixed; top: 10px; left: 0; right: 0; margin: 0 auto; background: rgba(28,26,32,.86); box-shadow: 0 14px 40px -14px rgba(0,0,0,.55); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
section[id] { scroll-margin-top: 84px; }   /* clear of the fixed nav when a link jumps to it */
.nav__logo img { height: 24px; }
.nav__links { display: flex; gap: 28px; font-size: 14.5px; color: #CFCBD3; }
.nav__links a, .nav__login { text-decoration: none; transition: color .15s; }
.nav__links a:hover, .nav__login:hover { color: #fff; }
.nav__act { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14.5px; color: #CFCBD3; }
/* on the inner pages the nav is the homepage's scrolled glass from the start, held at the top */
.nav-slot--page { display: block; position: sticky; top: 10px; height: auto; margin: 10px 10px 0; }
.nav--page { margin: 0 auto; background: rgba(20,18,22,.92); box-shadow: 0 14px 40px -14px rgba(0,0,0,.45); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.nav__links a[aria-current="page"] { color: #fff; }   /* the page you are on, in the bar over a hero too */


/* reveal: sections settle in once as they arrive. Content is visible without JavaScript */
.js .rise { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .7s var(--ease); }
.js .rise.in { opacity: 1; translate: 0 0; }

/* ---------- the footer ---------- */
.foot { padding: 64px 0 40px; background: var(--bg); }
.foot__top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-bottom: 44px; border-bottom: 1px solid var(--hair); }
.foot__brand img { height: 24px; margin-bottom: 16px; }
.foot__brand p { margin: 0 0 6px; max-width: 24em; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.foot h4 { margin: 0 0 14px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.foot ul a { color: var(--text-2); text-decoration: none; } .foot ul a:hover { color: var(--head); }
.foot__bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; font-size: 13px; line-height: 1.55; color: var(--text-3); }

/* placeholders: details still to come, so they can't be missed before launch */
.ph { padding: 0 3px; border-radius: 3px; background: #FFF4D6; color: #6B4E00; box-shadow: 0 1px 0 #E8C66B; }
.draft { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: #6B4E00; background: #FFF4D6; }

/* ---------- a page's hero (dark): the bar over it, the page's question, and its scene as atmosphere ---------- */
/* <section class="dark phero" data-scene="dawn">, the bar (bar:over) first inside it, then .phero__in > .phero__txt.
   page.js draws the scene: on a computer to the right of the words, fading in from the middle; on a phone under them.
   Above the bands below it, so the bar it holds stays on top once it's fixed */
.phero { position: relative; z-index: 10; isolation: isolate; overflow: hidden; background: var(--bg); }
.phero__in { position: relative; z-index: 2; max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 9vh, 104px) 20px clamp(96px, 13vh, 160px); }
.phero__txt { display: grid; gap: 22px; justify-items: start; max-width: 640px; }
.phero .lede { max-width: 31em; }
.phero .ctas { margin-top: 10px; }
.phero--centre .phero__txt { margin-inline: auto; justify-items: center; max-width: 780px; text-align: center; }
.phero--centre .lede { max-width: 34em; }
/* a flat box: a fill a step off its ground (sand on white, the raised dark on dark), no outline, no shadow */
.box { display: grid; gap: 10px; align-content: start; min-width: 0; padding: clamp(22px, 2.4vw, 30px); border-radius: 18px; background: var(--surface); }
.box p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.cols { display: grid; gap: 16px; }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.head--centre { margin-inline: auto; justify-items: center; text-align: center; }
@media (max-width: 960px) {
  .phero__in { padding: 40px 16px 64px; }
  .phero[data-scene] .phero__in { padding-bottom: 0; }
  .phero[data-scene] { padding-bottom: 66vw; }
  .cols--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .cols--2 { grid-template-columns: 1fr; } }

/* ---------- inner pages: a header, then the page ---------- */
.page { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.phead { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.phead h1 { font-size: clamp(38px, 4.4vw, 60px); }
.phead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 0; font-size: 14px; color: var(--text-3); }

/* the legal and policy pages: contents on the left, the text on the right */
.legal { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 96px; display: grid; gap: 12px; font-size: 14px; }
.toc b { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(t) "."; color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--head); }
.prose { max-width: 70ch; font-size: 16.5px; line-height: 1.7; color: var(--text); counter-reset: s; overflow-wrap: break-word; }
.prose > section { padding-top: 8px; margin-bottom: 40px; scroll-margin-top: 96px; counter-increment: s; }
.prose h2 { margin-bottom: 14px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.025em; }
.prose h2::before { content: counter(s) ". "; color: var(--text-3); }
/* The legal pages keep their documents' own numbers, which clauses refer to (legal/build_legal.py). */
.prose--own h2::before, .toc--own a::before { content: none; }
.prose--own h2 .n, .toc--own .n { color: var(--text-3); }
/* the legal pages' contents: a heading with no number (the cookie policy's) takes the whole row, not the number's */
.toc--own a:not(:has(.n)) { grid-template-columns: 1fr; }
/* the contents in a box that folds on a phone; on a computer always open */
.toc details > summary { list-style: none; pointer-events: none; }
.toc details > summary::-webkit-details-marker { display: none; }
.toc details[open] > summary { margin-bottom: 12px; }
/* items that carry their own letters, (a), (b), have no bullet as well */
.prose ul.lettered { list-style: none; padding-left: 0; }
.prose h3 { margin: 22px 0 8px; font-size: 17.5px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--text-3); }
.prose a { color: var(--head); text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--head); }
.prose b, .prose strong { font-weight: 500; color: var(--head); }
.prose table { width: 100%; margin: 6px 0 18px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th { padding: 10px 12px 10px 0; text-align: left; font-size: 13px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--hair-2); }
.prose td { padding: 12px 12px 12px 0; vertical-align: top; border-bottom: 1px solid var(--hair); }
.callout { margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; background: var(--band); font-size: 15.5px; line-height: 1.6; }
.callout p:last-child { margin: 0; }

/* cards for pages like contact */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cardx { display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 20px; background: var(--band); }
.cardx h2 { font-size: 24px; letter-spacing: -0.02em; }
.cardx p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.cardx .btn, .cardx .link { justify-self: start; margin-top: 8px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; font-size: 15px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); }

@media (max-width: 1080px) {
  .foot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav-slot { height: 78px; }
  .nav { margin: 10px 10px 0; padding-left: 14px; }
  .nav.stuck { left: 10px; right: 10px; margin: 0; }
  .nav-slot--page { height: auto; margin: 10px 10px 0; }
  .wrap { padding: 0 16px; }
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 18px 20px; border-radius: 16px; background: var(--band); }
  .toc:has(details) { padding: 0 20px; }
  .toc details > summary { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; }
  .toc details > summary::after { content: ""; width: 8px; height: 8px; margin-right: 2px; border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .toc details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .toc details[open] > summary { margin-bottom: 0; }
  .toc details[open] > ol { padding-bottom: 12px; }
}
@media (max-width: 640px) {
  .nav__login { display: none; }
  .foot__top { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1 !important; translate: none !important; transition: none !important; }
}

/* ---------- the bar's menu on a phone (nav.js): a dotted button, and a panel that drops from the bar ---------- */
.nav__burger { display: none; }
.nav__menu { display: none; }
@media (max-width: 960px) {
  .nav__act { gap: 8px; }
  .nav__burger { all: unset; box-sizing: border-box; position: relative; display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.08); transition: background-color .2s; }
  .nav__burger:hover { background: rgba(255,255,255,.14); }
  .nav__burger:focus-visible { outline: 2px solid var(--bd-color-expert); outline-offset: 2px; }
  /* three lines drawn in dots, as the site's icons are; open, the outer two cross into an X and the middle one goes */
  .nav__burger span { display: block; width: 20px; height: 3px; background: radial-gradient(circle, #fff 1.2px, transparent 1.55px) 0 50% / 5px 3px repeat-x; transition: transform .25s var(--ease), opacity .2s; }
  .nav.menu-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg) scaleX(1.12); }
  .nav.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg) scaleX(1.12); }
  .nav__menu { display: block; position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 8px; border-radius: 14px; background: #1C1A20; box-shadow: 0 24px 60px -20px rgba(0,0,0,.7); opacity: 0; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .25s var(--ease); }
  .nav__menu[hidden] { display: none; }
  .nav__menu.on { opacity: 1; transform: none; }
  .nav__menu nav { display: grid; }
  .nav__menu a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: 16.5px; font-weight: 500; color: #E6E3EA; text-decoration: none; }
  .nav__menu a:hover, .nav__menu a:focus-visible { background: rgba(255,255,255,.06); color: #fff; outline: none; }
  .nav__menu a[aria-current="page"] { color: #fff; }
  .nav__menu-login { margin-top: 6px; color: var(--text-3, #8A8490) !important; font-weight: 400 !important; }
}
@media (prefers-reduced-motion: reduce) { .nav__burger span, .nav__menu { transition: none; } }

/* ---------- on a phone: things a thumb can hit (at least 40px tall), and a shorter footer ---------- */
@media (max-width: 960px) {
  .nav__logo { display: inline-flex; align-items: center; min-height: 44px; }
  .toc a { padding: 11px 0; }
}
@media (max-width: 640px) {
  .foot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .foot__brand { grid-column: 1 / -1; }
  .foot ul { gap: 0; }
  .foot ul a { display: block; padding: 11px 0; }
  .foot h4 { margin-bottom: 4px; }
  .cardx .link { padding: 10px 0; margin-top: 0; }
}

/* below the full width (phones, tablets and laptops), headings break into even lines, so no word is left alone on the
   last (1 December 2026) */
@media (max-width: 1240px) { h1, h2 { text-wrap: balance; } }

/* laptops (961px to the full width): the bar keeps a margin from the window's edges, as it does wider */
@media (min-width: 961px) and (max-width: 1272px) {
  .nav:not(.nav--page) { width: calc(100% - 32px); }
}
/* laptops: the footer stays in its columns (it went to the phone's two columns from 1080px) */
@media (min-width: 961px) and (max-width: 1080px) {
  .foot__top { grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 24px; }
  .foot__brand { grid-column: auto; }
}
/* laptops: a hero's words kept clear of its dotted scene, which fills in from the middle of the band */
@media (min-width: 961px) and (max-width: 1200px) {
  .phero .phero__txt .lede, .hero .hero__txt .lede { max-width: 25em; }   /* after the homepage's own rule */
}
/* the legal pages' contents, beside the words on a computer, kept within the window */
@media (min-width: 961px) {
  .toc { max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; }
}
/* a table of labels and values (no header): the labels on one line */
@media (min-width: 641px) {
  .tbl table:not(:has(thead)) td:first-child { width: 1%; white-space: nowrap; padding-right: 28px; }
}
