/*
 * Tidal Pane: components
 * Needs tokens.css first. Every class starts with "tp-" so it can sit next to any other CSS.
 */

/* Base */
.tp { margin: 0; background: var(--tp-abyss); color: var(--tp-foam); font-family: var(--tp-sans); font-size: var(--tp-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp :where(a) { color: inherit; }
.tp img { max-width: 100%; display: block; }
.tp-container { width: min(100% - 40px, var(--tp-container)); margin-inline: auto; }
.tp-narrow { width: min(100% - 40px, var(--tp-narrow)); margin-inline: auto; }
.tp-center { text-align: center; }
.tp-center .tp-lead { margin-inline: auto; }

/* Sections */
.tp-section { position: relative; padding-block: var(--tp-section); }
.tp-section--deep { background: var(--tp-deep); border-block: var(--tp-border); }
.tp-section--water { background: var(--tp-water); }
.tp-rule { height: 1px; border: 0; margin: 0; background: var(--tp-line); }

/* Type: heavy rounded grotesque. The second line of a headline glows aqua */
.tp-hero-title, .tp-h2, .tp-h3 { margin: 0; font-weight: 800; color: inherit; text-wrap: balance; }
.tp-hero-title { font-size: var(--tp-text-hero); letter-spacing: var(--tp-tracking-hero); line-height: 1; }
.tp-h2 { font-size: var(--tp-text-h2); letter-spacing: var(--tp-tracking-h2); line-height: 1.05; }
.tp-h3 { font-size: var(--tp-text-h3); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.tp-glow-text { display: block; color: var(--tp-aqua); text-shadow: 0 0 28px rgba(63, 230, 224, .35); }
.tp-lead { max-width: 620px; margin: 22px 0 0; color: var(--tp-mist); font-size: var(--tp-text-lead); font-weight: 500; line-height: 1.5; }
.tp-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--tp-aqua); font-family: var(--tp-mono); font-size: var(--tp-text-micro); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.tp-mono { font-family: var(--tp-mono); font-size: var(--tp-text-small); }
.tp-muted { color: var(--tp-mist); }

/* Nav: a floating glass capsule. Logo pill left, links and two pill actions right */
.tp-nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; }
.tp-logo { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: var(--tp-border); border-radius: var(--tp-radius-pill); background: rgba(6, 28, 34, .72); color: var(--tp-aqua); font-weight: 800; font-size: 15px; letter-spacing: -.02em; text-decoration: none; backdrop-filter: blur(12px); white-space: nowrap; }
.tp-logo svg { width: 16px; height: 16px; }
.tp-nav__bar { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border: var(--tp-border); border-radius: var(--tp-radius-pill); background: rgba(6, 28, 34, .72); backdrop-filter: blur(12px); }
.tp-nav__links { display: flex; gap: 22px; margin-right: 12px; font-size: 14px; font-weight: 700; }
.tp-nav__links a { text-decoration: none; color: var(--tp-foam); }
.tp-nav__links a:hover { color: var(--tp-aqua); }

/* Buttons: pills. Pale solid for the main action, aqua outline that glows for the second */
.tp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 1px solid transparent; border-radius: var(--tp-radius-pill); font-family: var(--tp-sans); font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: box-shadow .25s var(--tp-ease), background .25s var(--tp-ease), transform .2s var(--tp-ease); }
.tp-btn:active { transform: scale(.97); }
.tp-btn--pale { background: var(--tp-pale); color: var(--tp-abyss); }
.tp-btn--pale:hover { background: var(--tp-foam); }
.tp-btn--glow { border-color: var(--tp-aqua); background: rgba(3, 16, 20, .5); color: var(--tp-foam); box-shadow: 0 0 14px rgba(63, 230, 224, .28); }
.tp-btn--glow:hover { box-shadow: var(--tp-glow); }
.tp-btn--aqua { background: var(--tp-aqua); color: var(--tp-abyss); box-shadow: 0 0 22px rgba(63, 230, 224, .35); }
.tp-btn--aqua:hover { background: #6BF0EB; }
.tp-btn--quiet { border-color: var(--tp-line-bright); background: transparent; color: var(--tp-foam); }
.tp-btn--quiet:hover { border-color: var(--tp-mist); }
.tp-btn--sm { padding: 8px 16px; font-size: 14px; }
.tp-btn--block { width: 100%; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.tp-center .tp-actions { justify-content: center; }

/* Hero with the tile wall: outlined windows receding in perspective on both sides */
.tp-hero { position: relative; overflow: hidden; background: var(--tp-water); padding-bottom: 40px; }
.tp-hero__inner { position: relative; z-index: 2; padding-block: clamp(72px, 12vw, 150px) clamp(56px, 8vw, 96px); }
.tp-wall { position: absolute; inset: 0; z-index: 1; pointer-events: none; perspective: 900px; }
.tp-wall__side { position: absolute; top: -4%; width: 46%; height: 110%; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 118px; gap: 18px; padding: 18px; opacity: .55; }
.tp-wall__side--left { left: -14%; transform: rotateY(48deg); transform-origin: left center; }
.tp-wall__side--right { right: -14%; transform: rotateY(-48deg); transform-origin: right center; }
.tp-wall__side i { display: block; border: 1px solid var(--tp-line-bright); border-radius: var(--tp-radius); background: linear-gradient(180deg, rgba(63, 230, 224, .07), rgba(63, 230, 224, 0) 60%); box-shadow: inset 0 0 24px rgba(63, 230, 224, .05); }
.tp-wall__side i:nth-child(3n) { grid-row: span 2; }
.tp-wall__side i:nth-child(5n) { grid-column: span 2; }
.tp-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 45%, var(--tp-abyss) 0%, rgba(3, 16, 20, .7) 45%, rgba(3, 16, 20, 0) 80%), linear-gradient(0deg, var(--tp-abyss) 0%, rgba(3, 16, 20, 0) 30%); }

/* Dock: the slim glowing status bar under the hero */
.tp-dock { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100% - 40px, 980px); margin-inline: auto; padding: 8px 14px; border: 1px solid var(--tp-aqua); border-radius: var(--tp-radius-sm); background: rgba(6, 28, 34, .85); box-shadow: 0 0 24px rgba(63, 230, 224, .3), inset 0 0 12px rgba(63, 230, 224, .08); font-family: var(--tp-mono); font-size: var(--tp-text-micro); color: var(--tp-mist); overflow-x: clip; }
.tp-dock__group { display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; }
.tp-dock__ws { display: flex; gap: 4px; }
.tp-dock__ws b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-weight: 500; color: var(--tp-dim); }
.tp-dock__ws b.is-on { background: var(--tp-aqua); color: var(--tp-abyss); }
.tp-dock__meter { width: 70px; height: 5px; border-radius: 3px; background: var(--tp-line); overflow: hidden; }
.tp-dock__meter span { display: block; height: 100%; background: var(--tp-aqua); }

/* Pane: a product window with a lit edge */
.tp-pane { position: relative; overflow: hidden; border: 1px solid var(--tp-line-bright); border-radius: var(--tp-radius); background: var(--tp-deep); box-shadow: var(--tp-shadow), var(--tp-edge); }
.tp-pane--active { border-color: var(--tp-aqua); box-shadow: var(--tp-shadow), 0 0 22px rgba(63, 230, 224, .25); }
.tp-pane__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: var(--tp-border); font-family: var(--tp-mono); font-size: var(--tp-text-micro); color: var(--tp-dim); }
.tp-pane__body { padding: 18px; }
.tp-tiling { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 12px; }
.tp-tiling > :first-child { grid-row: span 2; }

/* Cards */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tp-card { padding: 28px; border: var(--tp-border); border-radius: var(--tp-radius); background: var(--tp-shelf); box-shadow: var(--tp-edge); transition: border-color .25s var(--tp-ease), background .25s var(--tp-ease); }
.tp-card:hover { border-color: var(--tp-line-bright); background: var(--tp-shelf-2); }
.tp-card__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 28px; border: 1px solid var(--tp-aqua); border-radius: 12px; color: var(--tp-aqua); box-shadow: 0 0 16px rgba(63, 230, 224, .2); }
.tp-card__icon svg { width: 22px; height: 22px; }
.tp-card__title { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.tp-card__text { margin: 0; color: var(--tp-mist); font-size: 15px; }

/* Chips and dots inside product UI */
.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: var(--tp-border); border-radius: var(--tp-radius-pill); background: var(--tp-shelf); color: var(--tp-mist); font-family: var(--tp-mono); font-size: 11px; white-space: nowrap; }
.tp-chip--aqua { border-color: var(--tp-aqua); background: var(--tp-aqua-soft); color: var(--tp-aqua); }
.tp-chip--coral { border-color: rgba(255, 122, 102, .5); color: var(--tp-coral); }
.tp-chip--kelp { border-color: rgba(139, 226, 139, .45); color: var(--tp-kelp); }
.tp-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* Readout: a big number with a label, inside panes and stat rows */
.tp-readout { display: grid; gap: 2px; }
.tp-readout b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tp-readout span { color: var(--tp-dim); font-family: var(--tp-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: var(--tp-border); border-radius: var(--tp-radius); overflow: hidden; }
.tp-stat { padding: 28px; border-right: var(--tp-border); }
.tp-stat:last-child { border-right: 0; }
.tp-stat b { display: block; color: var(--tp-aqua); font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.tp-stat span { display: block; margin-top: 10px; color: var(--tp-mist); font-size: 14px; }

/* Sparkline drawn with inline SVG */
.tp-spark { width: 100%; height: 64px; display: block; }
.tp-spark path { fill: none; stroke: var(--tp-aqua); stroke-width: 2; filter: drop-shadow(0 0 4px var(--tp-aqua-glow)); }

/* Quote */
.tp-quote { margin: 0; font-size: clamp(24px, 3vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.25; }
.tp-quote__by { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--tp-mist); font-size: 15px; }
.tp-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--tp-aqua); border-radius: 50%; color: var(--tp-aqua); font-weight: 800; font-size: 14px; }

/* Pricing */
.tp-toggle { display: inline-flex; gap: 2px; padding: 4px; border: var(--tp-border); border-radius: var(--tp-radius-pill); background: var(--tp-deep); }
.tp-toggle button { padding: 8px 18px; border: 0; border-radius: var(--tp-radius-pill); background: transparent; color: var(--tp-mist); font: 700 14px var(--tp-sans); cursor: pointer; white-space: nowrap; }
.tp-toggle button[aria-pressed="true"] { background: var(--tp-aqua); color: var(--tp-abyss); }
.tp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; align-items: stretch; }
.tp-plan { display: flex; flex-direction: column; padding: 32px 28px; border: var(--tp-border); border-radius: var(--tp-radius-lg); background: var(--tp-deep); box-shadow: var(--tp-edge); }
.tp-plan--featured { border-color: var(--tp-aqua); background: linear-gradient(180deg, rgba(63, 230, 224, .08), var(--tp-deep) 50%); box-shadow: 0 0 36px rgba(63, 230, 224, .18); }
.tp-plan__label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 20px; }
.tp-plan__name { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tp-plan__desc { margin: 0; color: var(--tp-mist); font-size: 15px; }
.tp-plan__price { margin: 28px 0 24px; font-size: 52px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.tp-plan__price small { color: var(--tp-dim); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.tp-plan__list { display: grid; gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; font-size: 15px; flex: 1; }
.tp-plan__list li { display: flex; gap: 10px; align-items: flex-start; }
.tp-plan__list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px; background: var(--tp-aqua); box-shadow: 0 0 8px var(--tp-aqua-glow); }
.tp-compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-compare th, .tp-compare td { padding: 14px 12px; border-bottom: var(--tp-border); text-align: left; }
.tp-compare th { color: var(--tp-dim); font-family: var(--tp-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.tp-compare td:not(:first-child), .tp-compare th:not(:first-child) { text-align: center; }
.tp-yes { color: var(--tp-aqua); font-weight: 800; }
.tp-faq details { padding: 20px 0; border-bottom: var(--tp-border); }
.tp-faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tp-faq summary::after { content: "+"; color: var(--tp-aqua); font-family: var(--tp-mono); }
.tp-faq details[open] summary::after { content: "-"; }
.tp-faq p { margin: 12px 0 0; color: var(--tp-mist); }

/* Article */
.tp-article { font-size: 18px; line-height: 1.75; }
.tp-article > * + * { margin-top: 22px; }
.tp-article h2 { margin-top: 52px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.tp-article h3 { margin-top: 36px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.tp-article p, .tp-article li { color: #CFE3E6; }
.tp-article a { color: var(--tp-aqua); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tp-article code { padding: 2px 6px; border: var(--tp-border); border-radius: 6px; background: var(--tp-shelf); font-family: var(--tp-mono); font-size: .85em; color: var(--tp-aqua); }
.tp-article pre { overflow-x: auto; padding: 20px; border: 1px solid var(--tp-line-bright); border-radius: var(--tp-radius); background: var(--tp-deep); font-family: var(--tp-mono); font-size: 14px; line-height: 1.7; color: var(--tp-mist); }
.tp-article pre code { padding: 0; border: 0; background: none; color: inherit; }
.tp-article blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--tp-aqua); color: var(--tp-foam); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }
.tp-article figure { margin-inline: 0; }
.tp-article figcaption { margin-top: 10px; color: var(--tp-dim); font-family: var(--tp-mono); font-size: 12px; }
.tp-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; color: var(--tp-mist); font-size: 14px; }
.tp-callout { padding: 20px 22px; border: 1px solid var(--tp-aqua); border-radius: var(--tp-radius); background: var(--tp-aqua-soft); }
.tp-callout strong { color: var(--tp-aqua); }

/* Forms */
.tp-form { display: grid; gap: 18px; }
.tp-field { display: grid; gap: 8px; }
.tp-label { font-size: 14px; font-weight: 700; }
.tp-input, .tp-select { width: 100%; padding: 13px 16px; border: 1px solid var(--tp-line-bright); border-radius: var(--tp-radius-sm); background: var(--tp-abyss); color: var(--tp-foam); font: 500 15px var(--tp-sans); outline: none; transition: border-color .2s var(--tp-ease), box-shadow .2s var(--tp-ease); }
.tp-input::placeholder { color: var(--tp-dim); }
.tp-input:focus, .tp-select:focus { border-color: var(--tp-aqua); box-shadow: 0 0 0 3px var(--tp-aqua-soft), 0 0 14px rgba(63, 230, 224, .2); }
.tp-hint { color: var(--tp-dim); font-size: 13px; }
.tp-check { display: flex; gap: 10px; align-items: flex-start; color: var(--tp-mist); font-size: 14px; }
.tp-check input { margin-top: 3px; accent-color: var(--tp-aqua); }
.tp-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.tp-choice label { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--tp-line-bright); border-radius: var(--tp-radius-sm); cursor: pointer; font-weight: 700; font-size: 14px; }
.tp-choice label span { color: var(--tp-dim); font-weight: 500; font-size: 12px; }
.tp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.tp-choice label:has(input:checked) { border-color: var(--tp-aqua); background: var(--tp-aqua-soft); box-shadow: 0 0 14px rgba(63, 230, 224, .18); }
.tp-divider { display: flex; align-items: center; gap: 14px; color: var(--tp-dim); font-family: var(--tp-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.tp-divider::before, .tp-divider::after { content: ""; flex: 1; height: 1px; background: var(--tp-line); }

/* Footer */
.tp-footer { padding-block: 64px 40px; border-top: var(--tp-border); color: var(--tp-mist); font-size: 14px; }
.tp-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.tp-footer h4 { margin: 0 0 14px; color: var(--tp-foam); font-size: 13px; font-weight: 800; }
.tp-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tp-footer a { text-decoration: none; }
.tp-footer a:hover { color: var(--tp-aqua); }
.tp-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: var(--tp-border); color: var(--tp-dim); font-family: var(--tp-mono); font-size: 12px; }

/* Motion */
.tp-rise { animation: tp-rise .9s var(--tp-ease) both; }
.tp-rise--2 { animation-delay: .12s; }
.tp-rise--3 { animation-delay: .24s; }
@keyframes tp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tp-rise { animation: none; } }

/* Small screens */
@media (max-width: 860px) {
  .tp-nav__links { display: none; }
  .tp-nav__bar { padding-left: 6px; }
  .tp-wall__side { width: 70%; opacity: .4; }
  .tp-wall__side--left { left: -40%; }
  .tp-wall__side--right { right: -40%; }
  .tp-tiling { grid-template-columns: 1fr; }
  .tp-tiling > :first-child { grid-row: auto; }
  .tp-footer__grid { grid-template-columns: 1fr 1fr; }
  .tp-stat { border-right: 0; border-bottom: var(--tp-border); }
  .tp-stat:last-child { border-bottom: 0; }
  .tp-dock__hide { display: none; }
}
@media (max-width: 480px) {
  .tp-nav__bar .tp-btn--quiet { display: none; }
  .tp-compare { font-size: 13px; }
  .tp-compare th, .tp-compare td { padding: 12px 6px; }
}
