/* Titullapa / bez sesijas (app/views/landing/index.html.erb). Augšā emblēmas aina visā lapas platumā —
   krēsla, bērza saule, priedes pakalni, miglas ceļš uz apvārsni (docs/DESIGN.md „Logo”) —, zem tās
   miglas zeme ar tekstu. Aina ir krēslā abās tēmās; tēma maina tikai zemi. Viena kustība: maršruta
   līnija pa ceļu uzzīmējas līdz apvārsnim, un pie finiša aplītis. */
@import url("/assets/fonts/fonts.css");

:root {
  --bg: #E4E7E1; --bg2: #F3F4F0; --ink: #24281F; --ink2: #5C6156; --line: #C6CBC0;
  --birch: #D9A621; --focus: #A57A0B;
  /* Aina: tās pašas plakanās krāsas, kas emblēmā. Uz krēslas teksts ir migla (10,4:1). */
  --dusk: #2E505A; --sun: #E7B531; --mist: #E4E7E1; --mist2: #B9CBC6;
  --fd: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --fb: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171A15; --bg2: #20241E; --ink: #E6E8E1; --ink2: #A9AEA2; --line: #363B33;
    --birch: #E7B531; --focus: #E7B531;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--fb); font-feature-settings: "tnum" 1;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--fd); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 5;
  padding: 8px 14px; background: var(--bg2); color: var(--ink); border-radius: 4px; font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- krēsla ---------- */

.dusk {
  background: var(--dusk); color: var(--mist);
  display: flex; flex-direction: column;
  min-height: min(100svh, 980px);
}
.dusk a:focus-visible { outline-color: var(--sun); }

.dusk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 28px 0;
}
.mark { display: inline-flex; align-items: center; gap: 10px; }
.mark img { display: block; width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgb(228 231 225 / .18); }
.mark-word { font: 700 25px/1 var(--fd); font-variation-settings: "opsz" 24; letter-spacing: -.012em; }
.bar-login {
  font-weight: 500; text-decoration: underline; text-decoration-color: var(--sun);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  padding: 8px 2px;
}
.bar-login:hover { text-decoration-color: currentColor; }

.dusk-copy {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 9vh, 104px) 28px 8px;
}
/* Virsraksts ir lielākais elements lapā, kā ceļojuma nosaukums ceļojuma lapā. Šaurs rindstarpu un
   negatīvs burtu atstatums: pie 800 un opsz 96 Bricolage burti citādi izklīst. */
.dusk-copy h1 {
  max-width: 11ch;
  font-weight: 800; font-size: clamp(52px, 10.5vw, 132px); line-height: .9;
  font-variation-settings: "opsz" 96; letter-spacing: -.035em;
}
.lead {
  max-width: 50ch; margin-top: clamp(20px, 3.4vh, 32px);
  font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.55; color: var(--mist2);
}
.cta { margin-top: 28px; }
.cta-note { margin-top: 12px; font-size: 14px; color: var(--mist2); }

/* Poga ir saule uz krēslas: vienīgā pildītā krāsa ainā virs zemes. */
.btn-google {
  display: inline-flex; align-items: center; min-height: 50px; padding: 12px 26px;
  background: var(--sun); color: #24281F; border-radius: 999px;
  font: 600 17px/1.2 var(--fb); text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-google:hover { background: #F0C54C; }
.btn-google:active { transform: translateY(1px); }
.btn-google:focus-visible { outline: 3px solid var(--mist); outline-offset: 3px; }

/* Ainava. `slice` ar apakšējo malu: šaurā ekrānā sāni nogriežas, saule un ceļš paliek vidū. */
.horizon {
  display: block; width: 100%; height: clamp(220px, 34vw, 440px);
  margin-top: auto;
  /* Zemes apakšmala sakrīt ar nākamās daļas sākumu: bez spraugas pie apaļošanas. */
  margin-bottom: -1px;
}
.route {
  stroke-dasharray: 320; stroke-dashoffset: 0;
  animation: route-draw 1.9s cubic-bezier(.45, .05, .25, 1) .35s both;
}
.route-end { animation: route-end .45s ease-out 2.1s both; transform-origin: 936px 236px; }
@keyframes route-draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
@keyframes route-end { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* ---------- zeme ---------- */

/* Priedes josla ainavas apakšā pāriet zemē: augšmala ir tuvās zemes tonis, tad migla. */
.ground {
  border-top: 14px solid #2E5A3C;
  width: 100%;
}
.how, .agent {
  width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px;
}
.how { padding-top: clamp(56px, 9vw, 104px); }
.ground h2 {
  font-weight: 800; font-size: clamp(34px, 4.6vw, 54px); line-height: 1;
  font-variation-settings: "opsz" 96; letter-spacing: -.025em;
}

/* Trīs soļi ir tiešām secība, tāpēc tie stāv uz vienas līnijas kā pieturas maršrutā: pilns aplis
   sākumā, tukšs finišā — tas pats, kas maršruta glifā (docs/DESIGN.md). */
.stops {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px;
  position: relative;
}
.stops::before {
  content: ""; position: absolute; left: 7px; right: 7px; top: 7px;
  border-top: 3px solid var(--ink);
}
.stops li { position: relative; padding-top: 38px; }
.stops li::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--ink);
}
.stops li:first-child::before { background: var(--ink); }
.stops li:nth-child(2)::before { background: var(--birch); border-color: var(--ink); }
.stops li:last-child::before { left: auto; right: 0; }
.stops li:last-child { text-align: right; }
.stops li:last-child p { margin-left: auto; }
.stops h3 {
  font-weight: 700; font-size: 26px; line-height: 1.1; font-variation-settings: "opsz" 40;
  letter-spacing: -.012em;
}
.stops p { margin-top: 10px; max-width: 34ch; color: var(--ink2); }

.agent {
  padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(64px, 9vw, 112px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; align-items: end;
}
.agent-text p { margin-top: 18px; max-width: 46ch; color: var(--ink2); font-size: 17px; }

/* Piemērs, ko cilvēks raksta aģentam. Papīra lapiņa, nevis kartīte: bez ēnas, ar bērza malu kreisajā
   pusē — tur, kur sākas rakstītais. */
.ask { margin: 0; }
.ask blockquote {
  margin: 0; padding: 22px 26px;
  background: var(--bg2); border-left: 4px solid var(--birch); border-radius: 0 10px 10px 0;
}
.ask blockquote p {
  font: 500 clamp(19px, 2vw, 23px)/1.4 var(--fd); font-variation-settings: "opsz" 24; letter-spacing: -.005em;
}
.ask figcaption { margin-top: 10px; font-size: 14px; color: var(--ink2); }


.foot {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 28px 36px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2);
}
.foot a {
  color: var(--ink2); text-decoration-color: var(--birch); text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.foot a:hover { color: var(--ink); }

/* ---------- telefons ---------- */

@media (max-width: 760px) {
  .dusk-bar, .dusk-copy, .how, .agent, .foot { padding-left: 16px; padding-right: 16px; }
  .dusk-bar { padding-top: 16px; }
  .dusk { min-height: 0; }
  .dusk-copy { padding-top: 48px; }

  /* Soļi kļūst par vertikālu maršrutu: līnija kreisajā malā, pieturas uz tās. */
  .stops { grid-template-columns: 1fr; gap: 28px 0; margin-top: 32px; padding-left: 34px; }
  .stops::before { left: 7px; right: auto; top: 8px; bottom: 8px; border-top: 0; border-left: 3px solid var(--ink); }
  .stops li { padding-top: 0; }
  .stops li::before, .stops li:last-child::before { left: -34px; right: auto; top: 4px; }
  .stops li:last-child { text-align: left; }
  .stops li:last-child p { margin-left: 0; }
  .stops h3 { font-size: 23px; }

  .agent { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .route, .route-end { animation: none; }
  .btn-google { transition: none; }
}
