/* RetroEstate Green Score, product concept by OSquare Studio */
:root {
  --ink: #0f2a22;
  --ink-soft: #3f564e;
  --mist: #eef2ea;
  --white: #ffffff;
  --line: #d4dccf;
  --lime: #c6f24e;
  --a: #1e8e4a; --b: #5bb03a; --c: #b3cb2a; --d: #efcf1a; --e: #f5a21b; --f: #ea6a1e; --g: #d5332a;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--mist); }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--a); outline-offset: 2px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.9rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.015em; line-height: 1.2; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s, background-color .2s; }
.btn:active { transform: scale(.98); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1c4034; }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #d6fb6e; }
.textlink { font-weight: 500; text-underline-offset: 5px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(238, 242, 234, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.top__nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.top__nav a { text-decoration: none; font-weight: 500; }
.top__nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.top .btn { min-height: 44px; padding: 0 20px; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 110px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero__copy { padding-top: clamp(0px, 3vw, 40px); }
.lede { margin-top: 24px; font-size: 1.2rem; max-width: 34em; color: var(--ink-soft); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.try { margin-top: clamp(28px, 5vw, 64px); padding-left: 16px; border-left: 4px solid var(--e); font-weight: 500; max-width: 26em; }

/* Scorecard */
.scorecard { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 2.4vw, 30px); box-shadow: 0 30px 60px -40px rgba(15, 42, 34, .45); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; background: var(--mist); border-radius: 14px; }
.tab { min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-weight: 500; font-size: 0.92rem; line-height: 1.2; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab:not([aria-selected="true"]):hover { background: #dfe6d9; }

.scorecard__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-top: 22px; }
.scorecard__head h2 { font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.15; }
.scorecard__head p { color: var(--ink-soft); font-size: 0.94rem; margin-top: 3px; }
.sample { flex: none; font-size: 0.78rem; padding: 3px 10px; border: 1px dashed #9aa894; border-radius: 999px; color: var(--ink-soft); }

.scorecard__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .8fr); gap: 20px 32px; align-items: center; margin-top: 18px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.score__label { font-size: 0.9rem; color: var(--ink-soft); }
.score__num { font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 6.4vw, 5.6rem); line-height: 0.9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score__to { font-size: 0.34em; letter-spacing: -0.02em; color: var(--ink-soft); font-weight: 600; margin-left: 6px; }
.score__to b { color: var(--a); font-size: 1.5em; }
.score__band { margin-top: 10px; font-weight: 600; }

.bands { display: grid; gap: 4px; }
.bands li { --len: 50%; display: flex; align-items: center; height: 24px; width: var(--len); padding-left: 10px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 0.86rem; background: var(--col); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); opacity: .28; transition: opacity .3s, transform .3s; position: relative; }
.bands li.is-now { opacity: 1; }
.bands li.is-next { opacity: 1; outline-offset: 0; }
.bands li span { margin-left: auto; margin-right: 18px; font-family: var(--sans); font-weight: 600; font-size: 0.74rem; white-space: nowrap; }
.bands li.dark-text { color: var(--ink); }

.cats { display: grid; gap: 10px; margin-top: 20px; }
.cat { display: grid; grid-template-columns: 150px 1fr 54px; align-items: center; gap: 12px; font-size: 0.94rem; }
.cat dt { color: var(--ink-soft); }
.cat dd { margin: 0; }
.cat__track { height: 10px; background: var(--mist); border-radius: 999px; position: relative; overflow: hidden; }
.cat__fill, .cat__gain { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.cat__gain { background: repeating-linear-gradient(135deg, var(--a) 0 4px, #7cc79a 4px 8px); }
.cat__fill { background: var(--ink); }
.cat__val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.retro { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.retro legend { padding: 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; }
.measure-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background-color .2s, border-color .2s; }
.measure-row + .measure-row { margin-top: 8px; }
.measure-row:hover { border-color: #9aa894; }
.measure-row:has(input:checked) { background: #eaf6ee; border-color: var(--a); }
.measure-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--a); }
.measure-row b { font-weight: 600; line-height: 1.3; }
.measure-row small { grid-column: 2; color: var(--ink-soft); font-size: 0.86rem; }
.measure-row em { font-style: normal; font-weight: 700; color: var(--a); white-space: nowrap; font-variant-numeric: tabular-nums; }

.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--ink); color: #fff; }
.totals div { display: grid; gap: 2px; }
.totals span { font-size: 0.8rem; color: #b7c8bf; }
.totals b { font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.totals p { grid-column: 1 / -1; color: #d5e2da; font-size: 0.94rem; }

.cat__val small { margin-left: 4px; color: var(--a); font-size: .76rem; font-weight: 700; }
.score__to b { transition: color .4s; }

/* Full plan buttons */
.plan { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.btn--plan { min-height: 44px; padding: 0 20px; background: var(--a); color: #fff; box-shadow: 0 10px 24px -12px rgba(30,142,74,.8); }
.btn--plan:hover { background: #187a3e; }
.btn--plan:disabled { opacity: .45; cursor: default; box-shadow: none; }
.plan__clear { border: 0; background: none; padding: 8px 4px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: var(--ink-soft); }

/* Benchmark against peers */
.bench { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #fbfcf9, #f2f6ee); }
.bench__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.bench__head h3 { font-size: 1.05rem; }
.bench__head p { color: var(--ink-soft); font-size: .82rem; }
.bench__chart svg { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.bench__bar { transform-box: fill-box; transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 18ms); opacity: .85; }
@keyframes grow { from { transform: scaleY(0); } }
.bench__base { stroke: var(--line); }
.bench__tick { fill: var(--ink-soft); font: 10px var(--sans); }
.bench__pin { transition: transform .9s cubic-bezier(.3,1.3,.5,1), opacity .4s; }
.bench__pin line { stroke-width: 2; }
.bench__pin--now line { stroke: var(--ink); stroke-dasharray: 3 3; }
.bench__pin--now circle { fill: var(--ink); }
.bench__pin--next line { stroke: var(--a); }
.bench__pin--next circle { fill: var(--a); stroke: #fff; stroke-width: 2; }
.bench__pin.is-off { opacity: 0; }
.bench__rank { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bench__rank div { display: grid; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.bench__rank span { font-size: .78rem; color: var(--ink-soft); }
.bench__rank b { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bench__rank b::before { content: "#"; font-size: .6em; margin-right: 1px; color: var(--ink-soft); }
.bench__rank small { color: var(--ink-soft); font-size: .8rem; }
.bench__rank .is-after { transition: background-color .4s, border-color .4s; }
.bench__rank .is-after.is-on { background: #eaf6ee; border-color: var(--a); }
.bench__rank .is-after.is-on b, .bench__rank .is-after.is-on small { color: #136436; }

/* How */
.how { background: var(--white); padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(32px, 4vw, 56px); }
.steps li { counter-increment: step; padding-top: 22px; border-top: 6px solid var(--col, var(--e)); }
.steps li:nth-child(1) { --col: var(--e); }
.steps li:nth-child(2) { --col: var(--c); }
.steps li:nth-child(3) { --col: var(--a); }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 700; font-size: 3.2rem; line-height: 1; letter-spacing: -0.04em; margin-bottom: 14px; }
.steps p { margin-top: 10px; color: var(--ink-soft); max-width: 32em; }

/* Measure */
.measure { padding: clamp(64px, 8vw, 120px) 0; }
.measure__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px 80px; align-items: start; }
.measure__grid p { margin-top: 20px; color: var(--ink-soft); max-width: 30em; }
.weights li { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.weights li:first-child { border-top: 1px solid var(--line); }
.weights span { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.weights b { font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.weights i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ink) calc(var(--w) * 3.33%), #dfe6d9 0); }
.weights small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.92rem; }

/* Standards */
.standards { background: var(--ink); color: #fff; padding: clamp(64px, 8vw, 120px) 0; }
.standards__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 80px; align-items: end; }
.standards__head p { color: #c4d3cb; }
.std { width: 100%; border-collapse: collapse; margin-top: clamp(32px, 4vw, 56px); }
.std th, .std td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid rgba(255,255,255,.18); vertical-align: top; font-weight: 400; }
.std thead th { font-size: 0.86rem; color: #9fb3aa; padding-bottom: 10px; }
.std tbody th { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--lime); white-space: nowrap; }
.std td:last-child { color: #c4d3cb; }

/* Who */
.who { padding: clamp(64px, 8vw, 120px) 0; }
.who__grid { display: grid; grid-template-columns: 1.25fr 1fr 1.1fr; gap: 20px; margin-top: clamp(28px, 4vw, 48px); align-items: start; }
.who article { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 2.4vw, 32px); }
.who article p { margin-top: 10px; color: var(--ink-soft); }
.band { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: 3px 14px 3px 9px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 0.9rem; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); white-space: nowrap; }
.band--a { background: var(--a); } .band--b { background: var(--b); } .band--c { background: var(--c); color: var(--ink); } .band--d { background: var(--d); color: var(--ink); } .band--e { background: var(--e); color: var(--ink); }
.portfolio { margin-top: 20px; border-top: 1px solid var(--line); font-size: 0.94rem; }
.portfolio div { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.portfolio div b:last-child { position: relative; }
.portfolio .pf__head { color: var(--ink-soft); font-size: .78rem; padding: 8px 0 6px; }
.portfolio .pf__head span:not(:first-child) { min-width: 58px; text-align: center; }
.badge { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.badge span { display: grid; font-weight: 600; }
.badge small { font-weight: 400; color: var(--ink-soft); }

/* Demo */
.demo { background: var(--ink); color: #fff; padding: clamp(64px, 8vw, 120px) 0; }
.demo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 80px; align-items: start; }
.demo__grid p { margin-top: 20px; color: #c4d3cb; max-width: 34em; }
.demo .origin { padding-left: 16px; border-left: 4px solid var(--lime); color: #fff; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 0.92rem; color: #c4d3cb; }
.form input, .form select { min-height: 50px; padding: 0 14px; border-radius: 10px; border: 1px solid #456359; background: #173c31; color: #fff; font-size: 1rem; width: 100%; }
.form input:focus, .form select:focus { outline: none; border-color: var(--lime); }
.form .is-invalid { border-color: #ff8a80; }
.form .btn { justify-self: start; margin-top: 4px; }
.form__status { margin: 0; padding: 12px 14px; border-radius: 10px; background: #173c31; border-left: 4px solid var(--lime); }
.form__status.is-error { border-left-color: #ff8a80; }

.foot { background: var(--ink); color: #9fb3aa; font-size: 0.84rem; border-top: 1px solid rgba(255,255,255,.14); }
.foot__in { padding-top: 22px; padding-bottom: 28px; }
.foot p { max-width: 70em; }

/* Responsive */
@media (max-width: 1020px) {
  .hero__grid, .measure__grid, .standards__head, .demo__grid { grid-template-columns: 1fr; }
  .who__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .top__nav { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .scorecard { border-radius: 16px; }
  .scorecard__main { grid-template-columns: 1fr; }
  .cat { grid-template-columns: 104px 1fr 48px; gap: 8px; font-size: 0.86rem; }
  .totals { grid-template-columns: 1fr 1fr; }
  .tab { font-size: 0.84rem; }
  .std thead { display: none; }
  .std tr { display: grid; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .std th, .std td { padding: 2px 0; border: 0; }
  .measure-row { grid-template-columns: 22px 1fr; }
  .measure-row em { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cat__fill, .cat__gain, .bands li, .bench__pin { transition: none; }
  .bench__bar { animation: none; }
}
