/* echo you — shared styles
   Design tokens pulled 1:1 from the Claude Design prototype. */

:root {
  --bg: #F9F7F3;
  --bg-panel: #F5EFE7;
  --card: #FFFDF8;
  --ink: #23211D;
  --ink-strong: #000000;
  --text-body: #2C2924;
  --text-muted: #55503F;
  --text-muteder: #6E6759;
  --text-faint: #8A8474;
  --terracotta: #DD8E76;
  --terracotta-hover: #C9765D;
  --terracotta-deep: #C56A4E;
  --terracotta-deeper: #A9573D;
  --sage: #7C9166;
  --sage-light: #8A9B84;
  --sage-lighter: #9FAF98;
  --footer-bg: #23211D;
  --footer-bg-alt: #1B1915;
  --footer-ink: #F9F7F3;
  --footer-eyebrow: #E4A588;
  --danger: #C0392B;
  --stripe: #635BFF;
  --btn-ink: #FFF8F0;
  --selection: #F1D3BE;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hanken Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--terracotta-deep); text-decoration: none; }
a:hover { color: var(--terracotta-deeper); }

::selection { background: var(--selection); }

img { max-width: 100%; }

h1, h2, h3, p { font-family: inherit; }

.serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

/* ---------- keyframes ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.72); } }
@keyframes heroFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroZoom { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes fadeInOnly { from { opacity: 0; } to { opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* small blinking dot next to the "Grįžti į pokalbį" nav link */
.chat-live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--terracotta-deep); animation: blink 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes pulseHeart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- layout helpers ---------- */
.wrap { min-height: 100vh; background: var(--bg); overflow-x: hidden; }

.scrollbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--terracotta); z-index: 100; transition: width 0.08s linear;
}

/* ---------- site header (sticky, used on all inner pages) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px clamp(20px, 4vw, 56px);
  background: rgba(249, 247, 243, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(35, 33, 29, 0.1);
}

.logo img { height: 30px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 32px); flex-wrap: wrap; }

.site-nav a {
  font-size: 15px; color: var(--text-muted); padding-bottom: 2px;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); border-bottom: 2px solid var(--terracotta); }

.nav-sep { width: 1px; height: 20px; background: rgba(35, 33, 29, 0.2); }

.btn-login {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 14.5px; font-weight: 600;
  color: var(--ink); background: transparent; border: 1px solid rgba(35, 33, 29, 0.28);
  padding: 10px 20px; border-radius: 0; cursor: pointer; transition: background 0.25s, border-color 0.25s;
}
.btn-login:hover { background: #FFFDF8; border-color: var(--ink); }

/* Logged-in "Atsijungti" reuses the same [data-login] button element as the
   logged-out "Prisijungti" (see js/supabase-client.js paintAuthState) —
   same square-cornered outline treatment as .btn-login itself, just in
   sage instead of ink so the two states stay visually related while still
   reading as distinct (green = "you're in", not the default action). */
.btn-login[data-authed] {
  background: none; border: 1px solid rgba(139, 149, 116, 0.5); border-radius: 0; padding: 10px 20px; margin: 0;
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 600; font-size: 14.5px;
  color: var(--text-muted); cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}
/* Fills sage on hover — the same accent color and fill behavior as
   .btn-outline-sage ("Noriu išklausyti"), just at nav scale. */
.btn-login[data-authed]:hover { background: var(--sage); border-color: var(--sage); color: var(--btn-ink); transform: translateY(-1px); }
/* .hero-header (index.html only) sits over the video — a lighter/translucent
   border and ink-toned text keep it legible there while staying visually
   secondary; the sage hover fill stays identical to the inner-page version. */
.hero-header .btn-login[data-authed] { border-color: rgba(58, 54, 46, 0.35); color: rgba(58, 54, 46, 0.85); }
.hero-header .btn-login[data-authed]:hover { background: var(--sage); border-color: var(--sage); color: var(--btn-ink); transform: translateY(-1px); }

/* header variant used only in the hero (transparent, floating over video) */
.hero-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 30px clamp(20px, 4vw, 56px); flex-wrap: wrap;
}
.hero-nav-link {
  font-size: 15px; color: #3A362E;
  transition: color 0.25s, transform 0.25s, text-shadow 0.25s;
}
.hero-nav-link:hover { color: #000; transform: translateY(-1px); text-shadow: 0 0 14px rgba(192, 106, 69, 0.55); }

/* ---------- buttons ---------- */
.btn-fill {
  display: inline-block; padding: 18px 34px; background: var(--terracotta); color: var(--btn-ink);
  font-family: 'Instrument Serif', serif; font-size: 21px; border-radius: 0; border: none; cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.btn-fill:hover { background: var(--terracotta-hover); color: var(--btn-ink); transform: translateY(-2px); }

.btn-outline-sage {
  display: inline-block; padding: 18px 34px; background: transparent; color: var(--ink);
  border: 1px solid var(--sage); font-family: 'Instrument Serif', serif; font-size: 21px; border-radius: 0;
  cursor: pointer; transition: background 0.25s, transform 0.25s, color 0.25s;
}
.btn-outline-sage:hover { background: var(--sage); color: var(--btn-ink); transform: translateY(-2px); }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.site-footer.alt { background: var(--footer-bg-alt); }
.site-footer .footer-row {
  max-width: 1500px; margin: 0 auto; padding: 50px clamp(24px, 5vw, 80px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
}
.site-footer .footer-mark { height: 22px; width: auto; display: block; opacity: 0.92; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer nav a { font-size: 14px; color: rgba(249, 247, 243, 0.75); }
.site-footer nav a:hover { color: var(--footer-ink); }
.site-footer .copyright { font-size: 13px; color: rgba(249, 247, 243, 0.55); }

/* ---------- section eyebrow / heading helpers ---------- */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--terracotta-deep);
}
.eyebrow-light { color: var(--footer-eyebrow); }

/* ---------- reveal-on-scroll ---------- */
[data-reveal] { transition: opacity 0.85s cubic-bezier(0.22,0.61,0.36,1), transform 0.85s cubic-bezier(0.22,0.61,0.36,1); }
[data-reveal].is-hidden { opacity: 0; transform: translateY(28px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- generic card ---------- */
.card {
  background: var(--card); border: 1px solid rgba(35, 33, 29, 0.14);
}

/* ---------- pillar links grid (home) ---------- */
.pillar-card { display: block; background: var(--bg); padding: clamp(28px, 3vw, 44px); transition: background 0.25s; }
.pillar-card:hover { background: #FFFDF8; }

/* ---------- form fields ---------- */
.field-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muteder);
}
.field-input, .field-textarea {
  width: 100%; box-sizing: border-box; margin-top: 8px; border: 1px solid rgba(35, 33, 29, 0.2);
  background: var(--bg); padding: 13px 15px; font-family: 'Hanken Grotesk', sans-serif; font-size: 16px;
  color: var(--ink); outline: none;
}
.field-textarea { line-height: 1.5; resize: vertical; }

/* ---------- box-breathing widget (ramybe.html, four modes) ---------- */
/* Shape + phase text are the thing to focus on, so they sit close together
   as one unit (36px). Baigti is a secondary, exit-only control — a much
   bigger gap (72px total: the 36px flex gap plus 36px of its own margin)
   keeps it clearly detached rather than crowding the instruction itself. */
.breathe-wrap { display: flex; flex-direction: column; align-items: center; gap: 36px; padding: 12px 0; }
.breathe-shape {
  width: clamp(160px, 26vw, 240px); height: clamp(160px, 26vw, 240px); border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 106, 78, 0.32) 0%, rgba(197, 106, 78, 0.08) 72%, rgba(197, 106, 78, 0) 100%);
  border: 1px solid rgba(197, 106, 78, 0.45);
  transform: scale(0.62); opacity: 0.75;
  /* transition-duration/timing-function are set inline per phase by
     initBreathingCycle() in js/common.js (rhythms differ per mode); these
     are just sane pre-JS defaults. */
  transition-property: transform, opacity;
  transition-duration: 4000ms;
  transition-timing-function: ease-in-out;
}
/* Subtle per-mode hue shifts — same shape/size/site tone throughout, only
   the color leans warmer (Prieš miegą), softer (Kai neramu) or toward the
   site's second accent, sage green (Pusiausvyra). Deliberately not a
   different shape per mode: the brief calls for restrained, non-dramatic
   differences. */
.breathe-shape.mode-miegas { background: radial-gradient(circle, rgba(169, 87, 61, 0.36) 0%, rgba(169, 87, 61, 0.08) 72%, rgba(169, 87, 61, 0) 100%); border-color: rgba(169, 87, 61, 0.5); }
.breathe-shape.mode-neramu { background: radial-gradient(circle, rgba(197, 106, 78, 0.22) 0%, rgba(197, 106, 78, 0.06) 72%, rgba(197, 106, 78, 0) 100%); border-color: rgba(197, 106, 78, 0.32); }
.breathe-shape.mode-pusiausvyra { background: radial-gradient(circle, rgba(139, 149, 116, 0.30) 0%, rgba(139, 149, 116, 0.08) 72%, rgba(139, 149, 116, 0) 100%); border-color: rgba(139, 149, 116, 0.45); }
.breathe-text { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(24px, 3.2vw, 34px); color: var(--ink); min-height: 1.2em; }
.breathe-exit-btn { margin-top: 36px; padding: 12px 26px; background: transparent; border: 1px solid rgba(35, 33, 29, 0.25); color: var(--text-muted); font-family: 'Hanken Grotesk', sans-serif; font-size: 15px; border-radius: 999px; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.breathe-exit-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- breathing mode picker (ramybe.html) ---------- */
.breathe-modes-intro { margin: 0 0 20px; text-align: center; font-size: 15px; color: var(--text-muted); }
.breathe-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .breathe-modes { grid-template-columns: 1fr; } }
.breathe-mode-card {
  display: block; width: 100%; box-sizing: border-box; text-align: left; background: var(--card);
  border: 1px solid rgba(35, 33, 29, 0.14); border-radius: 14px; padding: 18px 20px; cursor: pointer;
  font-family: inherit; transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.breathe-mode-card:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.breathe-mode-card.selected { border-color: var(--terracotta); background: rgba(197, 106, 78, 0.06); }
.breathe-mode-name { display: block; font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; font-size: 21px; color: var(--ink); }
.breathe-mode-desc { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.breathe-mode-rhythm { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 0.08em; color: var(--text-faint); }
.breathe-active { display: flex; flex-direction: column; align-items: center; }
.breathe-back-btn { margin-top: 28px; background: none; border: none; padding: 0; font-size: 13.5px; color: var(--text-faint); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.breathe-back-btn:hover { color: var(--terracotta-deep); }

/* ---------- responsive text helper ---------- */
.balance { text-wrap: balance; }
