/* Van Son scope-intake. Tokens from the Van Son design system (1rem = 10px). */
html { font-size: 62.5%; -webkit-font-smoothing: antialiased; }
@media (max-width: 768px) { html { font-size: 56%; } }
:root {
  --navy: #000126; --navy-700: #20214a; --teal: #00aca0; --grey: #f2f5f7; --white: #fff;
  --soft: rgba(0,1,38,.6); --border: rgba(0,1,38,.2); --border-weak: rgba(0,1,38,.1);
  --error: #8b0000; --error-bg: rgba(255,0,0,.08);
  --ease: cubic-bezier(.53,0,0,1); --ease-out: cubic-bezier(.165,.84,.44,1);
  --font: "Lato", system-ui, sans-serif; --meta: "Inter", system-ui, sans-serif;
  --shadow: 2px 8px 24px rgba(0,1,38,.06);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--grey); color: var(--navy); font: 400 1.8rem/1.5 var(--font); letter-spacing: -0.03em; min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }
h1, h2, h3 { line-height: 1.1; }
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px dotted var(--teal); outline-offset: 3px; }
::selection { background: var(--teal); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* pill label */
.pill { display: inline-flex; align-items: center; gap: 1.2rem; padding: .8rem 1.6rem; border-radius: 1000px; background: var(--white);
  font: 400 1.4rem/1 var(--meta); letter-spacing: 0; text-transform: uppercase; color: var(--navy); white-space: nowrap; }
.pill::before { content: ""; width: .8rem; height: .8rem; border-radius: .2rem; background: var(--teal); flex: none; }
.pill.on-grey { background: var(--grey); }
.pill.muted::before { background: var(--border); }
.pill.amber::before { background: #b25e00; }

/* primary button: outline pill + teal circle */
.btn { display: inline-flex; align-items: center; gap: 1.6rem; border: 1px solid var(--navy); background: transparent; border-radius: 100rem;
  padding: .4rem .4rem .4rem 2.4rem; font-size: 1.6rem; line-height: 1; color: var(--navy); text-decoration: none; white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s; }
.btn .roll { display: flex; flex-direction: column-reverse; gap: .3em; height: 1.2em; overflow: hidden; padding-bottom: .2em; margin-bottom: -.2em; }
.btn .roll span { flex: none; transition: transform .5s var(--ease); }
.btn:hover .roll span { transform: translateY(1.3em); }
.btn .circle { width: 4rem; height: 4rem; border-radius: 50%; background: var(--teal); display: grid; place-items: center; flex: none; overflow: hidden; position: relative; }
.btn .circle svg { width: 1.6rem; height: 1.6rem; color: #fff; transition: transform .5s var(--ease); }
.btn .circle svg + svg { position: absolute; transform: translateX(-3rem); }
.btn:hover .circle svg:first-child { transform: translateX(3rem); }
.btn:hover .circle svg + svg { transform: translateX(0); }
.btn.solid { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.solid:hover { background: var(--navy-700); }
.btn.big { font-size: 2rem; padding-left: 3.2rem; }
.btn.big .circle { width: 5.6rem; height: 5.6rem; }
.btn.big .circle svg { width: 2.2rem; height: 2.2rem; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.loading .circle svg { opacity: 0; }
.btn.loading .circle::after { content: ""; width: 1.6rem; height: 1.6rem; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; position: absolute; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* chip buttons (filters, small actions) */
.chip { display: inline-flex; align-items: center; gap: .8rem; height: 4.4rem; padding: 0 2rem; border-radius: 100rem; border: 1px solid var(--border);
  background: transparent; font-size: 1.6rem; line-height: 1; color: var(--navy); transition: background-color .3s, color .3s, border-color .3s; text-decoration: none; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip svg { width: 1.8rem; height: 1.8rem; }

/* chamfered corner (signature shape) */
.chamfer { --cut: 4.8rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }

.logo { display: block; height: 4.4rem; width: auto; }

/* ============ FORM PAGE ============ */
.form-page { max-width: 88rem; margin: 0 auto; padding: 4rem 2.4rem 8rem; }
.form-page header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 6.4rem; }
.hero h1 { font-size: clamp(3.6rem, 2.4rem + 3vw, 6.4rem); margin: 2.4rem 0 2.4rem; }
.hero p { color: var(--soft); font-size: 2rem; max-width: 60rem; }
.note { display: flex; gap: 1.6rem; align-items: flex-start; margin: 3.2rem 0 4rem; padding: 2rem 2.4rem; border-radius: 1.6rem; border: 2px solid var(--teal); font-size: 1.7rem; }
.note svg { flex: none; width: 2.4rem; height: 2.4rem; color: var(--teal); margin-top: .1rem; }
.card { background: var(--white); border-radius: 1.6rem; padding: 6.4rem; }
@media (max-width: 768px) { .card { padding: 3.2rem 2.4rem 5.6rem; } .form-page header { margin-bottom: 4rem; } }
.field { display: grid; grid-template-columns: 5.6rem 1fr; gap: 0 1.6rem; padding: 3.2rem 0; border-bottom: 1px solid var(--border-weak); }
.field:first-child { padding-top: 0; }
.field:last-of-type { border-bottom: 0; }
.field .num { font: 500 1.4rem/1 var(--meta); letter-spacing: 0; color: var(--teal); padding-top: .8rem; }
.field label, .field .label { display: block; font-size: 2.4rem; line-height: 1.2; margin-bottom: .4rem; }
.field .hint { color: var(--soft); font-size: 1.6rem; margin-bottom: .8rem; }
@media (max-width: 560px) { .field { grid-template-columns: 1fr; } .field .num { padding: 0 0 1.2rem; } }
.input { width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; padding: 1.2rem 0; font-size: 2rem; line-height: 1.4;
  transition: border-color .3s; resize: none; outline: none; }
.input::placeholder { color: rgba(0,1,38,.32); }
.input:focus { border-bottom-color: var(--teal); }
.field.invalid .input:not(:valid), .field.invalid .input.bad { border-bottom-color: var(--error); }
.field .err { color: var(--error); font-size: 1.5rem; margin-top: .8rem; display: none; }
.field.invalid .err { display: block; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
.unit { position: relative; }
.unit .input { padding-right: 9rem; font-variant-numeric: tabular-nums; }
.unit span { position: absolute; right: 0; bottom: 1.4rem; color: var(--soft); font-size: 1.6rem; pointer-events: none; }
.impact-live { margin-top: 1.6rem; color: var(--soft); font-size: 1.6rem; min-height: 2.4rem; }
.impact-live b { color: var(--navy); font-weight: 700; }
.seg { display: inline-flex; padding: .4rem; border-radius: 100rem; background: var(--grey); gap: .4rem; margin-top: .8rem; }
.seg button { border: 0; background: transparent; padding: 1.2rem 3.2rem; border-radius: 100rem; font-size: 1.8rem; line-height: 1; transition: background-color .3s, color .3s; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.reveal-row { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.reveal-row > div { overflow: hidden; }
.reveal-row.open { grid-template-rows: 1fr; }
.reveal-row .input { margin-top: 1.6rem; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 4.8rem; flex-wrap: wrap; }
.actions small { color: var(--soft); font-size: 1.5rem; }
.form-error { color: var(--error); background: var(--error-bg); border-radius: .8rem; padding: 1.2rem 1.6rem; margin-top: 2.4rem; display: none; font-size: 1.6rem; }
.form-error.show { display: block; }
.hp { position: absolute; left: -9999px; }

/* confirmation */
.done { display: none; text-align: left; }
.sent .done { display: block; animation: rise .8s var(--ease-out) both; }
.sent #scopeForm, .sent .note, .sent .hero { display: none; }
.done .card { background: var(--navy); color: #fff; padding: 8rem 6.4rem 9.6rem; position: relative; overflow: hidden; }
@media (max-width: 768px) { .done .card { padding: 5.6rem 2.8rem 7.2rem; } }
.check { width: 9.6rem; height: 9.6rem; border-radius: 50%; background: var(--teal); display: grid; place-items: center; margin-bottom: 4rem; animation: pop .7s var(--ease-out) .1s both; }
.check svg { width: 4.4rem; height: 4.4rem; color: #fff; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .45s forwards; }
.done h2 { font-size: clamp(4rem, 2.8rem + 3vw, 6.4rem); margin-bottom: 2.4rem; }
.done p { color: rgba(255,255,255,.7); font-size: 2rem; max-width: 56rem; }
.done .stat { display: flex; gap: 4rem; margin: 4.8rem 0; flex-wrap: wrap; }
.done .stat div { border-left: 2px solid var(--teal); padding-left: 2rem; }
.done .stat b { display: block; font-size: 4.8rem; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.done .stat span { color: rgba(255,255,255,.6); font-size: 1.6rem; }
.done .btn { color: #fff; border-color: #fff; }
.done .shape { position: absolute; right: -6rem; bottom: -6rem; width: 32rem; height: 32rem; border-radius: 4rem; border: 2px solid var(--navy-700); transform: rotate(45deg); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } to { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(3.2rem); } to { opacity: 1; transform: none; } }
.enter > * { animation: rise .9s var(--ease-out) both; }
.enter > *:nth-child(2) { animation-delay: .08s; } .enter > *:nth-child(3) { animation-delay: .16s; } .enter > *:nth-child(4) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }
/* fixes */
.done .card > *:not(.shape) { position: relative; z-index: 1; }
.done .shape { z-index: 0; pointer-events: none; }
.btn .circle svg + svg { transform: translateX(-5rem); }
.btn:hover .circle svg:first-child { transform: translateX(5rem); }
.btn.big .circle svg + svg { transform: translateX(-7rem); }
.btn.big:hover .circle svg:first-child { transform: translateX(7rem); }
.btn:hover .circle svg + svg { transform: translateX(0); }
@media (max-width: 560px) { .unit .input { padding-right: 7.6rem; } .unit span { font-size: 1.4rem; } .duo { gap: 1.6rem; } }
