/* ==========================================================================
   Lanview :: Studio — Components: cards, accordion, compare slider,
   timeline, forms, roadmap lists
   ========================================================================== */

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Hero layout: text column + compare slider. Collapses to a single
   stacked column well before phone width so the slider never gets
   squeezed into an unusable sliver next to the copy. */
.hero-grid {
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Generic two-column split that stacks on smaller screens (used for
   text + callout style layouts). */
.split-grid {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
@media (max-width: 760px) {
  .split-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform var(--speed-med) var(--ease), box-shadow var(--speed-med) var(--ease), border-color var(--speed-med) var(--ease), background var(--speed-med) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-300); background: var(--card-hover); }
.card h2, .card h3, .card h4 {
  margin-bottom: .4em;
  font-size: 1.08rem;
}
.card p:last-child { margin-bottom: 0; }
.card p { font-size: .96rem; }

.card-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-weight: 700;
}
.card-icon svg { width: 20px; height: 20px; }

/* Pillar cards (Discover / Manage / Connect) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  position: relative;
  padding: 34px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.pillar::before {
  content: attr(data-letter);
  position: absolute;
  top: -18px; right: -6px;
  font-size: 6.5rem;
  font-weight: 800;
  color: var(--accent-500);
  opacity: .08;
  line-height: 1;
  pointer-events: none;
}
.pillar .pillar-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
  color: #fff; font-weight: 800; font-size: 1.2rem;
  margin-bottom: 18px;
}
.pillar ul { margin-top: 14px; padding-left: 0; list-style: none; }
.pillar ul li {
  position: relative; padding-left: 22px; font-size: .93rem; color: var(--text-secondary);
}
.pillar ul li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent-400);
  transform: rotate(45deg);
}

/* ---------- Accordion / FAQ ---------- */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 1.05rem; font-weight: 620;
  color: var(--text); text-align: left;
}
.accordion-trigger:hover { color: var(--accent-500); }
.accordion-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.accordion-icon::before, .accordion-icon::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
}
.accordion-icon::before { width: 11px; height: 2px; }
.accordion-icon::after { width: 2px; height: 11px; transition: transform var(--speed-fast) var(--ease); }
.accordion-item.open .accordion-icon::after { transform: rotate(90deg) scaleY(0); }
.accordion-item.open .accordion-trigger { color: var(--accent-500); }

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--speed-med) var(--ease);
}
.accordion-panel-inner { padding: 0 4px 38px; color: var(--text-secondary); }
.accordion-panel-inner p:last-child { margin-bottom: 0; }
.accordion-panel-inner ol, .accordion-panel-inner ul { margin-bottom: 0; }
.accordion-panel-inner .step-list { margin-bottom: 4px; }

/* ---------- Compare slider (Light UI vs Dark UI) ---------- */
.compare-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  cursor: ew-resize;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  background: var(--surface-alt);
}
.compare-slider__img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}
.compare-slider__after { position: relative; }
.compare-slider__before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.compare-slider__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.compare-slider__divider::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.compare-slider__handle {
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: var(--grey-900);
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.compare-slider__handle svg { width: 20px; height: 20px; }
.compare-slider__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare-slider__range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; }
.compare-slider__range::-moz-range-thumb { width: 44px; height: 44px; opacity: 0; border: none; }
.compare-slider__tag {
  position: absolute; top: 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(15,17,20,.55);
  color: #fff;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.compare-slider__tag--left { left: 14px; }
.compare-slider__tag--right { right: 14px; }
.compare-caption {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Roadmap columns ---------- */
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .roadmap-grid { grid-template-columns: 1fr; } }
.roadmap-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.roadmap-col-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.roadmap-col-head h2 { font-size: 1.3rem; }
.roadmap-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.roadmap-col[data-status="built"] .roadmap-dot { background: #3fae65; }
.roadmap-col[data-status="progress"] .roadmap-dot { background: var(--accent-500); }
.roadmap-col[data-status="backlog"] .roadmap-dot { background: var(--grey-400); }
.roadmap-col ul { list-style: none; padding: 0; margin: 18px 0 0; }
.roadmap-col li {
  padding: 10px 0 10px 26px;
  border-top: 1px solid var(--border);
  font-size: .93rem;
  position: relative;
}
.roadmap-col li:first-child { border-top: none; }
.roadmap-col li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 12px; height: 12px; border-radius: 4px;
  border: 2px solid var(--border);
}
.roadmap-col[data-status="built"] li::before { border-color: #3fae65; background: #3fae65; }
.roadmap-col[data-status="progress"] li::before { border-color: var(--accent-500); }

/* ---------- Timeline (History) ---------- */
.timeline { position: relative; margin-top: 24px; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--border), var(--accent-300), var(--border));
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -34px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent-500);
}
.timeline-year { font-size: .82rem; font-weight: 700; color: var(--accent-500); letter-spacing: .04em; }
.timeline-item h3, .timeline-item h4 { margin: .2em 0 .3em; font-size: 1.08rem; }
.timeline-item p { margin: 0; font-size: .93rem; }

/* Logos sit in a left-hand gutter beside the text, like a margin note,
   rather than breaking up the paragraph flow. */
.history-origins {
  padding-left: 180px;
  position: relative;
}
.history-origins h2 { font-size: 1.3rem; }
.history-logo {
  float: left;
  clear: left;
  width: 140px;
  height: auto;
  margin: 4px 0 22px -180px;
}
.history-logo--bordered {
  box-sizing: border-box;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #d8dadd;
  border-radius: var(--radius-md);
}
@media (max-width: 700px) {
  .history-origins { padding-left: 0; }
  .history-logo {
    float: none;
    clear: none;
    width: auto;
    max-height: 52px;
    margin: 22px 0 14px;
  }
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-weight: 620; font-size: .95rem; margin-bottom: 6px; color: var(--text); }
.form-field .req { color: var(--accent-500); }
.form-field .field-hint { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: .98rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--text-secondary); }
.radio-option input { width: 17px; height: 17px; accent-color: var(--accent-500); }

.consent-gate {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-alt);
  margin-bottom: 28px;
}
.consent-gate input[type="checkbox"] {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--accent-500); cursor: pointer;
}
.consent-gate label { font-size: .94rem; color: var(--text); cursor: pointer; line-height: 1.55; }
.consent-gate[hidden],
.gate-message[hidden],
.form-submitted .consent-gate,
.form-submitted .gate-message { display: none !important; }

.contact-form-wrap {
  max-height: 0; opacity: 0;
  overflow: hidden;
  transition: max-height var(--speed-slow) var(--ease), opacity var(--speed-med) var(--ease);
}
.contact-form-wrap.is-visible { max-height: 2200px; opacity: 1; }
.form-field--honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.form-status { min-height: 1.5em; margin-top: 14px; }
.form-status.is-error { color: #c93d4b; }
.form-result { padding: 28px; border: 1px solid var(--border); border-radius: 16px; }
.form-result h3 { margin-top: 8px; }
.form-result p:last-child { margin-bottom: 0; }
.gate-message { font-size: .92rem; color: var(--text-muted); padding: 4px 4px 0; }

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-500);
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: .94rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

/* Warning variant — pastel yellow, e.g. the SmartScreen notice on the
   downloads page. */
.callout--warning {
  background: hsl(45 90% 92%);
  border-color: hsl(45 60% 78%);
  border-left-color: hsl(40 80% 55%);
}
.callout--warning strong { color: hsl(32 55% 24%); }
.callout--warning p { color: hsl(32 30% 30%); }
html[data-theme="dark"] .callout--warning {
  background: hsl(45 45% 18%);
  border-color: hsl(45 40% 30%);
  border-left-color: hsl(42 70% 55%);
}
html[data-theme="dark"] .callout--warning strong { color: hsl(45 85% 82%); }
html[data-theme="dark"] .callout--warning p { color: hsl(45 30% 78%); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .callout--warning {
    background: hsl(45 45% 18%);
    border-color: hsl(45 40% 30%);
    border-left-color: hsl(42 70% 55%);
  }
  html:not([data-theme]) .callout--warning strong { color: hsl(45 85% 82%); }
  html:not([data-theme]) .callout--warning p { color: hsl(45 30% 78%); }
}

/* Numbered mini-steps (early access "how it works") */
.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.step-list li { display: flex; gap: 16px; }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: var(--accent-500);
}
.step-list strong { color: var(--text); }

/* ---------- Downloads ---------- */
.download-hero .bg-motion {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
}

.download-warning-section { padding: 24px 0; background: transparent; }
.download-packages-section { padding-top: 44px; }
.download-packages-section .eyebrow { font-size: 1.2rem; margin-bottom: .6em; text-transform: none; }

.release-notes-section { padding-top: 36px; }
.release-notes-heading { margin-bottom: 30px; }
.release-notes-heading p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.release-notes-list { display: grid; gap: 18px; }
.release-notes-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.release-notes-card__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.release-notes-card__head h3 { margin: 0; }
.release-notes-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: hsl(var(--accent-h) 55% 46% / .12);
  color: var(--accent-500);
  font-size: .76rem;
  font-weight: 700;
}
.release-notes-group + .release-notes-group { margin-top: 20px; }
.release-notes-group h4 { margin: 0 0 8px; font-size: .95rem; }
.release-notes-group ul { list-style: none; margin: 0; padding: 0; }
.release-notes-group li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; margin: 0; padding: 7px 0; }
.release-notes-id { color: var(--accent-500); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
@media (max-width: 640px) {
  .release-notes-card { padding: 22px; }
  .release-notes-group li { grid-template-columns: 1fr; gap: 0; }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: hsl(var(--accent-h) 55% 46% / .12);
  color: var(--accent-500);
  white-space: nowrap;
}

.download-list { display: grid; gap: 18px; }
.download-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  transition: border-color var(--speed-med) var(--ease), background var(--speed-med) var(--ease);
}
.download-card:hover { border-color: var(--accent-300); background: var(--card-hover); }
.download-card__info { grid-column: 1; display: flex; flex-direction: column; gap: 8px; }
.download-card__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.download-card__head h3 { margin: 0; }
.download-card__meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: .92rem; color: var(--text-secondary); }
.download-card__meta strong { color: var(--text); font-weight: 620; margin-right: 5px; }
.download-card__btn { grid-column: 2; grid-row: 1; }
.download-card__hash {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  font-size: .78rem;
  color: var(--text-muted);
  word-break: break-all;
}
.download-card__hash code {
  background: var(--code-bg);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .download-card { grid-template-columns: 1fr; }
  .download-card__btn { grid-column: 1; grid-row: auto; margin-top: 18px; }
  .download-card__btn .btn { width: 100%; justify-content: center; }
}
