/* ============================================================
   Lipio Man - styles.css
   Minimalist single-screen, light/warm. Vanilla CSS, mobile-first.
   ============================================================ */

:root{
  --bg:           #F5F1EB;   /* warm cream */
  --bg-soft:      #FBF8F3;
  --surface:      #FFFFFF;

  --text:         #15191C;
  --text-soft:    #535B61;
  --muted:        #8A929A;

  --accent:       #2F6BFF;
  --accent-hover: #1F57E6;
  --accent-tint:  #EAF0FF;
  --accent-ring:  rgba(47,107,255,0.28);

  --border:        #E5DFD5;
  --border-strong: #D6CEC0;
  --star:          #F5B842;
  --success:       #1F9D6B;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --shadow-card: 0 10px 40px rgba(40,30,15,0.08);
  --shadow-cta:  0 8px 22px rgba(47,107,255,0.28);

  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --container: min(560px, 92vw);

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-head: 'Archivo', 'DM Sans', system-ui, sans-serif;
}

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(47,107,255,0.12), transparent 60%),
    radial-gradient(880px 520px at -8% 112%, rgba(47,107,255,0.07), transparent 55%),
    linear-gradient(180deg, #FBF8F3 0%, var(--bg) 38%, #F1ECE3 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a{ color: inherit; }
:focus-visible{ outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }

/* ---------- App shell ---------- */
.app{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar{
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 2.4rem);
}

.hero-screen{
  display: grid;
  place-items: center;
  padding: 1.5rem clamp(1.2rem, 4vw, 2.4rem) 2.5rem;
  min-height: clamp(440px, 62vh, 680px);
}
.hero-grid{
  width: 100%; max-width: 1080px;
  display: grid; grid-template-columns: 0.82fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.2rem); align-items: center;
}
.hero-photo{
  align-self: stretch; min-height: clamp(380px, 56vh, 580px);
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background-image: url("/images/hero-man.jpg?v=1");
  background-size: cover; background-position: center top;
  background-color: #E9E3D8;
}
.stage{ width: 100%; max-width: 520px; position: relative; }

/* Pills */
.pills{ list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill{ display: inline-flex; align-items: center; gap: 0.45rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0.5rem 0.9rem; font-size: 0.9rem; color: var(--text); }
.pill-ic{ display: inline-flex; }
.pill-ic svg{ width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Geometric mountain divider ---------- */
.mountains{ line-height: 0; margin-top: -1px; }
.mountains svg{ display: block; width: 100%; height: clamp(110px, 14vw, 210px); }

/* ---------- Testimonial ---------- */
.testimonial{
  background: #F1EDE6;
  padding: clamp(2.4rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 2.4rem);
}
.testi-grid{
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(1rem, 2.6vw, 1.8rem); align-items: stretch;
}
.testi-photo{
  border-radius: var(--r-lg); min-height: 340px;
  background-image: url("/images/testimonial-man.jpg?v=2");
  background-size: cover; background-position: center top;
  background-color: #DCE3F0;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
}
.testi-card{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.stars{ display: flex; gap: 4px; margin-bottom: 1rem; }
.stars svg{ width: 22px; height: 22px; fill: var(--accent); }
.testi-quote{
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.05rem); line-height: 1.12;
  letter-spacing: -0.01em; margin: 0 0 0.9rem;
}
.testi-body{ color: var(--text-soft); line-height: 1.6; margin: 0 0 1.5rem; }
.benefits{ list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; }
.benefits li{ display: flex; align-items: center; gap: 0.65rem; color: var(--text); font-size: 0.98rem; }
.benefit-ic{ width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); display: grid; place-items: center; flex-shrink: 0; }
.benefit-ic svg{ width: 18px; height: 18px; fill: var(--accent); stroke: none; }
.benefit-ic svg path[d^="M6 9v6"]{ fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.testi-attr{ margin: 0; }
.testi-name{ display: block; font-weight: 600; }
.testi-meta{ color: var(--muted); font-size: 0.88rem; }
.testi-disclaimer{ color: var(--muted); font-size: 0.74rem; margin: 0.7rem 0 0; }

@media (max-width: 720px){
  .testi-grid{ grid-template-columns: 1fr; }
  .testi-photo{ min-height: 260px; }
  .benefits{ grid-template-columns: 1fr; }
}

.compliance{
  text-align: center;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
  padding: 1rem clamp(1.2rem, 4vw, 2.4rem) 1.6rem;
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- Wordmark ---------- */
.wordmark{
  display: inline-flex; align-items: baseline;
  text-decoration: none; color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1;
}
.wm-lip{ font-style: normal; }
.wm-io{ font-style: italic; }
.wm-dot{
  width: 0.24em; height: 0.24em; border-radius: 50%;
  background: var(--accent); display: inline-block;
  margin: 0 0.1em 0 0.05em; align-self: baseline;
  position: relative; top: -0.62em;
}
.wm-man{
  font-family: var(--font-body); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.42em; color: var(--text-soft);
  margin-left: 0.15em;
}
.wordmark--sm{ font-size: 1.6rem; }
.wordmark--lg{ font-size: 2.9rem; margin-bottom: 1.6rem; }

/* ---------- Language pill + dropdown ---------- */
.lang{ position: relative; }
.lang-menu{
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 170px; list-style: none; margin: 0; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-card); z-index: 30;
}
.lang-menu[hidden]{ display: none; }
.lang-option{
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; border-radius: var(--r-sm); cursor: pointer;
  font-size: 0.98rem; color: var(--text);
}
.lang-option:hover{ background: var(--bg-soft); }
.lang-option[aria-selected="true"]{ color: var(--accent); font-weight: 500; }
.lang-option[aria-selected="true"]::after{ content: "\2713"; color: var(--accent); font-size: 0.9rem; }

.lang-pill{
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  min-width: 170px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem 1.2rem; font-size: 1rem; font-weight: 500; cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.lang-pill:hover{ border-color: var(--border-strong); }
.lang-pill svg{ width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem;
  border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s, color .2s;
}
.btn-lg{ min-height: 60px; padding: 0 1.6rem; font-size: 1.05rem; }
.btn-block{ width: 100%; }
.btn-primary{ background: var(--accent); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover{ background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost{ background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover{ border-color: var(--text-soft); transform: translateY(-1px); }
.btn-arrow{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Intro (State 0) ---------- */
.intro{ text-align: left; }
.intro-h{
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.5rem); line-height: 1.02;
  letter-spacing: -0.025em; margin: 0 0 1rem;
}
.intro-sub{
  color: var(--text-soft); font-size: 1.05rem; line-height: 1.6;
  max-width: 480px; margin: 0 0 1.6rem;
}
.intro-actions{ display: grid; gap: 0.8rem; max-width: 380px; margin: 0; }
.intro-trust{
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--muted); font-size: 0.85rem; margin-top: 1.6rem;
}
.intro-trust svg{ width: 16px; height: 16px; fill: none; stroke: var(--success); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Hero stacks on smaller screens: text first, photo below, centered */
@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; gap: 1.6rem; }
  .stage{ order: 1; max-width: none; justify-self: center; }
  .hero-photo{ order: 2; min-height: 320px; width: 100%; max-width: 440px; justify-self: center; }
  .intro{ text-align: center; }
  .intro-sub{ margin-left: auto; margin-right: auto; }
  .intro-actions{ margin-left: auto; margin-right: auto; }
  .pills{ justify-content: center; }
}

/* ---------- Progress ---------- */
.fs-top{ display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; }
.fs-back{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0;
  cursor: pointer; display: grid; place-items: center;
}
.fs-back svg{ width: 18px; height: 18px; fill: none; stroke: var(--text-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fs-back:hover{ border-color: var(--border-strong); }
.fs-bar{ flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; }
.fs-bar span{ display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--r-pill); transition: width .45s var(--ease-out); }
.fs-step{ font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* ---------- Question ---------- */
.fs-q{ font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4.2vw, 1.95rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 1.4rem; }
.fs-options{ display: grid; gap: 0.7rem; }
.fs-option{
  width: 100%; min-height: 58px; text-align: left;
  font-family: var(--font-body); font-size: 1.02rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0.9rem 1.1rem; cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
}
.fs-option:hover{ border-color: var(--border-strong); transform: translateY(-1px); }
.fs-option[aria-checked="true"]{ background: var(--accent-tint); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fs-help{ font-size: 0.86rem; color: var(--muted); margin-top: 1rem; line-height: 1.55; }
.fs-next{ margin-top: 1.4rem; }

/* ---------- Loader ---------- */
.fs-loader{ text-align: center; padding: 1.5rem 0; }
.loader-ring{ width: 76px; height: 76px; margin: 0 auto 1.4rem; }
.loader-ring svg{ width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-track{ fill: none; stroke: var(--border); stroke-width: 6; }
.loader-arc{ fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 70 200; transform-origin: center; animation: spinArc 1.3s linear infinite; }
.loader-title{ font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.loader-sub{ color: var(--text-soft); font-size: 0.98rem; min-height: 1.4em; transition: opacity .3s; }
.loader-bar{ width: 200px; height: 5px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; margin: 1.3rem auto 0; }
.loader-bar span{ display: block; height: 100%; width: 0; background: var(--accent); animation: barFill 2.4s var(--ease-out) forwards; }
@keyframes spinArc{ to{ transform: rotate(360deg); } }
@keyframes barFill{ to{ width: 100%; } }

/* ---------- Result ---------- */
.fs-result-eyebrow{ color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; margin: 0 0 0.7rem; }
.fs-result-h{ font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 4.4vw, 2.15rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.9rem; }
.fs-result-body{ color: var(--text-soft); line-height: 1.6; margin: 0 0 1.4rem; }
.fs-result-subh{ font-weight: 600; font-size: 0.95rem; margin: 0 0 0.7rem; }
.check-list{ list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 0.55rem; }
.check-list li{ position: relative; padding-left: 1.9rem; color: var(--text); line-height: 1.4; }
.check-list li::before{
  content: ""; position: absolute; left: 0; top: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--accent-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6BFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.fs-price{ color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin: 0 0 1.3rem; }
.fs-micro{ text-align: center; color: var(--muted); font-size: 0.82rem; margin: 0.8rem 0 0; }
.fs-gating{
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0.9rem 1rem;
  color: var(--text-soft); font-size: 0.82rem; line-height: 1.55; margin-top: 1.2rem;
}
.fs-gating svg{ width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.fs-result-back{ display: block; margin: 1.2rem auto 0; background: none; border: none; color: var(--muted); font-family: var(--font-body); font-size: 0.9rem; cursor: pointer; text-decoration: underline; }
.fs-result-back:hover{ color: var(--text-soft); }

/* card wrapper for assessment/result so it reads as a panel */
.fs-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 2.2rem);
}

/* ---------- Stage transitions ---------- */
.swap-out{ animation: sOut .26s ease forwards; }
.swap-in{ animation: sIn .34s var(--ease-out); }
@keyframes sOut{ to{ opacity: 0; transform: translateY(-8px); } }
@keyframes sIn{ from{ opacity: 0; transform: translateY(12px); } to{ opacity: 1; transform: none; } }

/* ---------- Motion / responsive ---------- */
@media (prefers-reduced-motion: reduce){
  .btn:hover, .fs-option:hover{ transform: none; }
  .swap-out, .swap-in{ animation: none; }
  .loader-arc{ animation: none; }
  .loader-bar span{ animation: none; width: 100%; }
}

@media (max-width: 600px){
  .wordmark--lg{ font-size: 2.4rem; }
  .topbar .wordmark--sm{ font-size: 1.4rem; }
  .btn-lg{ min-height: 56px; }
}
