/* Parla — marketing site.
   A single committed dark world: an instrument panel rather than a SaaS page. Every colour is
   painted explicitly, so the page holds regardless of the visitor's system theme. */

:root {
  --ink:        #0B0D14;
  --ink-deep:   #06070C;
  --panel:      #12151F;
  --panel-hi:   #1A1E2B;
  --line:       #262B3A;
  --line-soft:  #1C2130;
  --text:       #E6E8F0;
  --muted:      #8B92A8;
  --dim:        #5C6379;
  --violet:     #7C6BFF;
  --violet-hi:  #8E80FF;
  --violet-lo:  #4A3FA8;
  --mint:       #5EE6C0;
  --ember:      #E8785A;

  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 62ch;
  --pad: clamp(20px, 5vw, 56px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 74px); line-height: 1.02; font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: clamp(27px, 3.4vw, 40px); line-height: 1.12; font-weight: 600; letter-spacing: -0.022em; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
p  { margin: 0; max-width: var(--measure); }

.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); line-height: 1.6; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.band { border-bottom: 1px solid var(--line-soft); }
.band > .wrap { padding-top: clamp(60px, 8vw, 112px); padding-bottom: clamp(60px, 8vw, 112px); }

/* Section eyebrow: a tick on the signal trace, then a label. */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim); margin: 0 0 26px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--violet-lo); flex: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 13, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 13px; padding-bottom: 13px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; transition: color 140ms ease; }
.nav a:hover { color: var(--text); }
@media (max-width: 700px) { .nav { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(76vh, 720px);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line-soft);
  /* Fallback ground, so the hero never looks broken before the photograph loads. */
  background:
    radial-gradient(120% 90% at 78% 55%, rgba(124, 107, 255, 0.20), transparent 60%),
    linear-gradient(180deg, #0D101A 0%, var(--ink) 100%);
  background-size: cover;
  background-position: center right;
  overflow: hidden;
}
.hero picture, .hero .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
}
/* Legibility scrim. The photograph carries its own darkness on the left; this guarantees it. */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,7,12,0.97) 0%, rgba(6,7,12,0.93) 44%, rgba(6,7,12,0.55) 62%, rgba(6,7,12,0.12) 100%),
    linear-gradient(180deg, rgba(6,7,12,0.55) 0%, transparent 30%, rgba(6,7,12,0.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: clamp(72px, 10vw, 120px); padding-bottom: clamp(72px, 10vw, 120px); }
/* Held clear of the subject on the right, so the lede never runs across him. */
.hero-copy { max-width: 560px; }
.hero h1 span { color: var(--violet); display: block; }
.hero p { margin-top: 22px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 6px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.btn-primary { background: var(--violet); color: #0A0B12; font-weight: 600; }
.btn-primary:hover { background: var(--violet-hi); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(18, 21, 31, 0.6); }
.btn-ghost:hover { border-color: var(--dim); }

.meta { margin-top: 16px; font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: 0.01em; }

/* ---------- fact strip ---------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); }
.fact { background: var(--ink); padding: 30px clamp(20px, 3vw, 34px); }
.fact .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--violet); }
.fact .v { font-family: var(--display); font-size: 23px; font-weight: 600; margin-top: 8px; letter-spacing: -0.018em; }
.fact .n { color: var(--muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 780px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- figures ---------- */
figure { margin: 0; }
.figure {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 50% 40%, rgba(124, 107, 255, 0.16), transparent 70%),
    var(--panel);
}
.figure img { width: 100%; height: auto; }
.figure figcaption {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); padding: 14px 18px; border-top: 1px solid var(--line-soft);
}

/* Alternating image / copy rows. */
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 68px); align-items: center; }
.row.reverse .row-media { order: 2; }
@media (max-width: 880px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row.reverse .row-media { order: 0; }
}

/* Full-bleed band with a photograph behind it. */
.plate { position: relative; border-bottom: 1px solid var(--line-soft); background: var(--ink-deep); overflow: hidden; }
.plate .plate-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.plate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,7,12,0.82) 0%, rgba(6,7,12,0.62) 50%, rgba(6,7,12,0.92) 100%); }
.plate .wrap { position: relative; z-index: 2; padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(72px, 9vw, 128px); }

/* ---------- ledger ---------- */
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 38px; }
@media (max-width: 860px) { .ledger { grid-template-columns: minmax(0, 1fr); } }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 26px 24px; }
.col.stays { border-color: rgba(94, 230, 192, 0.24); }
.col.leaves { border-color: rgba(232, 120, 90, 0.22); }
.col h3 { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.col.stays h3 { color: var(--mint); }
.col.leaves h3 { color: var(--ember); }
.col ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.col li { display: flex; gap: 10px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.col li b { color: var(--text); font-weight: 500; }
.col li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.45; margin-top: 9px; }

.note {
  margin-top: 24px; padding: 18px 20px;
  border-left: 2px solid var(--violet-lo);
  background: var(--panel); border-radius: 0 8px 8px 0;
  font-size: 15px; color: var(--muted); max-width: none;
}
.note b { color: var(--text); font-weight: 500; }

/* ---------- points ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(30px, 5vw, 72px); }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }
.points { display: flex; flex-direction: column; gap: 26px; margin: 0; padding: 0; list-style: none; }
.point { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.point h3 { margin-bottom: 7px; }
.point p { color: var(--muted); font-size: 15px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--violet); letter-spacing: 0.1em; }
.step h3 { margin: 12px 0 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- specs ---------- */
.specs-wrap { overflow-x: auto; margin-top: 34px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line-soft); vertical-align: baseline; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
td.figure-cell { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
td.what { color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 780px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.card code { font-family: var(--mono); font-size: 13px; color: var(--violet); background: var(--panel-hi); padding: 2px 6px; border-radius: 4px; }

/* ---------- built on ---------- */
.builton { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 5vw, 60px); margin-top: 34px; }
.builton-item { display: flex; align-items: center; gap: 14px; }
.builton img { height: 30px; width: auto; opacity: 0.92; }
.builton .label { font-size: 14px; color: var(--muted); max-width: 30ch; }

/* ---------- requirements ---------- */
.req { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.chip { font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; background: var(--panel); }

/* ---------- footer ---------- */
footer { padding: 44px var(--pad) 62px; background: var(--ink-deep); }
.foot { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; color: var(--dim); font-size: 14px; }

/* ================================================================
   v2 additions: several pages, the iPhone keyboard, contact.
   ================================================================ */

/* ---------- header: current page + contact button ---------- */
.top-right { display: flex; align-items: center; gap: 26px; }
.nav a[aria-current="page"] { color: var(--text); }
.btn-sm { padding: 8px 15px; font-size: 14px; }
@media (max-width: 700px) {
  .top .wrap { flex-wrap: wrap; row-gap: 8px; }
  .top-right { width: 100%; }
  /* The About link leads to contact; the button would crowd the four page links. */
  .top-right .btn-sm { display: none; }
  .nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; font-size: 14px; white-space: nowrap; }
  .nav::-webkit-scrollbar { display: none; }
}

/* ---------- small badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 10px;
  background: rgba(18, 21, 31, 0.7); margin-bottom: 24px;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

/* ---------- sub-page hero (no photograph) ---------- */
.page-hero {
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(70% 90% at 85% 40%, rgba(124, 107, 255, 0.16), transparent 62%),
    linear-gradient(180deg, #0D101A 0%, var(--ink) 100%);
}
.page-hero .wrap { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.page-hero h1 { font-size: clamp(36px, 5.2vw, 62px); }
.page-hero h1 span { color: var(--violet); display: block; }
.page-hero .lede { margin-top: 22px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (max-width: 880px) { .hero-split { grid-template-columns: minmax(0, 1fr); } }

.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three { grid-template-columns: minmax(0, 1fr); } }
.card .tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--violet); margin-bottom: 12px; display: block; }
.card .more { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--violet-hi); text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* ---------- the iPhone, drawn in CSS ---------- */
.phone {
  width: min(310px, 100%); margin: 0 auto;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #2A2F3D, #151822);
  box-shadow: 0 0 0 1px #343a4a, 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 120px rgba(124, 107, 255, 0.14);
}
.phone-screen { border-radius: 36px; overflow: hidden; background: #0A0C12; display: flex; flex-direction: column; aspect-ratio: 9 / 19.5; }
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.phone-island { width: 84px; height: 24px; border-radius: 14px; background: #000; }
.phone-chat { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; font-size: 13px; line-height: 1.4; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 17px; }
.bubble.in { background: #22262F; color: var(--text); align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.out { background: #3E6BE8; color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.compose { margin-top: 6px; border: 1px solid #2B303C; border-radius: 18px; padding: 7px 12px; color: var(--text); min-height: 34px; }
.caret { display: inline-block; width: 2px; height: 1.05em; vertical-align: -2px; background: var(--violet-hi); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.kb { background: #1B1E26; padding: 6px 4px 14px; }
.kb-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 8px; }
.kb-live { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.kb-live .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.seg { flex: none; display: flex; background: #2A2E38; border-radius: 7px; padding: 2px; font-size: 10px; }
.seg span { padding: 2px 6px; border-radius: 5px; color: var(--muted); }
.seg span.on { background: #474D5C; color: var(--text); }
.kb-row { display: flex; justify-content: center; gap: 4px; margin-top: 7px; padding: 0 2px; }
.key { flex: 1; max-width: 25px; height: 34px; border-radius: 5px; background: #464B57; color: var(--text); font-size: 14px; display: grid; place-items: center; box-shadow: 0 1px 0 #0b0c10; }
.key.fn { background: #2E323C; max-width: 36px; font-size: 11px; }
.key.space { max-width: none; flex: 4; font-size: 11px; color: var(--muted); }
.key.mic { background: var(--violet); color: #0A0B12; max-width: 40px; box-shadow: 0 0 0 3px rgba(124, 107, 255, 0.28); }
@media (prefers-reduced-motion: reduce) { .caret, .kb-live .dot { animation: none; } }

/* ---------- route diagram ---------- */
.diagram { margin-top: 38px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 3vw, 30px); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 620px; height: auto; }
.diagram text { font-family: var(--body); }

/* ---------- before / after ---------- */
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 820px) { .ba { grid-template-columns: minmax(0, 1fr); } }
.ba pre {
  margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; color: var(--muted);
}
.ba .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.ba .after pre { color: var(--text); border-color: rgba(124, 107, 255, 0.35); }

/* ---------- contact ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(124, 107, 255, 0.18), transparent 60%),
    var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: clamp(28px, 5vw, 52px);
}
@media (max-width: 820px) { .contact { grid-template-columns: minmax(0, 1fr); } }
.contact .lede { margin-top: 16px; }
.contact-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-side .meta { margin-top: 4px; }
.email-text { font-family: var(--mono); font-size: 15px; color: var(--text); word-break: break-all; }

/* ---------- questions ---------- */
.faq { margin-top: 34px; border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 17px; font-family: var(--mono); font-size: 20px; color: var(--violet); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 15px; padding: 0 0 22px; }

/* ---------- footer links ---------- */
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
