/*
 * Bright Words: components
 * Every value comes from tokens.css. Load tokens.css first.
 */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bw-coal);
  color: var(--bw-white);
  font-family: var(--bw-sans);
  font-size: var(--bw-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--bw-cyan); text-decoration: none; }
a:hover { color: var(--bw-white); }
:focus-visible { outline: 2px solid var(--bw-cyan); outline-offset: 3px; border-radius: var(--bw-radius-sm); }

.bw-container { width: 100%; max-width: var(--bw-container); margin: 0 auto; padding: 0 var(--bw-gutter); }
.bw-narrow { max-width: var(--bw-narrow); }
.bw-section { padding: var(--bw-section) 0; }
.bw-section--raised { background: var(--bw-coal-2); }
.bw-section--line { border-top: var(--bw-border); }

/* Wordmark: two-tone, like the headlines */
.bw-logo { font-family: var(--bw-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--bw-white); white-space: nowrap; }
.bw-logo b { color: var(--bw-cyan); font-weight: 600; }

/* Nav */
.bw-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0; }
.bw-nav__links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.bw-nav__links a { color: var(--bw-white); font-family: var(--bw-display); font-weight: 500; font-size: 15px; }
.bw-nav__links a:hover, .bw-nav__links a[aria-current] { color: var(--bw-cyan); }
.bw-nav__links a .bw-caret { display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
@media (max-width: 860px) { .bw-nav__links { display: none; } }

/* Headlines: white with a few lit words */
.bw-hero-title, .bw-h2, .bw-h3 { font-family: var(--bw-display); font-weight: 600; margin: 0; color: var(--bw-white); }
.bw-hero-title { font-size: var(--bw-text-hero); line-height: var(--bw-leading-hero); letter-spacing: var(--bw-tracking-hero); max-width: 22ch; text-wrap: balance; }
.bw-h2 { font-size: var(--bw-text-h2); line-height: 1.15; letter-spacing: var(--bw-tracking-h2); text-wrap: balance; }
.bw-h3 { font-size: var(--bw-text-h3); line-height: 1.3; font-weight: 500; }
.bw-lit { color: var(--bw-cyan); }
.bw-lead { font-size: var(--bw-text-lead); color: var(--bw-mist); line-height: 1.6; max-width: 600px; margin: 20px 0 0; }
.bw-eyebrow { font-family: var(--bw-display); font-size: var(--bw-text-small); font-weight: 500; color: var(--bw-cyan); letter-spacing: .02em; margin: 0 0 14px; }

/* Buttons: pills */
.bw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px; border-radius: var(--bw-radius-pill);
  font-family: var(--bw-display); font-weight: 500; font-size: 15px; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer; transition: background .25s var(--bw-ease), color .25s var(--bw-ease), box-shadow .25s var(--bw-ease);
}
.bw-btn--primary { background: var(--bw-cyan); color: var(--bw-cyan-ink); }
.bw-btn--primary:hover { background: var(--bw-white); color: var(--bw-cyan-ink); box-shadow: var(--bw-glow); }
.bw-btn--outline { border-color: var(--bw-cyan); color: var(--bw-cyan); background: transparent; }
.bw-btn--outline:hover { background: var(--bw-cyan-soft); color: var(--bw-white); }
.bw-btn--quiet { background: var(--bw-coal-3); color: var(--bw-white); }
.bw-btn--quiet:hover { background: var(--bw-line); color: var(--bw-white); }
.bw-btn--sm { height: 38px; padding: 0 18px; font-size: 14px; }
.bw-btn--block { width: 100%; }
.bw-btn__arrow { width: 16px; height: 16px; }

/* Hero */
.bw-hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.bw-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Dream pane: the signature image. Rounded tile of blurred light with a line drawing on top */
.bw-pane { position: relative; overflow: hidden; border-radius: var(--bw-radius-lg); background: var(--bw-coal-2); aspect-ratio: 4 / 3; isolation: isolate; }
.bw-pane--wide { aspect-ratio: 16 / 7; }
.bw-pane--tall { aspect-ratio: 4 / 5; }
.bw-pane__light { position: absolute; border-radius: 50%; filter: blur(var(--bw-blur)); opacity: .75; z-index: -1; }
.bw-pane__light--cyan { background: var(--bw-cyan); }
.bw-pane__light--apricot { background: var(--bw-apricot); }
.bw-pane__light--lilac { background: var(--bw-lilac); }
.bw-pane__light--rose { background: var(--bw-rose); }
.bw-pane__art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--bw-white); }
.bw-pane__tag { position: absolute; left: 18px; bottom: 18px; }

/* Split: pane on one side, words on the other */
.bw-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.bw-split--flip > :first-child { order: 2; }
@media (max-width: 820px) { .bw-split { grid-template-columns: 1fr; } .bw-split--flip > :first-child { order: 0; } }

/* Chips */
.bw-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: var(--bw-radius-pill); background: var(--bw-coal-3); color: var(--bw-white); font-size: 13px; font-weight: 500; white-space: nowrap; }
.bw-chip--lit { background: var(--bw-cyan-soft); color: var(--bw-cyan); }
.bw-chip--glass { background: rgba(30, 31, 34, .55); backdrop-filter: blur(8px); }
.bw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bw-cyan); }
.bw-dot--green { background: var(--bw-green); }
.bw-dot--amber { background: var(--bw-amber); }

/* Cards */
.bw-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.bw-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .bw-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .bw-grid, .bw-grid--2 { grid-template-columns: 1fr; } }
.bw-card { background: var(--bw-coal-2); border-radius: var(--bw-radius); padding: 28px; transition: background .25s var(--bw-ease); }
.bw-card:hover { background: var(--bw-coal-3); }
.bw-card__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bw-cyan-soft); color: var(--bw-cyan); margin-bottom: 40px; }
.bw-card__icon svg { width: 22px; height: 22px; }
.bw-card__title { font-family: var(--bw-display); font-weight: 500; font-size: 19px; margin: 0 0 8px; }
.bw-card__text { color: var(--bw-mist); margin: 0; font-size: 15px; }

/* Story card: pane on top, words under (news, routes, posts) */
.bw-story { display: block; color: var(--bw-white); }
.bw-story .bw-pane { aspect-ratio: 3 / 2; transition: transform .4s var(--bw-ease); }
.bw-story:hover .bw-pane { transform: scale(.985); }
.bw-story__meta { color: var(--bw-faint); font-size: 13px; margin: 18px 0 6px; }
.bw-story__title { font-family: var(--bw-display); font-weight: 500; font-size: 20px; line-height: 1.35; margin: 0; }
.bw-story:hover .bw-story__title { color: var(--bw-cyan); }

/* Section head with a link on the right */
.bw-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.bw-link { font-family: var(--bw-display); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Stats */
.bw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 620px) { .bw-stats { grid-template-columns: 1fr; } }
.bw-stat__num { font-family: var(--bw-display); font-weight: 600; font-size: clamp(40px, 5vw, 60px); letter-spacing: -.03em; line-height: 1; color: var(--bw-cyan); }
.bw-stat__label { color: var(--bw-mist); margin-top: 10px; }

/* Quote */
.bw-quote { font-family: var(--bw-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.35; font-weight: 500; letter-spacing: -.015em; margin: 0; }
.bw-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; color: var(--bw-mist); font-size: 15px; }
.bw-avatar { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--bw-apricot), var(--bw-lilac)); flex: none; }

/* Band: the closing call to action */
.bw-band { position: relative; overflow: hidden; border-radius: var(--bw-radius-lg); background: var(--bw-coal-2); padding: clamp(40px, 7vw, 88px); isolation: isolate; }

/* Forms */
.bw-field { display: grid; gap: 8px; margin-bottom: 18px; }
.bw-label { font-family: var(--bw-display); font-size: 14px; font-weight: 500; }
.bw-input, .bw-select {
  width: 100%; height: 52px; padding: 0 18px; border-radius: var(--bw-radius-sm);
  background: var(--bw-coal-2); border: var(--bw-border); color: var(--bw-white);
  font: inherit; transition: border-color .2s var(--bw-ease), box-shadow .2s var(--bw-ease);
}
.bw-input::placeholder { color: var(--bw-faint); }
.bw-input:focus, .bw-select:focus { outline: none; border-color: var(--bw-cyan); box-shadow: 0 0 0 4px var(--bw-cyan-soft); }
.bw-hint { color: var(--bw-faint); font-size: 13px; }
.bw-check { display: flex; gap: 12px; align-items: flex-start; color: var(--bw-mist); font-size: 14px; }
.bw-check input { accent-color: var(--bw-cyan); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.bw-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bw-choice label { display: grid; place-items: center; gap: 2px; padding: 14px 8px; border-radius: var(--bw-radius-sm); background: var(--bw-coal-2); border: var(--bw-border); cursor: pointer; font-size: 14px; text-align: center; }
.bw-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bw-choice input:checked + label { border-color: var(--bw-cyan); color: var(--bw-cyan); background: var(--bw-cyan-soft); }
.bw-divider { display: flex; align-items: center; gap: 14px; color: var(--bw-faint); font-size: 13px; margin: 22px 0; }
.bw-divider::before, .bw-divider::after { content: ""; flex: 1; height: 1px; background: var(--bw-line); }

/* Toggle (monthly / yearly) */
.bw-toggle { display: inline-flex; padding: 5px; border-radius: var(--bw-radius-pill); background: var(--bw-coal-2); border: var(--bw-border); }
.bw-toggle button { height: 38px; padding: 0 20px; border-radius: var(--bw-radius-pill); border: 0; background: transparent; color: var(--bw-mist); font-family: var(--bw-display); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; }
.bw-toggle button[aria-pressed="true"] { background: var(--bw-cyan); color: var(--bw-cyan-ink); }

/* Pricing */
.bw-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 900px) { .bw-plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }
.bw-plan { display: flex; flex-direction: column; background: var(--bw-coal-2); border-radius: var(--bw-radius-lg); padding: 32px; border: 1.5px solid transparent; }
.bw-plan--featured { border-color: var(--bw-cyan); box-shadow: var(--bw-glow); }
.bw-plan__name { font-family: var(--bw-display); font-weight: 600; font-size: 22px; margin: 0; }
.bw-plan__desc { color: var(--bw-mist); font-size: 15px; margin: 8px 0 24px; }
.bw-plan__price { font-family: var(--bw-display); font-weight: 600; font-size: 50px; letter-spacing: -.03em; line-height: 1; }
.bw-plan__price small { font-size: 15px; font-weight: 400; color: var(--bw-mist); letter-spacing: 0; margin-left: 4px; }
.bw-plan__note { color: var(--bw-faint); font-size: 13px; margin: 8px 0 26px; }
.bw-plan__list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; font-size: 15px; }
.bw-plan__list li { display: flex; gap: 12px; }
.bw-plan__list li::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 3px; border-radius: 50%; background: var(--bw-cyan-soft) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%234ccaea' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.bw-plan .bw-btn { margin-top: auto; }

/* Compare table */
.bw-table-wrap { overflow-x: auto; border-radius: var(--bw-radius); border: var(--bw-border); }
.bw-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.bw-table th, .bw-table td { padding: 16px 20px; text-align: left; border-bottom: var(--bw-border); }
.bw-table thead th { font-family: var(--bw-display); font-weight: 500; background: var(--bw-coal-2); }
.bw-table tbody tr:last-child td { border-bottom: 0; }
.bw-table td { color: var(--bw-mist); }
.bw-table td:first-child { color: var(--bw-white); }
.bw-yes { color: var(--bw-cyan); font-weight: 600; }

/* FAQ */
.bw-faq { border-top: var(--bw-border); }
.bw-faq details { border-bottom: var(--bw-border); padding: 22px 0; }
.bw-faq summary { font-family: var(--bw-display); font-weight: 500; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.bw-faq summary::-webkit-details-marker { display: none; }
.bw-faq summary::after { content: "+"; color: var(--bw-cyan); font-size: 24px; line-height: 1; }
.bw-faq details[open] summary::after { content: "\2212"; }
.bw-faq p { color: var(--bw-mist); margin: 14px 0 0; max-width: 640px; }

/* Article */
.bw-article { max-width: var(--bw-narrow); margin: 0 auto; }
.bw-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--bw-faint); font-size: 14px; margin-top: 22px; }
.bw-prose { font-size: 18px; line-height: 1.75; color: var(--bw-white); }
.bw-prose p { margin: 0 0 24px; }
.bw-prose h2 { font-family: var(--bw-display); font-weight: 600; font-size: 28px; letter-spacing: -.015em; line-height: 1.25; margin: 52px 0 16px; }
.bw-prose a { border-bottom: 1px solid var(--bw-cyan); }
.bw-prose ul { padding-left: 22px; margin: 0 0 24px; }
.bw-prose li { margin-bottom: 8px; }
.bw-prose li::marker { color: var(--bw-cyan); }
.bw-prose blockquote { margin: 36px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--bw-cyan); font-family: var(--bw-display); font-size: 24px; line-height: 1.4; font-weight: 500; }
.bw-figure { margin: 40px 0; }
.bw-figure figcaption { color: var(--bw-faint); font-size: 14px; margin-top: 12px; }
.bw-note { background: var(--bw-coal-2); border-radius: var(--bw-radius); padding: 22px 24px; font-size: 16px; color: var(--bw-mist); margin: 0 0 24px; }
.bw-note strong { color: var(--bw-cyan); font-family: var(--bw-display); font-weight: 500; }

/* Footer */
.bw-footer { border-top: var(--bw-border); padding: 64px 0 40px; color: var(--bw-mist); font-size: 15px; }
.bw-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .bw-footer__grid { grid-template-columns: 1fr 1fr; } .bw-footer__grid > :first-child { grid-column: 1 / -1; } }
.bw-footer h4 { font-family: var(--bw-display); color: var(--bw-white); font-weight: 500; font-size: 15px; margin: 0 0 14px; }
.bw-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bw-footer a { color: var(--bw-mist); }
.bw-footer a:hover { color: var(--bw-cyan); }
.bw-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: var(--bw-border); color: var(--bw-faint); font-size: 13px; }

/* Entrance: slow rise and fade, like the reference's reveal */
.bw-rise { animation: bw-rise 1.1s var(--bw-ease) both; }
.bw-rise--2 { animation-delay: .15s; }
.bw-rise--3 { animation-delay: .3s; }
@keyframes bw-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bw-rise { animation: none; } }
