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

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

/* Sections */
.dp-section { padding-block: var(--dp-section); }
.dp-section--mist { background: var(--dp-mist); }
.dp-section--night { background: var(--dp-night); color: var(--dp-moon); }
.dp-section--night .dp-lead { color: var(--dp-moon-soft); }

/* Type: serif for headlines, grotesk for the rest, mono for tiny window labels */
.dp-hero-title, .dp-h2 { margin: 0; font-family: var(--dp-serif); font-weight: 400; color: inherit; }
.dp-hero-title { font-size: var(--dp-text-hero); letter-spacing: var(--dp-tracking-hero); line-height: 1.06; }
.dp-h2 { font-size: var(--dp-text-h2); letter-spacing: var(--dp-tracking-h2); line-height: 1.12; }
.dp-h3 { margin: 0; font-size: var(--dp-text-h3); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.dp-lead { max-width: 640px; margin: 18px 0 0; color: var(--dp-soft); font-size: var(--dp-text-lead); line-height: 1.55; }
.dp-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--dp-soft); font-size: var(--dp-text-small); font-weight: 500; }
.dp-eyebrow .dp-spark { width: 14px; height: 14px; }
.dp-mono { font-family: var(--dp-mono); font-size: var(--dp-text-micro); letter-spacing: .02em; }
.dp-ember { color: var(--dp-ember); }

/* The spark: a small eight-point coral star, the mark of the assistant */
.dp-spark { flex: none; width: 18px; height: 18px; color: var(--dp-ember); fill: currentColor; }

/* Logo: a folded pane mark in dusk colors and a lowercase wordmark */
.dp-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--dp-ink); font-weight: 600; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
.dp-logo__mark { width: 22px; height: 22px; border-radius: 6px 6px 6px 12px; background: var(--dp-dusk); box-shadow: inset 0 0 0 1px rgba(23, 21, 28, .08); position: relative; }
.dp-logo__mark::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--dp-night); }

/* Nav: plain, centered links, one outlined button on the right */
.dp-nav { position: sticky; top: 0; z-index: 10; background: rgba(250, 249, 247, .9); backdrop-filter: blur(10px); }
.dp-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.dp-nav__links { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.dp-nav__links a { text-decoration: none; color: var(--dp-ink); }
.dp-nav__links a:hover { color: var(--dp-soft); }
.dp-nav__right { display: flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 500; }
.dp-nav__right a:not(.dp-btn) { text-decoration: none; }

/* Buttons: near-black for the action, outlined for the quiet one, never colored */
.dp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border: 1px solid transparent; border-radius: var(--dp-radius-sm); font-family: var(--dp-sans); font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--dp-ease), border-color .2s var(--dp-ease); }
.dp-btn--primary { background: var(--dp-ink); color: var(--dp-page); }
.dp-btn--primary:hover { background: #2c2934; }
.dp-btn--outline { border-color: var(--dp-line-strong); background: var(--dp-paper); color: var(--dp-ink); }
.dp-btn--outline:hover { border-color: var(--dp-ink); }
.dp-btn--moon { background: var(--dp-moon); color: var(--dp-night); }
.dp-btn--lg { padding: 16px 26px; font-size: 18px; border-radius: 12px; }
.dp-btn--sm { padding: 8px 14px; font-size: 14px; }
.dp-btn--block { width: 100%; }
.dp-btn svg { width: 18px; height: 18px; fill: currentColor; }
.dp-textlink { color: var(--dp-soft); font-size: 15px; text-decoration: none; white-space: nowrap; }
.dp-textlink:hover { color: var(--dp-ink); text-decoration: underline; text-underline-offset: 4px; }

/* Hero: headline and lead on the left, a CTA column on the right, chips under the headline */
.dp-hero { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 4vw, 48px); }
.dp-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 56px; }
.dp-hero__cta { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 8px; }
@media (max-width: 860px) {
  .dp-hero__grid { grid-template-columns: 1fr; }
  .dp-hero__cta { align-items: flex-start; }
}

/* Chips: a row of soft pills, each with a tiny colored glyph */
.dp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.dp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: var(--dp-radius-pill); background: var(--dp-mist); font-size: 15px; font-weight: 500; white-space: nowrap; }
.dp-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--dp-lilac); }
.dp-chip i.is-rose { background: var(--dp-rose); }
.dp-chip i.is-peach { background: var(--dp-peach); }
.dp-chip i.is-ember { background: var(--dp-ember); }
.dp-chip i.is-night { background: var(--dp-night); }
.dp-chip--quiet { color: var(--dp-faint); }

/* The dusk pane: the signature. A huge rounded gradient panel that holds floating windows */
.dp-pane { position: relative; overflow: hidden; border-radius: var(--dp-radius-lg); background: var(--dp-dusk); padding: clamp(28px, 6vw, 88px) clamp(16px, 5vw, 72px) 0; min-height: 420px; }
.dp-pane::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 20% 10%, rgba(255, 255, 255, .45), transparent 70%); pointer-events: none; }
.dp-pane__stage { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; align-items: end; gap: 0; }
.dp-pane--short { min-height: 0; padding-bottom: clamp(28px, 5vw, 64px); }
@media (max-width: 760px) {
  .dp-pane__stage { grid-template-columns: 1fr; }
}

/* Windows: rounded app windows with traffic dots. Light by default, --night for the assistant */
.dp-window { position: relative; border-radius: var(--dp-radius) var(--dp-radius) 0 0; background: var(--dp-paper); box-shadow: var(--dp-shadow-float); overflow: hidden; }
.dp-window--float { border-radius: var(--dp-radius); }
.dp-window__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: var(--dp-border); font-size: 14px; font-weight: 600; }
.dp-window__dots { display: flex; gap: 6px; }
.dp-window__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--dp-line-strong); }
.dp-window__body { padding: 18px; }
.dp-window--night { background: var(--dp-night); color: var(--dp-moon); }
.dp-window--night .dp-window__bar { border-bottom-color: var(--dp-night-line); }
.dp-window--night .dp-window__dots i { background: var(--dp-night-line); }
.dp-window--lift { margin-left: -36px; margin-bottom: 40px; }
@media (max-width: 760px) {
  .dp-window--lift { margin: -60px 0 24px 24px; }
}

/* Inside the night window: a status line, a message card with two choices, and an input */
.dp-status { display: inline-flex; align-items: center; gap: 6px; color: var(--dp-moon-soft); font-family: var(--dp-mono); font-size: 11px; font-weight: 400; }
.dp-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--dp-leaf); }
.dp-msg { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--dp-night-2); font-size: 15px; line-height: 1.5; }
.dp-msg__who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--dp-moon-soft); font-size: 13px; }
.dp-msg__who .dp-spark { width: 14px; height: 14px; }
.dp-msg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.dp-msg__yes, .dp-msg__no { padding: 5px 12px; border-radius: var(--dp-radius-pill); font-size: 13px; font-weight: 500; white-space: nowrap; }
.dp-msg__yes { background: var(--dp-moon); color: var(--dp-night); }
.dp-msg__no { border: 1px solid var(--dp-night-line); color: var(--dp-moon); }
.dp-msg__note { margin-left: auto; color: var(--dp-moon-soft); font-family: var(--dp-mono); font-size: 11px; }
.dp-ask { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--dp-night-line); border-radius: 12px; color: var(--dp-moon-soft); font-size: 14px; }

/* Inside a light window: list rows and a little wave chart */
.dp-rows { margin: 0; padding: 0; list-style: none; }
.dp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: var(--dp-border); font-size: 15px; }
.dp-row:last-child { border-bottom: 0; }
.dp-row__time { color: var(--dp-faint); font-family: var(--dp-mono); font-size: 12px; white-space: nowrap; }
.dp-wave { width: 100%; height: 90px; }
.dp-wave path { fill: none; stroke: var(--dp-ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.dp-wave path.is-fill { fill: var(--dp-mist); stroke: none; }
.dp-wave--moon path { stroke: var(--dp-moon); }

/* Cards and grids */
.dp-grid { display: grid; gap: 20px; }
.dp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.dp-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dp-card { padding: 28px; border: var(--dp-border); border-radius: var(--dp-radius); background: var(--dp-paper); }
.dp-card__swatch { width: 40px; height: 40px; margin-bottom: 22px; border-radius: 12px; background: var(--dp-dusk); }
.dp-card__swatch--night { background: var(--dp-night); display: grid; place-items: center; }
.dp-card p { margin: 8px 0 0; color: var(--dp-soft); }

/* Stats and quote */
.dp-stat__num { font-family: var(--dp-serif); font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -.02em; }
.dp-stat__cap { margin-top: 10px; color: var(--dp-soft); font-size: 15px; }
.dp-quote { margin: 0; font-family: var(--dp-serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.3; letter-spacing: -.01em; }
.dp-quote cite { display: block; margin-top: 20px; color: var(--dp-soft); font-family: var(--dp-sans); font-size: 15px; font-style: normal; }

/* Badges */
.dp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--dp-radius-pill); background: var(--dp-mist); font-size: 13px; font-weight: 500; white-space: nowrap; }
.dp-badge--ember { background: var(--dp-ember-soft); color: #9a3a1d; }

/* Toggle */
.dp-toggle { display: inline-flex; padding: 4px; border-radius: var(--dp-radius-pill); background: var(--dp-mist); }
.dp-toggle button { padding: 8px 16px; border: 0; border-radius: var(--dp-radius-pill); background: transparent; color: var(--dp-soft); font: 500 15px var(--dp-sans); cursor: pointer; white-space: nowrap; }
.dp-toggle button[aria-pressed="true"] { background: var(--dp-paper); color: var(--dp-ink); box-shadow: var(--dp-shadow); }

/* Pricing */
.dp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; align-items: stretch; }
.dp-plan { display: flex; flex-direction: column; padding: 30px; border: var(--dp-border); border-radius: var(--dp-radius); background: var(--dp-paper); }
.dp-plan--featured { position: relative; border: 0; background: var(--dp-night); color: var(--dp-moon); box-shadow: var(--dp-shadow-float); }
.dp-plan--featured .dp-plan__note, .dp-plan--featured .dp-plan__list li { color: var(--dp-moon-soft); }
.dp-plan--featured .dp-plan__list li::before { background: var(--dp-ember); }
.dp-plan__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; font-weight: 600; }
.dp-plan__price { margin: 20px 0 4px; font-family: var(--dp-serif); font-size: 52px; line-height: 1; letter-spacing: -.02em; }
.dp-plan__price small { font-family: var(--dp-sans); font-size: 15px; letter-spacing: 0; color: var(--dp-faint); }
.dp-plan__note { margin: 0 0 22px; color: var(--dp-soft); font-size: 15px; }
.dp-plan__list { flex: 1; margin: 0 0 26px; padding: 0; list-style: none; }
.dp-plan__list li { position: relative; padding: 7px 0 7px 22px; color: var(--dp-soft); font-size: 15px; }
.dp-plan__list li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--dp-lilac); }
.dp-table-wrap { overflow-x: auto; border: var(--dp-border); border-radius: var(--dp-radius); background: var(--dp-paper); }
.dp-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.dp-table th, .dp-table td { padding: 14px 18px; border-bottom: var(--dp-border); text-align: left; }
.dp-table thead th { color: var(--dp-soft); font-weight: 500; font-size: 14px; }
.dp-table tbody tr:last-child td { border-bottom: 0; }
.dp-faq details { border-bottom: var(--dp-border); }
.dp-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.dp-faq summary::-webkit-details-marker { display: none; }
.dp-faq summary::after { content: "+"; color: var(--dp-faint); font-weight: 400; }
.dp-faq details[open] summary::after { content: "\2212"; }
.dp-faq p { margin: 0 0 22px; color: var(--dp-soft); }

/* Article */
.dp-byline { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--dp-soft); font-size: 15px; }
.dp-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--dp-dusk); color: var(--dp-ink); font-size: 14px; font-weight: 600; }
.dp-article { font-size: 18px; line-height: 1.72; }
.dp-article h2 { margin: 48px 0 12px; font-family: var(--dp-serif); font-size: 30px; font-weight: 400; letter-spacing: -.015em; line-height: 1.2; }
.dp-article p { margin: 0 0 20px; }
.dp-article ul, .dp-article ol { margin: 0 0 22px; padding-left: 22px; }
.dp-article li { margin-bottom: 8px; }
.dp-article blockquote { margin: 32px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--dp-ember); font-family: var(--dp-serif); font-size: 24px; line-height: 1.4; }
.dp-article code { padding: 2px 6px; border-radius: 6px; background: var(--dp-mist); font-family: var(--dp-mono); font-size: .85em; }
.dp-callout { display: flex; gap: 14px; margin: 30px 0; padding: 20px 22px; border-radius: var(--dp-radius); background: var(--dp-night); color: var(--dp-moon); font-size: 16px; line-height: 1.6; }
.dp-callout .dp-spark { margin-top: 3px; }

/* Forms */
.dp-form { display: grid; gap: 18px; }
.dp-field { display: grid; gap: 7px; }
.dp-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.dp-field label, .dp-legend { font-size: 14px; font-weight: 600; }
.dp-field small { color: var(--dp-faint); font-size: 13px; }
.dp-input, .dp-select { width: 100%; padding: 12px 14px; border: 1px solid var(--dp-line-strong); border-radius: var(--dp-radius-sm); background: var(--dp-paper); color: var(--dp-ink); font: 400 16px var(--dp-sans); }
.dp-input:focus, .dp-select:focus { outline: 2px solid var(--dp-lilac); outline-offset: 1px; border-color: var(--dp-ink); }
.dp-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.dp-choice { position: relative; display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--dp-line-strong); border-radius: 12px; background: var(--dp-paper); cursor: pointer; font-size: 15px; font-weight: 600; }
.dp-choice span { color: var(--dp-soft); font-size: 13px; font-weight: 400; }
.dp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.dp-choice:has(input:checked) { border-color: var(--dp-ink); background: var(--dp-mist); box-shadow: inset 0 0 0 1px var(--dp-ink); }
.dp-check { display: flex; gap: 10px; align-items: flex-start; color: var(--dp-soft); font-size: 14px; }
.dp-check input { margin-top: 4px; accent-color: var(--dp-ink); }
.dp-divider { display: flex; align-items: center; gap: 12px; color: var(--dp-faint); font-size: 13px; }
.dp-divider::before, .dp-divider::after { content: ""; flex: 1; height: 1px; background: var(--dp-line); }

/* Footer */
.dp-footer { padding-block: 64px 32px; border-top: var(--dp-border); }
.dp-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.dp-footer h4 { margin: 0 0 14px; color: var(--dp-faint); font-size: 13px; font-weight: 500; }
.dp-footer ul { margin: 0; padding: 0; list-style: none; }
.dp-footer li { margin-bottom: 8px; font-size: 15px; }
.dp-footer li a { text-decoration: none; }
.dp-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; color: var(--dp-faint); font-size: 13px; }
@media (max-width: 760px) {
  .dp-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Helpers */
.dp-hide-sm { }
@media (max-width: 640px) {
  .dp-hide-sm { display: none !important; }
}
