/* ============================================================
   Malvo — shared stylesheet
   Brand: Navy #0D1B2A · Emerald #1D9E75 · Gold #EF9F27
          Stone #5F5E5A · Background #F4F6F4
   Fonts: Inter (body), Playfair Display (hero headings)
   Style: clean, minimal, flat, trustworthy. No gradients.
   ============================================================ */

:root {
  --navy:   #0D1B2A;
  --emerald:#1D9E75;
  --emerald-dark:#168561;
  --gold:   #EF9F27;
  --stone:  #5F5E5A;
  --bg:     #F4F6F4;
  --white:  #FFFFFF;
  --line:   #E2E6E2;
  --soft:   #EDF0ED;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13,27,42,.06), 0 6px 24px rgba(13,27,42,.06);
  --shadow-lg: 0 10px 40px rgba(13,27,42,.12);
  --maxw: 1140px;
  --nav-h: 70px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* Hide the alternate-language script until JS sets the active language */
[hidden] { display: none !important; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: 72px; }
.section-tight { padding-block: 48px; }
.center { text-align: center; }
.muted { color: var(--stone); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--emerald);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  margin-block: 10px 14px;
}
.section-sub { color: var(--stone); max-width: 620px; }
.center .section-sub { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1.5px solid transparent;
  transition: transform .12s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--emerald); padding-inline: 4px; }
.btn-ghost:hover { color: var(--emerald-dark); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,246,244,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 500; font-size: .95rem; color: var(--navy); }
.nav-links a:hover, .nav-links a.active { color: var(--emerald); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Logo mark + wordmark */
.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { width: 30px; height: 34px; display: block; }
.logo .word {
  font-weight: 600; font-size: 1.45rem; letter-spacing: .18em;
  color: var(--navy);
}

/* Language toggle */
.lang-toggle {
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600; font-size: .82rem;
  color: var(--navy);
  letter-spacing: .04em;
}
.lang-toggle:hover { border-color: var(--navy); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; inset-block-start: var(--nav-h); inset-inline: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 22px 18px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease;
    padding-block: 0;
  }
  .nav-links.open { max-height: 320px; padding-block: 12px 18px; }
  .nav-links a { width: 100%; padding-block: 11px; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { padding-block: 84px 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.04; letter-spacing: -.01em;
}
.hero p.lead { font-size: 1.12rem; color: var(--stone); margin-block: 20px 30px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero visual: flat stacked card illustration */
.hero-card {
  background: var(--navy); color: #fff;
  border-radius: 22px; padding: 30px;
  box-shadow: var(--shadow-lg);
}
.hero-card .row { display: flex; justify-content: space-between; align-items: center; padding-block: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-card .row:last-child { border-bottom: none; }
.hero-card .k { color: #B9C2CC; font-size: .9rem; }
.hero-card .v { font-weight: 600; }
.hero-card .v.up { color: var(--emerald); }
.hero-card .big { font-size: 2.1rem; font-weight: 700; font-family: 'Playfair Display', serif; }
.hero-card .dot { color: var(--gold); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 1.18rem; margin-block: 14px 8px; }
.card p { color: var(--stone); font-size: .96rem; }

/* Icon chip */
.icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--soft); color: var(--emerald);
}
.icon svg { width: 24px; height: 24px; }
.icon.gold { color: var(--gold); }

/* Badges */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; letter-spacing: .03em;
}
.badge-free { background: rgba(29,158,117,.13); color: var(--emerald-dark); }
.badge-soon { background: rgba(239,159,39,.16); color: #B9750A; }

/* Tool card */
.tool-card { display: flex; flex-direction: column; }
.tool-card .tool-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card p { flex: 1; }
.tool-card .btn { margin-top: 18px; align-self: flex-start; }

/* ---------- Trust / stat row ---------- */
.trust { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 34px; }
.trust .stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 34px; text-align: center; }
.trust .stat { font-weight: 600; }
.trust .stat .num { color: var(--gold); font-size: 1.3rem; display: block; font-family: 'Playfair Display', serif; }
.trust .sep { color: rgba(255,255,255,.25); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #C7CED5; margin-top: 64px; }
.footer .container { padding-block: 48px 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer .logo .word { color: #fff; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; letter-spacing: .02em; }
.footer a { display: block; padding-block: 5px; color: #C7CED5; font-size: .92rem; }
.footer a:hover { color: var(--emerald); }
.footer .tagline { margin-top: 12px; font-size: .9rem; color: #9AA3AD; }
.disclaimer {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 30px; padding-top: 20px;
  font-size: .82rem; color: #8B94A0; line-height: 1.5;
}

/* ---------- Page header (interior pages) ---------- */
.page-head { padding-block: 56px 18px; }
.page-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1;
}
.page-head p { color: var(--stone); margin-top: 12px; max-width: 640px; }

/* ---------- Forms / tool UI ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--stone); font-size: .82rem; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: .98rem; color: var(--navy);
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--emerald); }
textarea { min-height: 130px; resize: vertical; }

input[type="range"] { width: 100%; accent-color: var(--emerald); height: 6px; }
.range-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--stone); margin-top: 6px; }
.range-val { font-weight: 700; color: var(--emerald); }

/* Tool two-column layout */
.tool-layout { display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; margin-bottom: 18px; }

/* Result figures */
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result {
  background: var(--soft); border-radius: var(--radius-sm); padding: 18px;
}
.result .label { font-size: .82rem; color: var(--stone); }
.result .value { font-size: 1.5rem; font-weight: 700; margin-top: 4px; font-family: 'Playfair Display', serif; }
.result.accent { background: var(--navy); color: #fff; }
.result.accent .label { color: #B9C2CC; }
.result.accent .value { color: var(--gold); }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 11px 12px; text-align: start; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 600; color: var(--stone); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
table.data tr:hover td { background: var(--soft); }

/* Chart container */
.chart-box { position: relative; height: 320px; margin-top: 10px; }
.chart-box.small { height: 280px; }

/* Disclaimer banner */
.disc-banner {
  background: rgba(239,159,39,.1);
  border: 1px solid rgba(239,159,39,.35);
  color: #8a5b07; border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: .9rem; margin-bottom: 26px;
}
.disc-foot { color: var(--stone); font-size: .82rem; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); line-height: 1.55; }

/* CTA strip */
.cta-strip {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 26px 30px; margin-top: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.cta-strip h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; }
.cta-strip p { color: #B9C2CC; font-size: .92rem; }

/* Compact "Invest Now" banner shown after tool results */
.invest-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  background: rgba(29,158,117,.1); border: 1px solid rgba(29,158,117,.35);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-top: 22px;
}
.invest-banner p { color: var(--navy); font-weight: 600; font-size: .98rem; }

/* ---------- Blog ---------- */
.blog-card { display: flex; flex-direction: column; }
.blog-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.blog-card h3 { flex: 0 0 auto; }
.blog-card p { flex: 1; }
.blog-card .btn { margin-top: 18px; align-self: flex-start; }
.read-time { color: var(--stone); font-size: .82rem; font-weight: 500; }
.badge-cat { background: rgba(13,27,42,.07); color: var(--navy); }

/* Newsletter signup bar */
.newsletter {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 34px; margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.newsletter h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.newsletter p { color: #B9C2CC; font-size: .92rem; margin-top: 4px; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 280px; max-width: 520px; }
.newsletter input { flex: 1; min-width: 180px; }

/* ---------- Invest Now (platform cards) ---------- */
.platform-card { display: flex; flex-direction: column; text-align: center; align-items: center; }
.platform-logo {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 1.5rem; font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
}
.platform-logo.green { background: var(--emerald); }
.platform-logo.red { background: #d9534f; }
.platform-card p { flex: 1; }
.platform-card .btn { margin-top: 20px; }
.badge-platform { background: rgba(29,158,117,.13); color: var(--emerald-dark); margin-bottom: 6px; }

/* Why-these-platforms point list */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.why-point { display: flex; gap: 14px; align-items: flex-start; }
.why-point .icon { flex: 0 0 auto; }
.why-point h4 { font-size: 1.05rem; margin-bottom: 4px; }
.why-point p { color: var(--stone); font-size: .92rem; }

@media (max-width: 980px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ---------- Quiz (risk assessment) ---------- */
.quiz-card { max-width: 720px; margin-inline: auto; }
.progress { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress > span { display: block; height: 100%; background: var(--emerald); width: 0; transition: width .3s ease; }
.progress-label { font-size: .82rem; color: var(--stone); margin-bottom: 22px; }
.question h2 { font-size: 1.3rem; margin-bottom: 20px; font-family: 'Playfair Display', serif; }
.options { display: grid; gap: 12px; }
.option {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 18px; background: #fff; text-align: start; font-size: .98rem;
  transition: border-color .15s, background .15s;
}
.option:hover { border-color: var(--emerald); }
.option.selected { border-color: var(--emerald); background: rgba(29,158,117,.07); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 24px; }

/* Gauge for risk result */
.gauge { max-width: 460px; margin: 22px auto; }
.gauge-track { height: 14px; border-radius: 999px; background: linear-gradient(90deg,#1D9E75 0%,#1D9E75 28%,#EF9F27 50%,#d9534f 100%); position: relative; }
.gauge-track { background: var(--soft); display: flex; overflow: hidden; }
.gauge-seg { flex: 1; }
.gauge-seg.s1 { background: #1D9E75; }
.gauge-seg.s2 { background: #6FBF73; }
.gauge-seg.s3 { background: var(--gold); }
.gauge-seg.s4 { background: #d9534f; }
.gauge-marker { position: relative; height: 0; }
.gauge-marker > i {
  position: absolute; top: -6px; width: 4px; height: 26px; background: var(--navy);
  border-radius: 2px; transform: translateX(-50%); transition: inset-inline-start .4s ease;
}
.gauge-labels { display: flex; justify-content: space-between; font-size: .74rem; color: var(--stone); margin-top: 10px; }

.score-big { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--emerald); }
.score-label { font-size: 1.3rem; font-weight: 700; margin-top: 4px; }

/* Allocation bars */
.alloc { margin-top: 8px; }
.alloc-row { margin-bottom: 14px; }
.alloc-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.alloc-bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.alloc-bar > span { display: block; height: 100%; background: var(--emerald); border-radius: 999px; }

/* Multi-step form */
.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.step-dot { flex: 1; height: 6px; border-radius: 999px; background: var(--soft); }
.step-dot.done { background: var(--emerald); }
.step-dot.active { background: var(--gold); }
.fstep { display: none; }
.fstep.active { display: block; }

/* Pills (multi choice in forms) */
.pillset { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px;
  background: #fff; font-size: .9rem; font-weight: 500;
}
.pill.selected { border-color: var(--emerald); background: rgba(29,158,117,.08); color: var(--emerald-dark); }

/* Success message */
.notice {
  background: rgba(29,158,117,.1); border: 1px solid rgba(29,158,117,.4);
  color: var(--emerald-dark); border-radius: var(--radius-sm); padding: 16px 18px;
  font-weight: 500; margin-top: 18px;
}

/* About: compound story */
.story-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.person-card { text-align: center; }
.person-card .amount { font-family: 'Playfair Display', serif; font-size: 2.4rem; font-weight: 700; color: var(--emerald); }
.person-card.late .amount { color: var(--stone); }

/* Social links */
.socials { display: flex; gap: 14px; margin-top: 18px; }
.social {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--soft); color: var(--navy); transition: background .15s, color .15s;
}
.social:hover { background: var(--navy); color: #fff; }
.social svg { width: 20px; height: 20px; }

/* ---------- RTL support ---------- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .logo .word { letter-spacing: .12em; }
[dir="rtl"] .hero p.lead { margin-inline: 0; }
/* Logical properties handle most flipping automatically. */

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tool-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .section { padding-block: 52px; }
  .grid-3, .grid-2, .result-grid, .story-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .result-grid { gap: 12px; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
}
