/* =========================================================
   Clara Energy Consultancy — site styles
   Brand: Atlantic Blue #0E3A53 · Algarve Sun #F2A93B · Limestone #F7F6F2
   Type: Manrope (SemiBold / Medium)
   ========================================================= */

:root {
  --blue: #0E3A53;
  --blue-2: #154B69;
  --blue-deep: #0A2B3E;
  --sun: #F2A93B;
  --sun-deep: #DC8F1C;
  --sun-ink: #9A5B06;      /* sun-toned text that passes contrast on light */
  --stone: #F7F6F2;

  --bg: var(--stone);
  --bg-alt: #EFECE4;
  --surface: #FFFFFF;
  --text: #0E2A3B;
  --muted: #536370;
  --line: #E3DFD5;
  --accent: var(--blue);
  --accent-soft: rgba(14, 58, 83, .07);
  --sun-soft: rgba(242, 169, 59, .16);
  --mark-ring: var(--blue);
  --header-bg: rgba(247, 246, 242, .82);
  --danger: #B42318;
  --shadow: 0 1px 2px rgba(14, 58, 83, .05), 0 16px 36px -16px rgba(14, 58, 83, .22);
  --shadow-lg: 0 34px 70px -28px rgba(14, 58, 83, .4);

  --radius: 22px;
  --radius-sm: 12px;
  --wrap: 1220px;
  --gutter: clamp(16px, 4vw, 40px);

  --f: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071C29;
    --bg-alt: #0A2433;
    --surface: #0E2C3F;
    --text: #EEF2F4;
    --muted: #9DB1BE;
    --line: #1D4057;
    --accent: var(--sun);
    --accent-soft: rgba(242, 169, 59, .12);
    --sun-ink: var(--sun);
    --mark-ring: #FFFFFF;
    --header-bg: rgba(7, 28, 41, .8);
    --danger: #FF8A7A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #071C29;
  --bg-alt: #0A2433;
  --surface: #0E2C3F;
  --text: #EEF2F4;
  --muted: #9DB1BE;
  --line: #1D4057;
  --accent: var(--sun);
  --accent-soft: rgba(242, 169, 59, .12);
  --sun-ink: var(--sun);
  --mark-ring: #FFFFFF;
  --header-bg: rgba(7, 28, 41, .8);
  --danger: #FF8A7A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 0; }
/* Emphasis: same face, set off by a sunlit underline */
em {
  font-style: normal; font-weight: 800;
  background: linear-gradient(transparent 68%, var(--sun-soft) 68%, var(--sun-soft) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
p { margin: 0; }
::selection { background: rgba(242, 169, 59, .35); }
:focus-visible { outline: 2px solid var(--sun-deep); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.muted { color: var(--muted); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue); }
.brand-mark { width: 40px; height: 40px; }
.brand-word { display: grid; font-weight: 700; font-size: 27px; line-height: .9; letter-spacing: -.04em; }
.brand-word small { font-size: 8.6px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-top: 5px; opacity: .8; }
:root[data-theme="dark"] .brand { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { color: #fff; } }
.brand-light { color: #fff !important; --mark-ring: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 14px; border: 1.5px solid transparent;
  font: 700 16px/1 var(--f); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn .ico { transition: transform .2s ease; }
.btn:hover .ico { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 11px 18px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-sun { background: var(--sun); color: var(--blue); box-shadow: 0 10px 22px -10px rgba(220, 143, 28, .8); }
.btn-sun:hover { background: #F5B857; transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(220, 143, 28, .9); }
.btn-ink { background: var(--blue); color: #fff; }
.btn-ink:hover { background: var(--blue-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
:root[data-theme="dark"] .btn-ink { background: var(--surface); border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-ink { background: var(--surface); border-color: var(--line); } }
.btn-outline { color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, transparent); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--sun); }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--sun-ink); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 13px/1.3 var(--f); letter-spacing: .14em; text-transform: uppercase;
  color: var(--sun-ink); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); flex-shrink: 0; }
.eyebrow .dot { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none; transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--sun); transform: scaleX(0); transition: transform .25s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}
.menu-btn { display: none !important; }

/* Mobile menu (popover) */
.mobile-menu {
  margin: 0; inset: 0 0 auto auto; height: 100dvh; width: min(360px, 100vw); max-height: none;
  border: 0; padding: 20px; background: var(--surface); color: var(--text);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .3);
  flex-direction: column; gap: 24px;
}
.mobile-menu:popover-open { display: flex; }
.mobile-menu::backdrop { background: rgba(10, 43, 62, .5); backdrop-filter: blur(3px); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font: 700 20px/1.2 var(--f); }

/* ---------- Hero (light, sunlit) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(38% 55% at 82% 30%, rgba(242, 169, 59, .28), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(14, 58, 83, .07), transparent 70%),
    var(--bg);
  padding: clamp(56px, 8vw, 100px) 0 clamp(72px, 9vw, 120px);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(40px, 5.2vw, 72px); font-weight: 800; letter-spacing: -.045em; line-height: 1.02;
  margin-bottom: 26px; text-wrap: balance; color: var(--blue);
}
:root[data-theme="dark"] .hero h1 { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 { color: #fff; } }
.hero h1 em { padding-inline: .04em; }
.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); max-width: 560px; margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: fit-content; box-shadow: var(--shadow);
}
.hero-stats div { display: flex; flex-direction: column-reverse; padding: 16px clamp(16px, 2.4vw, 30px); border-left: 1px solid var(--line); }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 0 0 2px; font: 800 clamp(22px, 2.2vw, 30px)/1.15 var(--f); letter-spacing: -.03em; color: var(--accent); white-space: nowrap; }

.hero-visual { position: relative; margin: 0; animation: rise 1s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hero-ring { position: absolute; width: 78%; right: -22%; top: -14%; z-index: -1; opacity: .16; }
.hero-photo {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px; /* arch, like a southern doorway */
  box-shadow: var(--shadow-lg); border: 8px solid var(--surface);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(242, 169, 59, .18) 0%, transparent 45%, rgba(14, 58, 83, .45) 100%);
}
.float-card {
  position: absolute; left: clamp(-40px, -3vw, -16px); bottom: 40px;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px 16px 16px; border-radius: 18px;
  background: var(--blue); color: #fff;
  box-shadow: 0 24px 50px -20px rgba(10, 43, 62, .7);
  animation: rise 1s .6s cubic-bezier(.2, .7, .2, 1) both;
}
.float-card strong { display: block; font: 700 17px/1.25 var(--f); }
.float-card small { color: rgba(255, 255, 255, .72); font-size: 14px; }
.float-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sun); color: var(--blue); }
.float-icon .ico { width: 22px; height: 22px; stroke-width: 2; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }

/* ---------- Ticker ---------- */
.ticker { background: var(--blue); color: #fff; overflow: hidden; padding: 18px 0; }
.ticker-track { display: flex; align-items: center; gap: 30px; width: max-content; animation: marquee 44s linear infinite; }
.ticker span { font: 700 15px/1 var(--f); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ticker i { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(242, 169, 59, .2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 10vw, 132px) 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(32px, 4.2vw, 54px); font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.section-intro { font-size: 18px; color: var(--muted); max-width: 560px; }
.section-head { margin-bottom: clamp(44px, 6vw, 68px); }
.split-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px 64px; align-items: end; }
.center-head { text-align: center; display: grid; justify-items: center; }
.center-head .section-intro { margin-top: 20px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 56px; }
.service {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, border-color .35s;
}
.service::after { /* sun glow that rises on hover */
  content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 169, 59, .28), transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--sun) 55%, var(--line)); }
.service:hover::after { opacity: 1; }
.service header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.service-icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--sun-soft); color: var(--sun-ink); transition: background-color .3s, color .3s;
}
.service-icon .ico { width: 28px; height: 28px; stroke-width: 1.7; }
.service:hover .service-icon { background: var(--sun); color: var(--blue); }
.service-num { font: 800 44px/1 var(--f); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--muted) 45%, transparent); }
.service h3 { font-size: clamp(22px, 2vw, 26px); margin-bottom: 12px; }
.service > p { color: var(--muted); margin-bottom: 24px; }
.ticks { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 15.5px; line-height: 1.45; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 5px;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E3A53' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- Why Clara ---------- */
.why-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(48px, 7vw, 100px); align-items: center; }
.why-visual { position: relative; margin: 0 0 40px; }
.why-photo { border-radius: 28px 28px 28px 160px; overflow: hidden; aspect-ratio: 4 / 4.6; box-shadow: var(--shadow-lg); }
.why-photo img { width: 100%; height: 100%; object-fit: cover; }
.commit-card {
  position: absolute; right: clamp(-28px, -2.5vw, -12px); bottom: -40px; margin: 0;
  max-width: 320px; padding: 26px 28px; border-radius: 20px;
  background: var(--sun); color: var(--blue); box-shadow: var(--shadow-lg);
}
.commit-label { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 8px; }
.commit-card p:last-child { font: 700 19px/1.4 var(--f); letter-spacing: -.01em; }
.why-copy .section-intro { margin: 24px 0 42px; }
.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 34px; }
.reason { padding-top: 20px; border-top: 2px solid var(--line); }
.reason h3, .perk h3 { font-size: 18px; margin: 14px 0 8px; letter-spacing: -.015em; }
.reason p, .perk p { color: var(--muted); font-size: 15.5px; }
.reason-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.reason-icon .ico { width: 21px; height: 21px; }

/* ---------- Process ---------- */
.section-ink {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--blue); color: #fff;
}
.section-ink::before { /* rising sun on the horizon */
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -380px; width: 760px; height: 760px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(242, 169, 59, .32) 0%, rgba(242, 169, 59, .08) 45%, transparent 70%);
}
.section-ink .eyebrow { color: var(--sun); }
.section-ink em { background: linear-gradient(transparent 68%, rgba(242, 169, 59, .45) 68%, rgba(242, 169, 59, .45) 92%, transparent 92%); }
.section-ink .section-intro { color: rgba(255, 255, 255, .72); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  position: relative; padding: 28px 24px 30px; border-radius: 20px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  transition: background-color .3s, border-color .3s;
}
.step:hover { background: rgba(255, 255, 255, .09); border-color: rgba(242, 169, 59, .5); }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--sun); color: var(--blue); font: 800 17px/1 var(--f); margin-bottom: 22px;
}
.step:not(:last-child)::after { /* ray to the next step */
  content: ""; position: absolute; top: 54px; right: -20px; width: 20px; height: 2px; background: var(--sun); opacity: .6;
}
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { color: rgba(255, 255, 255, .72); font-size: 15.5px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 7vw, 96px); align-items: start; }
.contact-copy { position: sticky; top: 112px; }
.contact-copy .section-intro { margin: 24px 0 38px; }
.perks { display: grid; gap: 22px; margin-bottom: 38px; }
.perk { display: flex; gap: 16px; }
.perk h3 { margin-top: 2px; }
.direct { list-style: none; margin: 0; padding: 26px 0 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.direct li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.direct .ico { color: var(--sun-deep); }
.direct a { text-decoration: none; color: var(--text); font-weight: 600; }
.direct a:hover { color: var(--sun-ink); }

.form-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow);
}
.form-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--blue) 0 70%, var(--sun) 70%); }
.form-title { font-size: 26px; margin-bottom: 8px; }
.form-sub { color: var(--muted); margin-bottom: 30px; }
form { display: grid; gap: 22px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 700; font-size: 15px; padding: 0; }
.field legend { margin-bottom: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.warn { color: var(--sun-ink); } .count.over { color: var(--danger); }
input:not([type="radio"]):not([type="checkbox"]), textarea {
  width: 100%; font: 500 16px/1.4 var(--f); color: var(--text);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea { resize: vertical; min-height: 130px; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:not([type="radio"]):not([type="checkbox"]):focus, textarea:focus {
  outline: none; border-color: var(--sun-deep); background: var(--surface); box-shadow: 0 0 0 4px var(--sun-soft);
}
.invalid input, .invalid textarea { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: 14px; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 14px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; gap: 5px; border-radius: 14px; background: var(--bg); border: 1.5px solid var(--line); }
.segmented label {
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 11px; border-radius: 10px; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--blue); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--sun-deep); outline-offset: 2px; }
/* Show the field that matches the chosen contact method — pure CSS */
.field-mobile { display: none; }
form:has(input[value="mobile"]:checked) .field-mobile { display: grid; }
form:has(input[value="mobile"]:checked) .field-email { display: none; }

.consent { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 500 !important; color: var(--muted); font-size: 14.5px !important; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sun-deep); flex-shrink: 0; }
.form-alert { padding: 14px 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-size: 15px; }
.form-done { text-align: center; padding: 40px 10px; display: grid; justify-items: center; gap: 14px; }
.form-done h3 { font-size: 24px; }
.form-done p { color: var(--muted); max-width: 380px; }
.done-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--sun); color: var(--blue); }
.done-icon .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(14, 58, 83, .3); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deep); color: rgba(255, 255, 255, .72); padding: 76px 0 0; border-top: 4px solid var(--sun); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .brand { margin-bottom: 20px; }
.footer-brand .brand-mark { width: 48px; height: 48px; }
.footer-brand .brand-word { font-size: 32px; }
.footer-brand p { max-width: 320px; font-size: 15.5px; }
.site-footer h4 { color: var(--sun); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15.5px; }
.site-footer a, .site-footer .link { text-decoration: none; color: inherit; transition: color .2s; text-align: left; }
.site-footer a:hover, .site-footer .link:hover { color: #fff; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; }

/* ---------- Cookie ---------- */
.cookie {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  width: min(460px, calc(100% - 32px));
  display: grid; gap: 14px;
  padding: 20px 20px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--sun); box-shadow: var(--shadow-lg);
  font-size: 14.5px; color: var(--muted); animation: rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.cookie-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Dialogs ---------- */
.modal {
  width: min(720px, calc(100% - 32px)); max-height: min(86vh, 900px); padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.modal[open] { display: flex; flex-direction: column; animation: pop .3s cubic-bezier(.2, .7, .2, 1); }
.modal::backdrop { background: rgba(10, 43, 62, .6); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 23px; }
.modal-body { padding: 22px 28px 32px; overflow-y: auto; }
.legal h3 { font-size: 17px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; }
.legal ul { padding-left: 20px; margin: 8px 0 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 92px; right: 20px; z-index: 70; max-width: 360px;
  padding: 14px 18px; border-radius: 14px; background: var(--blue); color: #fff; box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--sun); animation: rise .4s both;
}
.toast.error { background: #7A1F14; border-left-color: #FF8A7A; }

/* ---------- Scroll reveal ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid !important; }
  .hero-grid, .why-grid, .contact-grid, .split-head { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .hero-photo { aspect-ratio: 5 / 4; border-radius: 240px 240px 28px 28px; }
  .float-card { left: 16px; bottom: -24px; }
  .why-visual { max-width: 620px; }
  .contact-copy { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .header-bar { height: 66px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-word { font-size: 23px; }
  .services, .reasons, .row-2, .steps { grid-template-columns: 1fr; }
  .hero-stats { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .hero-stats div { padding: 14px 12px; }
  .hero-stats dd { font-size: 19px; }
  .hero-stats dt { font-size: 10.5px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-photo { border-radius: 160px 160px 22px 22px; border-width: 6px; }
  .why-photo { border-radius: 22px 22px 22px 100px; }
  .commit-card { position: relative; right: auto; bottom: auto; margin: -48px 16px 0; max-width: none; }
  .why-visual { margin-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cookie { left: 16px; bottom: 16px; }
  .modal-head, .modal-body { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Honeypot field — hidden from people, visible to spam bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Language toggle (EN | PT) ---------- */
.lang-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lang-toggle a {
  display: grid; place-items: center; min-width: 36px; height: 34px; padding: 0 8px; border-radius: 9px;
  font: 700 13px/1 var(--f); letter-spacing: .06em; text-decoration: none; color: var(--muted); transition: background-color .2s, color .2s;
}
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a[aria-current="page"] { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .lang-toggle a[aria-current="page"] { background: var(--sun); color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lang-toggle a[aria-current="page"] { background: var(--sun); color: var(--blue); } }

/* Portuguese runs longer: a touch smaller, with hyphenation */
:lang(pt) .hero h1 { font-size: clamp(34px, 4.4vw, 62px); }
:lang(pt) h1, :lang(pt) h2, :lang(pt) h3 { hyphens: auto; }
@media (max-width: 720px) {
  .header-actions { gap: 6px; }
  .lang-toggle a { min-width: 32px; height: 32px; padding: 0 6px; font-size: 12px; }
}
