/* ==========================================================================
   Mateus Ferreira — design system
   Premium B2B consulting: deep navy, restrained gold accent, serif headings,
   system fonts (zero web-font cost), generous whitespace, minimal motion.
   ========================================================================== */

:root {
  --navy-900: #0b1830;
  --navy-800: #0f1f3a;
  --navy-700: #1b2f50;
  --ink: #1a2233;
  --slate: #4b5567;
  --muted: #6b7488;
  --line: #e4e8ef;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --gold: #c9a14a;
  --gold-dark: #a9842f;
  --white: #ffffff;

  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1140px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(11, 24, 48, .06), 0 8px 24px rgba(11, 24, 48, .06);
  --space: clamp(1.5rem, 4vmin, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--navy-900); font-weight: 700; }
h1 { font-size: clamp(1.8rem, 6vmin, 3.4rem); }
h2 { font-size: clamp(1.4rem, 4vmin, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-700); text-decoration-color: rgba(27, 47, 80, .3); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

/* Accessibility ---------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy-900); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: 8px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-700); }
.btn-sm { padding: .6rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }

/* Form loading states */
.btn:disabled { opacity: 0.7; cursor: not-allowed; }
.htmx-request .btn-text { display: none; }
.htmx-request .btn-loader { display: inline-flex !important; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.link-arrow { font-weight: 600; text-decoration: none; color: var(--navy-700); }
.link-arrow::after { content: " \2192"; transition: margin-left .15s; }
.link-arrow:hover::after { margin-left: .25rem; }

.icon { width: 1.5em; height: 1.5em; stroke: currentColor; fill: none; flex: none; vertical-align: middle; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: auto; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--navy-900); }
.brand-tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.main-nav { display: none; gap: 1.6rem; }
.main-nav a { text-decoration: none; color: var(--slate); font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy-900); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch { display: flex; gap: .4rem; font-size: .82rem; text-transform: uppercase; }
.lang-switch a { text-decoration: none; color: var(--muted); padding: .15rem .35rem; border-radius: 4px; }
.lang-switch a.is-current { color: var(--navy-900); font-weight: 700; }

@media (min-width: 880px) { .main-nav { display: flex; } }

/* Hero ------------------------------------------------------------------- */
.hero { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #eaeef6; min-height: calc(100svh - 72px); display: flex; flex-direction: column; padding-block: 0; }
.hero::before, .hero::after { display: none; }
.hero-inner { max-width: 760px; width: 100%; flex: 1; display: flex; flex-direction: column; padding-bottom: 1rem; }
.hero-inner::before { content: ""; margin-top: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--gold); margin: 0 0 1rem; }
.hero-title { color: #fff; margin: 0 0 1.2rem; }
.hero-title .accent { color: var(--gold); }
.hero-sub { font-size: clamp(1.05rem, 3vmin, 1.2rem); color: #c4cddd; max-width: 620px; margin-bottom: clamp(1.2rem, 4vmin, 2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.hero-trust { font-size: .92rem; color: #97a4bd; margin: 0; }

/* Sections --------------------------------------------------------------- */
.section { padding-block: 0; min-height: calc(100svh - 72px); display: flex; flex-direction: column; scroll-margin-top: 72px; }
.section::before, .section::after { display: none; }
.section .container { width: 100%; flex: 1; display: flex; flex-direction: column; padding-bottom: 1rem; }
.section .container::before { content: ""; margin-top: auto; }
.section-alt { background: var(--bg-alt); }
.section-title { margin: 0 0 .6rem; }
.section-lead { color: var(--slate); font-size: clamp(1.05rem, 2.5vmin, 1.15rem); max-width: 640px; margin: 0 0 clamp(1.2rem, 4vmin, 1.8rem); }
.section-cta { margin-top: 2rem; }

.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 { margin: 0 0 .8rem; }
.page-lead { font-size: 1.2rem; color: var(--slate); max-width: 680px; margin: 0; }

/* Grids & cards ---------------------------------------------------------- */
.grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: clamp(0.8rem, 3vmin, 1.4rem); padding-bottom: 1rem; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-inline: calc(-1 * clamp(1.1rem, 4vw, 2rem)); padding-inline: clamp(1.1rem, 4vw, 2rem); }
.grid::-webkit-scrollbar { display: none; }
.grid > * { flex: 0 0 85%; max-width: 400px; scroll-snap-align: center; }
@media (min-width: 720px) {
  .grid { display: grid; overflow-x: visible; padding-bottom: 0; margin-inline: 0; padding-inline: 0; }
  .grid > * { flex: none; max-width: none; scroll-snap-align: none; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Mobile Grid Carousel Navigation */
.grid-carousel-nav { display: none; }
@media (max-width: 719px) {
  .grid-carousel-nav { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1rem; }
  .grid-carousel-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--line); color: var(--navy-900); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 0; box-shadow: var(--shadow); }
  .grid-carousel-btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: scale(1.05); }
}

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(0.9rem, 3vmin, 1.4rem); }
.card .icon { width: clamp(1.6rem, 4vmin, 2rem); height: clamp(1.6rem, 4vmin, 2rem); color: var(--gold); margin-bottom: clamp(0.5rem, 2vmin, 0.8rem); }
.card h2, .card h3 { margin: 0 0 .4rem; }
.card p { color: var(--slate); margin: 0; font-size: clamp(0.85rem, 2vmin, 0.95rem); }
.card-solution, .card-why, .card-service { box-shadow: var(--shadow); border-color: transparent; }
.card-service { padding: clamp(1.2rem, 4vmin, 2rem); }

/* Flip cards ------------------------------------------------------------- */
.card-flip-container { perspective: 1200px; cursor: pointer; background: transparent; height: 100%; }
.card-flip-inner { display: grid; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; }
.card-flip-container.is-flipped .card-flip-inner { transform: rotateY(180deg); }
.card-flip-front, .card-flip-back { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; height: 100%; }
.card-flip-back { transform: rotateY(180deg); background: var(--bg-alt); border-color: var(--gold); box-shadow: 0 4px 20px rgba(201, 161, 74, 0.15); }
.flip-hint, .flip-hint-back { margin-top: auto; padding-top: clamp(0.6rem, 2vmin, 1.2rem); font-size: clamp(0.75rem, 2vmin, 0.85rem); font-weight: 700; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.4rem; }
.flip-hint { opacity: 0; transition: opacity 0.3s; }
.card-flip-container:hover .flip-hint { opacity: 1; }
.flip-hint-back { opacity: 1; color: var(--slate); margin-top: 0; margin-bottom: 1rem; padding-top: 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.flip-icon { font-size: 1.2em; font-weight: normal; }
@media (hover: none) { .flip-hint { opacity: 1; } }

a.card-case { text-decoration: none; color: inherit; box-shadow: var(--shadow); border-color: transparent; display: block; transition: transform .15s, box-shadow .15s; }
a.card-case:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11,24,48,.12); }
.case-industry { display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dark); font-weight: 700; margin-bottom: .6rem; }
.case-metric { margin-top: 1rem !important; color: var(--navy-900) !important; }
.case-metric strong { color: var(--gold-dark); font-size: 1.25rem; }

/* Steps ------------------------------------------------------------------ */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.step { display: flex; gap: 1.2rem; align-items: flex-start; }
.step h2, .step h3 { margin: 0 0 .3rem; }
.step p { color: var(--slate); margin: 0; }
.step-num { flex: none; width: clamp(2.2rem, 5vmin, 2.8rem); height: clamp(2.2rem, 5vmin, 2.8rem); border-radius: 50%; background: var(--navy-900); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: clamp(1rem, 3vmin, 1.2rem); }
.card-process { display: flex; flex-direction: column; }
.card-process .step-num { margin-bottom: clamp(0.8rem, 2vmin, 1.2rem); }
.steps-lg .step { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.steps-lg .step:last-child { border-bottom: 0; }

/* Lists ------------------------------------------------------------------ */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list .icon { color: var(--gold); width: 1.3rem; height: 1.3rem; margin-top: .15rem; }

/* Testimonials ----------------------------------------------------------- */
.testimonial { margin: 0; background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.testimonial blockquote { margin: 0 0 1.1rem; font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: var(--navy-900); }
.testimonial blockquote::before { content: "\201C"; color: var(--gold); font-size: 2rem; line-height: 0; vertical-align: -.4rem; margin-right: .15rem; }
.testimonial figcaption { display: flex; flex-direction: column; }
.testimonial figcaption strong { color: var(--ink); }
.testimonial figcaption span { color: var(--muted); font-size: .9rem; }

/* Hosting / about teaser ------------------------------------------------- */
.hosting-inner, .about-teaser { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .hosting-inner { grid-template-columns: 1fr 1fr; align-items: center; } }

/* CTA band --------------------------------------------------------------- */
.cta-band { background: var(--navy-900); color: #fff; }
.cta-band-inner { padding-block: clamp(3rem, 6vw, 4.5rem); display: grid; gap: 1.6rem; align-items: center; }
.cta-band h2 { color: #fff; margin: 0 0 .5rem; }
.cta-band p { color: #c4cddd; margin: 0; max-width: 520px; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.cta-band .btn-ghost, .hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn-ghost:hover, .hero .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.05); }
@media (min-width: 820px) { .cta-band-inner { grid-template-columns: 1.4fr 1fr; } .cta-band-actions { justify-content: flex-end; } }

/* Floating WhatsApp ------------------------------------------------------ */
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: inline-flex; align-items: center; gap: .5rem; background: #25d366; color: #04391f; font-weight: 700; padding: .8rem 1rem; border-radius: 999px; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.wa-float .icon { width: 1.6rem; height: 1.6rem; fill: #04391f; stroke: none; }
.wa-float-label { display: none; }
@media (min-width: 560px) { .wa-float-label { display: inline; } }

/* About ------------------------------------------------------------------ */
.about-grid { display: grid; gap: 2.5rem; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 360px 1fr; align-items: start; } }
.prose h2 { margin-top: 2rem; }
.prose p { color: var(--slate); }

/* Case detail ------------------------------------------------------------ */
.metrics-row { display: grid; gap: 1.5rem; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 600px) { .metrics-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.metric { display: flex; flex-direction: column; }
.metric-value { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--gold-dark); }
.metric-label { color: var(--slate); font-size: .95rem; }
.case-body { max-width: 720px; }
.case-body h2 { margin-top: 2rem; }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }
.contact-channels { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.contact-channels li { display: flex; gap: .6rem; align-items: center; }
.contact-channels .icon { color: var(--gold); }
.contact-form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 4vw, 2rem); box-shadow: var(--shadow); }
.section-meeting { padding-block: 2rem; scroll-margin-top: 72px; }

/* Lead form -------------------------------------------------------------- */
.lead-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea { font: inherit; padding: 0 0.75rem; height: 42px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); box-sizing: border-box; }
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; }
.field textarea { resize: vertical; }
.field-error { color: #b42318; font-size: .85rem; }
.form-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; border-radius: 8px; padding: .7rem .9rem; margin: 0; }
.form-note { color: var(--muted); font-size: .85rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-success { text-align: center; padding: 1.5rem; }
.lead-success .icon { width: 3rem; height: 3rem; color: #12863b; margin: 0 auto 1rem; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #b9c3d6; padding-top: clamp(3rem, 6vw, 4rem); }
.footer-inner { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.footer-name { font-family: var(--serif); font-size: 1.2rem; color: #fff; margin: 0 0 .4rem; }
.footer-desc { color: #97a4bd; max-width: 320px; margin: 0; }
.footer-nav, .footer-contact { display: grid; gap: .6rem; align-content: start; }
.site-footer a { color: #b9c3d6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.3rem; }
.footer-legal p { margin: 0; font-size: .85rem; color: #8693ac; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }

/* Carousel ----------------------------------------------------------------- */
.carousel-header { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; margin-top: 2.5rem; }
.carousel-header-text { flex: 1; }
.carousel-header-text .section-title, .carousel-header-text .section-lead { margin-bottom: 0; }
.carousel-nav { display: flex; gap: 1rem; align-items: center; }
.btn-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--navy-900); transition: all 0.2s; }
.btn-icon:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.05); }
.btn-icon svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .carousel-header { flex-direction: row; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; } }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.5rem; padding-bottom: 2rem; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(11,24,48,.1) transparent; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-track { background: transparent; }
.carousel::-webkit-scrollbar-thumb { background-color: rgba(11,24,48,.1); border-radius: 10px; }
.carousel-item { scroll-snap-align: start; flex: 0 0 85%; max-width: 420px; background: var(--white); display: flex; flex-direction: column; padding: 2.2rem; }
.carousel-title { color: var(--navy-900); font-family: var(--serif); font-size: 1.5rem; margin-top: 0; margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) { .carousel-item { flex: 0 0 65%; } }
@media (min-width: 900px) { .carousel-item { flex: 0 0 45%; } }
/* Flow navigation -------------------------------------------------------- */
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.flow-cta { margin-top: auto; text-align: center; display: flex; justify-content: center; }
.btn-flow { display: inline-flex; flex-direction: column; align-items: center; gap: clamp(0.6rem, 2vmin, 1rem); text-decoration: none; color: var(--navy-900); font-family: var(--serif); font-size: clamp(1.2rem, 3vmin, 1.6rem); font-weight: 700; transition: color 0.2s; background: transparent; border: none; box-shadow: none; padding: 0; }
.btn-flow:hover { color: var(--gold-dark); transform: none; box-shadow: none; border: none; }
.btn-flow::after { content: ""; display: block; width: clamp(40px, 8vmin, 60px); height: clamp(40px, 8vmin, 60px); border-radius: 50%; background-color: var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cpolyline points='19 12 12 19 5 12'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: clamp(18px, 4vmin, 28px); box-shadow: 0 8px 24px rgba(201, 161, 74, 0.4); animation: bounce-down 2s infinite ease-in-out; transition: transform 0.2s, background-color 0.2s; }
.btn-flow:hover::after { background-color: var(--navy-900); transform: scale(1.05); animation-play-state: paused; }
.hero .btn-flow { color: #fff; background: transparent; border: none; }
.hero .btn-flow:hover { color: var(--gold); background: transparent; border: none; }
.hero .btn-flow::after { background-color: rgba(255,255,255,0.15); box-shadow: none; }
.hero .btn-flow:hover::after { background-color: var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%230b1830' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cpolyline points='19 12 12 19 5 12'/%3E%3C/svg%3E"); box-shadow: 0 8px 24px rgba(201, 161, 74, 0.4); }

/* Motion preferences ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Fit to screen (Vertical responsiveness) -------------------------------- */
@media (max-height: 900px) {
  :root { --space: clamp(1.5rem, 3vh, 2.5rem); }
  .btn-flow { font-size: clamp(1rem, 2.5vh, 1.25rem); gap: 0.6rem; }
  .btn-flow::after { width: clamp(36px, 6vh, 44px); height: clamp(36px, 6vh, 44px); }
  .card .icon { width: 1.6rem; height: 1.6rem; margin-bottom: 0.4rem; }
  .section-lead { margin-bottom: 1rem; font-size: clamp(0.95rem, 2.5vh, 1.05rem); }
  h2 { font-size: clamp(1.3rem, 4vh, 1.8rem); }
  .grid { gap: 0.8rem; }
}

.radio-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.6rem 1rem; border: 1.5px solid var(--line); border-radius: 8px; transition: all 0.2s; font-weight: 500; }
.radio-label-sm { padding: 0.35rem 0.6rem; font-size: 0.85rem; border-radius: 6px; }
.radio-label:has(input:checked) { border-color: var(--navy-900); background: var(--navy-900); color: white; }
.radio-label input { display: none; }

.form-row { display: grid; gap: 1.1rem; align-items: flex-end; }
@media(min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }

.challenge-cards { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
@media(min-width: 500px) { .challenge-cards { grid-template-columns: 1fr 1fr; } }
@media(min-width: 768px) { .challenge-cards { grid-template-columns: repeat(3, 1fr); } }
@media(min-width: 1000px) { .challenge-cards { grid-template-columns: repeat(5, 1fr); } }
.challenge-card { display: flex; flex-direction: column; padding: 1rem; border: 2px solid transparent; border-radius: 12px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--bg); box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02); }
.challenge-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04); }
.challenge-card:has(input:checked) { border-color: var(--navy-900); background: var(--navy-50); box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.challenge-card input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.challenge-card strong { font-size: 0.95rem; color: var(--navy-900); margin-bottom: 0.2rem; }
.challenge-card span { font-size: 0.8rem; color: var(--text); }

.input-with-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; height: 42px; box-sizing: border-box; }
.input-with-prefix:focus-within { border-color: var(--navy-900); }
.custom-select-wrapper { position: relative; user-select: none; cursor: pointer; border-right: 1.5px solid var(--line); height: 100%; box-sizing: border-box; }
.custom-select-trigger { display: flex; align-items: center; gap: 0.25rem; padding: 0 0.75rem; font-size: 1.25rem; height: 100%; box-sizing: border-box; }
.custom-select-options { position: absolute; top: 100%; left: 0; background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 250px; overflow-y: auto; z-index: 100; display: none; width: max-content; min-width: 200px; }
.custom-select-wrapper.open .custom-select-options { display: block; }
.custom-select-option { padding: 0.5rem 1rem; transition: background 0.2s; display: flex; align-items: center; font-size: 0.9rem; color: var(--text); }
.custom-select-option:hover { background: var(--navy-50); }
.input-with-prefix input { flex: 1; border: none; background: transparent; padding: 0 0.75rem; height: 100%; outline: none; font: inherit; font-size: 1rem; min-width: 0; box-sizing: border-box; color: var(--text); }

.outro-input-wrap { margin-top: 0.5rem; animation: fadeIn 0.3s ease; }
.outro-input { width: 100%; transition: border-color 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
