/* ==========================================================================
   Sala — sala.thehumanloop.eu (Design_Guidelines §10.5)
   The marketing site's layout (/css/style.css) in the therapist theme:
   Sala is a therapist's own tool, so ink teal colours the furniture and
   warm grey-paper is the base (§1.3). Burnt yellow still marks meaning only.
   ========================================================================== */

:root {
  /* Therapist theme, light mode — §1.3 */
  --bg:            #F4F3ED;
  --bg-raised:     #FFFFFF;
  --bg-sunken:     #EAEBE2;
  --surface:       #FFFFFF;
  --surface-hover: #EFF3F2;
  --border:        #D8DDD8;
  --text:          #122A31;
  --text-secondary:#54707A;
  --primary:       #16323A;

  /* Dark bands: deep ink teal, never black — §3.1 */
  --dark-bg:       #0A181D;
  --dark-raised:   #10262C;
  --dark-border:   #2A4B53;
  --dark-text:     #E7EFEC;
  --dark-muted:    #93AEB4;

  --shadow-warm: 0 1px 2px rgba(16,38,44,.08), 0 8px 24px rgba(16,38,44,.08);
}

.site-header { background: rgba(244,243,237,.9); }

.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.brand-name { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-name small {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: lowercase;
  color: var(--text-secondary);
}
@media (max-width: 520px) { .brand-name small { display: none; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.sala-hero {
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(110,152,161,.24), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(127,163,171,.12), transparent 60%),
    linear-gradient(150deg, #16323A 0%, var(--dark-bg) 55%, #071114 100%);
}
.sala-hero .hero-inner { grid-template-columns: 1fr 1fr; gap: 56px; padding-bottom: 96px; }
.sala-hero h1 { font-size: clamp(38px, 4.8vw, 56px); }
.hero-badge { background: rgba(16,38,44,.6); }
@media (max-width: 900px) {
  .sala-hero .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Screenshots ──────────────────────────────────────────────────────── */

.shot {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(16,38,44,.06), 0 18px 40px rgba(16,38,44,.12);
}
.shot img { display: block; width: 100%; height: auto; }
.shot-hero {
  border-color: rgba(231,239,236,.14);
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}

/* ── Tour film ────────────────────────────────────────────────────────── */

.tour { max-width: 980px; margin: 0 auto; }
.tour video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-hero);
  background: var(--dark-bg);
  box-shadow: 0 2px 4px rgba(16,38,44,.06), 0 24px 56px rgba(16,38,44,.16);
}
.tour figcaption {
  margin-top: 14px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15.5px;
}

/* ── Feature rows ─────────────────────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 56px;
  align-items: center;
}
.feature + .feature { margin-top: 72px; }
.feature-flip .feature-text { order: 2; }
.feature-text h3 { font-size: 27px; margin-bottom: 12px; }
.feature-text p { color: var(--text-secondary); font-size: 18px; max-width: 42ch; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature + .feature { margin-top: 56px; }
  .feature-flip .feature-text { order: 0; }
}

/* ── Privacy band ─────────────────────────────────────────────────────── */

.section-dark {
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(110,152,161,.14), transparent 60%),
    linear-gradient(160deg, var(--dark-bg), #071114);
}
.sec-item { background: rgba(16,38,44,.55); }

/* ── Beta ─────────────────────────────────────────────────────────────── */

#beta .split { align-items: center; }
.beta-list { list-style: none; display: grid; gap: 14px; }
.beta-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  color: var(--text-secondary);
  font-size: 17px;
}
.beta-list strong { color: var(--text); font-weight: 700; }

/* ── Downloads ────────────────────────────────────────────────────────── */

/* downloads.js flips pending → ready once /downloads/manifest.json lists files
   (the page as a whole), and each card on its own once it has files for that system. */
body[data-downloads="pending"] .when-ready,
body[data-downloads="ready"] .when-pending { display: none !important; }
.dl-card[data-state="pending"] .card-ready,
.dl-card[data-state="ready"] .card-pending { display: none !important; }


/* Until a build is published the three cards are equals. */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* Linux only: Linux large on the left, Windows and macOS "coming soon" on the right. */
body[data-downloads="ready"] .dl-grid { grid-template-columns: 1.7fr 1fr; grid-template-rows: auto auto; }
body[data-downloads="ready"] .dl-linux { grid-column: 1; grid-row: 1 / span 2; }
body[data-downloads="ready"] .dl-windows { grid-column: 2; grid-row: 1; }
body[data-downloads="ready"] .dl-mac { grid-column: 2; grid-row: 2; }
/* Windows or macOS published too: those two side by side, Linux across the width below. */
body[data-dl-desktop="ready"] .dl-grid { grid-template-columns: 1fr 1fr; }
body[data-dl-desktop="ready"] .dl-windows { grid-column: 1; grid-row: 1; }
body[data-dl-desktop="ready"] .dl-mac { grid-column: 2; grid-row: 1; }
body[data-dl-desktop="ready"] .dl-linux { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 900px) {
  body[data-downloads] .dl-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  body[data-downloads] .dl-grid > .dl-card { grid-column: auto; grid-row: auto; }
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-hero);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0; /* lets the checksums and commands scroll instead of widening the page on phones */
}
.dl-head { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.dl-os { width: 42px; height: 42px; color: var(--primary); flex-shrink: 0; }
.dl-head h3 { font-size: 26px; line-height: 1.1; }
.dl-head p { color: var(--text-secondary); font-size: 15.5px; }

.dl-files { list-style: none; }
.dl-files li { border-top: 1px solid var(--border); padding: 18px 0 16px; }
.dl-file {
  display: grid;
  grid-template-columns: 104px 1fr auto auto;
  align-items: center;
  gap: 16px;
}
.dl-fmt { font-weight: 700; font-size: 19px; color: var(--text); }
.dl-for { color: var(--text-secondary); font-size: 16px; }
.dl-size { color: var(--text-secondary); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-file .btn { padding: 10px 20px; min-height: 42px; font-size: 16px; }
.dl-how { margin-top: 8px; font-size: 15px; color: var(--text-secondary); }
.dl-how code, .dl-sums pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-sunken);
  border-radius: 6px;
  color: var(--text);
}
.dl-how code { display: inline-block; max-width: 100%; overflow-x: auto; white-space: nowrap; vertical-align: middle; padding: 2px 8px; font-size: 13px; }
@media (max-width: 640px) {
  .dl-file { grid-template-columns: 1fr auto; row-gap: 4px; }
  .dl-for { grid-column: 1; grid-row: 2; }
  .dl-size { grid-column: 2; grid-row: 1; }
  .dl-file .btn { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-top: 8px; }
}

.dl-sums { border-top: 1px solid var(--border); padding-top: 16px; }
.dl-sums summary { cursor: pointer; color: var(--text-secondary); font-size: 15.5px; }
.dl-sums pre { margin-top: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.7; overflow-x: auto; }

.dl-pending p { color: var(--text-secondary); font-size: 16.5px; }
.dl-pending { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.dl-pending .btn { align-self: flex-start; margin-top: auto; }
.dl-pending .soon-tag {
  align-self: flex-start;
  font-family: var(--font-label);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: lowercase;
  color: var(--accent-700);
  background: var(--warning-fill);
  border-radius: 999px;
  padding: 3px 14px;
}

/* ── Footer and BETA ribbon ───────────────────────────────────────────── */

.site-footer { background: #071114; }
.footer-brand img { width: 30px; height: 30px; }
/* Therapist dark-mode pair (§12.3), like the rest of the page's dark bands. */
.beta-ribbon span { background: #7FA3AB; color: #0A181D; }
