/* Jura Zuitiņa privātprakse
   Krāsas un fonts pārņemti no esošās lapas lv.zuitins.lv:
   balts fons, tumši pelēks teksts, tirkīza akcents, fonts Lato. */

:root {
  --paper: #ffffff;
  --sage: #f2f2f2;
  --sage-deep: #e6e6e6;
  --ink: #212121;
  --ink-soft: #444444;
  --olive: #00838f;       /* tirkīza akcents (fokuss, hover) */
  --olive-dark: #00695c;  /* tumšāks tirkīzs — saites, pogas (AA uz balta) */
  --amber: #00796b;       /* akcents etiķetēm/eyebrow (tirkīzs, AA uz balta) */
  --line: #e0e0e0;
  --white: #ffffff;
  --max: 1120px;
  --serif: "Lato", "Open Sans", system-ui, -apple-system, sans-serif;
  --display: "Lato", "Open Sans", system-ui, -apple-system, sans-serif;
  --sans: "Lato", "Open Sans", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
picture { display: contents; } /* <picture> neveido kastīti — img mantojas kā tiešs bērns */

a { color: var(--olive-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  padding: .8rem 1rem;
}

.navbar {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .6rem .5rem 1.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--white) 74%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(38, 46, 40, .09);
  box-shadow: 0 6px 24px rgba(38, 46, 40, .07);
  transition: box-shadow .3s, background .3s;
}
.scrolled .navbar {
  background: color-mix(in srgb, var(--white) 88%, transparent);
  box-shadow: 0 14px 44px rgba(38, 46, 40, .14);
}

.brand {
  font-family: var(--display);
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none; line-height: 1; white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  font-family: var(--sans); font-size: .84rem; font-weight: 600;
  text-decoration: none; color: var(--ink-soft);
  padding: .55rem 1rem; border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--sage); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sage); color: var(--olive-dark); }

.nav-actions { display: flex; align-items: center; gap: .35rem; }

.lang {
  font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-decoration: none; color: var(--ink-soft);
  padding: .55rem .7rem; border-radius: 999px;
  transition: color .2s, background .2s;
}
.lang:hover { color: var(--olive-dark); background: var(--sage); }

.btn-nav {
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  text-decoration: none; color: var(--paper); background: var(--ink);
  padding: .65rem 1.3rem; border-radius: 999px; white-space: nowrap;
  transition: background .2s;
}
.btn-nav:hover { background: var(--olive-dark); color: var(--paper); }

.menu-btn {
  display: none; background: none; border: 0; cursor: pointer;
  width: 2.6rem; height: 2.6rem; border-radius: 999px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero (home) ---------- */

.hero { border-bottom: 1px solid var(--line); background: linear-gradient(var(--paper), var(--sage)); }
.hero .wrap {
  display: grid; grid-template-columns: 7fr 5fr; gap: 3rem;
  align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem;
}

.hero-q {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.15;
  letter-spacing: -.02em; text-wrap: balance;
}

.hero-sub { margin-top: 1.6rem; max-width: 34rem; color: var(--ink-soft); }
.hero-name { margin-top: 1.6rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.hero-name b { color: var(--olive-dark); }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 10%;
  border-radius: .4rem;
  border: 1px solid var(--line);
}

.hero-cta { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block; font-family: var(--sans); font-size: .88rem; font-weight: 700;
  letter-spacing: .02em; text-decoration: none;
  padding: .85rem 1.7rem; border-radius: 999px; transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--olive-dark); color: var(--paper); }
.btn-solid:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { border: 1px solid var(--ink-soft); color: var(--ink); }
.btn-ghost:hover { border-color: var(--amber); color: var(--olive-dark); }

/* ---------- sections ---------- */

.section { padding: 4.5rem 0; }
.section.tint { background: var(--sage); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1rem;
}

h1.page-title, h2.section-title {
  font-family: var(--display); font-weight: 700; line-height: 1.15;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -.02em;
  margin-bottom: 1.4rem; text-wrap: balance;
}

.prose { max-width: 44rem; }
.prose p + p { margin-top: 1.1rem; }
.prose strong { color: var(--olive-dark); }

/* animēta svītra — vienmērīgi ieslīd un izslīd (maska mīkstina malas, bez kantēm),
   katrā rindā stingri secīgi (JS kavējums = animācijas ilgums) */
.ul-line { position: relative; }
.ul-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--olive) 35%, #2fe0c8 50%, var(--olive) 65%, transparent);
  background-repeat: no-repeat; background-size: 50% 100%;
  background-position: -120% 0;
  filter: drop-shadow(0 0 5px rgba(0, 131, 143, .45));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.ul-line.ul-run::after { animation: ulSweep .9s linear forwards; animation-delay: var(--ul-delay, 0s); }
@keyframes ulSweep {
  from { background-position: -120% 0; }
  to   { background-position: 220% 0; }
}

/* uzmanības animācija navbar/hamburgeram, kad aizscrollēts līdz lejai */
.nav a.attn { animation: navAttn 1.1s ease; }
@keyframes navAttn {
  0%, 100% { transform: translateY(0); background: transparent; }
  30% { transform: translateY(-7px); color: var(--olive-dark); background: var(--sage); }
  60% { transform: translateY(0); }
}
/* aktīvā sadaļa (piem. Sākums) — kustas tāpat, bet iekrāsojums paliek visu laiku */
.nav a[aria-current="page"].attn { animation-name: navAttnActive; }
@keyframes navAttnActive {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
  60% { transform: translateY(0); }
}
.menu-btn.attn span { animation: hamAttn 1.3s ease; transform-origin: center; }
.menu-btn.attn span:nth-child(2) { animation-delay: .15s; }
@keyframes hamAttn {
  0%, 100% { transform: scaleX(1); background: var(--ink); }
  22% { transform: scaleX(1.7); background: var(--olive); }
  45% { transform: scaleX(1); background: var(--ink); }
  67% { transform: scaleX(1.7); background: var(--olive); }
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* attēls pie teksta (psihoterapija) — mazāks, šaurāka kolonna, nepārsniedz teksta augstumu */
@media (min-width: 901px) {
  .two-col--media { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .two-col--media .fig { max-width: 24rem; justify-self: end; }
  .two-col--media .fig img { aspect-ratio: 4/5; object-fit: cover; }
  /* konsultācijas — kamīna attēls blakus tekstam, ainavas kadrs */
  .two-col--consult { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 3.4rem; }
  .two-col--consult .fig { align-self: center; }
}

/* about page — teksts lielā blokā + portrets sānā */
/* Par mani — apaļa portreta bilde blakus virsrakstam (telefonā un datorā);
   saturs centrēts vienā kolonnā, lai datorā nav piespiests pa kreisi */
.about-head { display: flex; align-items: center; gap: 1.7rem; max-width: 52rem; margin: .5rem auto 2.4rem; }
.about-avatar { flex: 0 0 auto; width: 8rem; height: 8rem; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(38, 46, 40, .16); }
.about-head .eyebrow { margin-bottom: .45rem; }
.about-head .page-title { margin-bottom: 0; }
.about { margin-top: .5rem; }
.about-text { max-width: 52rem; margin: 0 auto; font-size: 1.08rem; }
.about-text p + p { margin-top: 1.2rem; }
/* klades attēls teksta plūsmā, centrēts kolonnā */
.about-note { max-width: 40rem; margin: 2.4rem auto; box-shadow: 0 10px 26px rgba(38, 46, 40, .12); }
.about-note img { aspect-ratio: 3/2; object-fit: cover; }

/* question pull-quote device */
.pull-q {
  border-left: 3px solid var(--olive);
  padding: .4rem 0 .4rem 1.6rem; margin: 2.4rem 0;
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--ink);
  max-width: 40rem;
}

/* service cards on home */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: .5rem;
  padding: 2rem 2rem 1.8rem; display: flex; flex-direction: column; gap: .8rem;
  text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--amber); transform: translateY(-2px); color: var(--ink); }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card .more { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--olive-dark); margin-top: auto; }

/* attēls (bez rāmja un paraksta) */
.fig { border-radius: .7rem; overflow: hidden; }
.fig img { display: block; width: 100%; height: auto; object-fit: cover; }

/* attēls ar parakstu (psihoterapija) */
.fig-cap { overflow: visible; }
.fig-cap img { border-radius: .7rem; }
.fig-cap figcaption { margin-top: .9rem; font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); text-align: center; }

/* about page: credential timeline (years are a real sequence) */
.timeline { list-style: none; max-width: 44rem; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.timeline .yr { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--olive-dark); line-height: 1.4; }

.cred-list { list-style: none; max-width: 44rem; }
.cred-list li { padding: .9rem 0 .9rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.cred-list li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--amber); }

/* contacts */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; }
.contact-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list .lbl { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin-bottom: .2rem; }
.contact-list a { font-family: var(--display); font-size: 1.45rem; font-weight: 500; text-decoration: none; }
.contact-list .val { font-family: var(--display); font-size: 1.45rem; font-weight: 500; }
.map { border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

.office-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.office-gallery .fig { box-shadow: 0 10px 28px rgba(38, 46, 40, .10); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease; }
.office-gallery .fig img { aspect-ratio: 4/3; }
.office-gallery .fig:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(38, 46, 40, .16); }

/* contact form (Web3Forms — bez backend) */
.contact-form-block { margin-top: 3.5rem; max-width: 46rem; }
.contact-form-block .form-lead { color: var(--ink-soft); max-width: 40rem; margin-bottom: 2rem; }
.contact-form { display: block; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.cf-field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.2rem; }
.cf-label {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.cf-input, .cf-textarea {
  font-family: var(--serif); font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: .4rem;
  padding: .8rem .95rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.cf-input:focus, .cf-textarea:focus {
  outline: none; border-color: var(--olive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--olive) 18%, transparent);
}
.cf-textarea { min-height: 8.5rem; resize: vertical; line-height: 1.6; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-submit { border: 0; cursor: pointer; margin-top: .3rem; }
.form-status { margin-top: 1rem; font-family: var(--sans); font-size: .9rem; min-height: 1.25em; }
.form-status.is-sending { color: var(--ink-soft); }
.form-status.is-ok { color: var(--olive-dark); }
.form-status.is-err { color: #b23b2e; }

/* CTA strip */
.cta-strip { background: var(--ink); color: var(--paper); text-align: center; }
.cta-strip .wrap { padding-top: 4rem; padding-bottom: 4.5rem; }
.cta-strip h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.25; margin-bottom: .9rem; letter-spacing: -.01em; text-wrap: balance; }
.cta-strip p { color: #cfcfcf; max-width: 36rem; margin: 0 auto 1.8rem; }
.cta-strip .btn-solid { background: var(--olive); color: #fff; }
.cta-strip .btn-solid:hover { background: var(--paper); color: var(--ink); }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--sage); }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding-top: 1.6rem; padding-bottom: 1.6rem;
  font-family: var(--sans); font-size: .8rem; color: var(--ink-soft);
}
.site-foot a { color: var(--ink-soft); }

/* ---------- entrance animations ---------- */
/* Slēptais stāvoklis der tikai ar JS (klase .js uzlikta <head>), tāpēc bez JS viss redzams. */
.js :is(
  .hero .wrap > div:first-child > *,
  .hero-figure,
  .section > .wrap > *:not(.cards):not(.office-gallery),
  .cards > .card,
  .office-gallery > .fig,
  .cta-strip .wrap > *
) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .85s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js .hero-figure { transform: scale(.96); }
.js .in { opacity: 1 !important; transform: none !important; }

/* galvenes ienākšana ielādējoties */
.js .site-head { animation: headIn .65s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes headIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

/* ---------- attēlu efekti — tikai Kontakti galerija ---------- */
.zoomable { cursor: zoom-in; }
.office-gallery .fig img { transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.office-gallery .fig:hover img { transform: scale(1.05); }

/* pogu un karšu mikroanimācijas */
.btn { transition: background .2s, color .2s, border-color .2s, transform .25s, box-shadow .25s; }
.btn-solid { box-shadow: 0 8px 20px rgba(0, 105, 92, .16); }
.btn:hover { transform: translateY(-2px); }
.card { transition: border-color .2s, transform .28s cubic-bezier(.2, .7, .2, 1), box-shadow .28s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(33, 33, 33, .10); }

/* ---------- lightbox (attēlu palielināšana) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  background: rgba(18, 20, 20, .86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%; max-height: 92vh; width: auto; height: auto;
  border-radius: .4rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: scale(.96); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  cursor: zoom-out;
}
.lightbox.open img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: 1.1rem; right: 1.3rem;
  width: 2.7rem; height: 2.7rem; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .3); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .site-head { animation: none; }
  .js :is(
    .hero .wrap > div:first-child > *, .hero-figure,
    .section > .wrap > *:not(.cards):not(.office-gallery),
    .cards > .card, .office-gallery > .fig, .cta-strip .wrap > *
  ) { opacity: 1; transform: none; transition: none; }
  .office-gallery .fig img { transition: none; }
  .office-gallery .fig:hover img, .btn:hover, .card:hover { transform: none; }
  .lightbox, .lightbox img { transition: none; }
  .ul-line.ul-run::after { animation: none; }
  .nav a.attn, .menu-btn.attn span { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  /* hero telefonā: kompakts portrets ievietots starp ievadtekstu un vārdu.
     display:contents padara teksta bloku par "caurspīdīgu", tā bērni kļūst par
     režģa elementiem līdzās bildei, tāpēc tos var sakārtot ar order. */
  /* telefonā hero kā profila kartiņa: eyebrow → bilde → vārds → virsraksts →
     ievadteksts → pogas. Tā bilde un vārds ir uzreiz redzami pirmajā ekrānā. */
  .hero .wrap { grid-template-columns: 1fr; gap: 0; padding-top: .6rem; padding-bottom: 2.2rem; }
  .hero .wrap > div:first-child { display: contents; }
  .hero .eyebrow { order: 1; text-align: center; margin-bottom: .9rem; }
  .hero-figure { order: 2; max-width: 15rem; margin: 0 auto; }
  .hero .hero-name { order: 3; text-align: center; margin-top: .9rem; }
  .hero .hero-q { order: 4; text-align: center; line-height: 1.12; margin-top: 1.1rem; }
  .hero .hero-sub { order: 5; text-align: center; margin: .8rem auto 0; }
  .hero .hero-cta { order: 6; justify-content: center; margin-top: 1.2rem; }
  .hero-figure img { aspect-ratio: 4/5; object-position: 50% 12%; border-radius: .5rem; border: 1px solid var(--line); }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* Par mani telefonā — mazāka apaļa bilde blakus virsrakstam */
  .about-head { gap: 1.1rem; margin-bottom: 1.9rem; }
  .about-avatar { width: 5rem; height: 5rem; }
  .about-note { max-width: none; margin: 1.8rem 0; }
}

@media (max-width: 860px) {
  .menu-btn { display: flex; }
  .btn-nav { display: none; }
  .nav {
    display: none; position: absolute; top: calc(100% + .6rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: color-mix(in srgb, var(--white) 94%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(38, 46, 40, .09);
    border-radius: 1.4rem;
    box-shadow: 0 18px 50px rgba(38, 46, 40, .16);
    padding: .6rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1.1rem; font-size: .95rem; border-radius: 1rem; }
  .cards, .office-gallery { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .timeline li { grid-template-columns: 1fr; gap: .1rem; }
}
