/* ============================================================
   ElektroÚspora — design system
   Distinctive, professional B2B energy palette (forest green +
   warm amber), Manrope / Space Grotesk. Built for trust & clarity.
   ============================================================ */

:root {
  --ink: #0e1b16;
  --ink-2: #38473f;
  --muted: #5c6b63;
  --line: #e3eae5;
  --bg: #ffffff;
  --bg-soft: #f3f8f4;
  --bg-deep: #0e2a20;

  --brand: #0f7a5a;
  --brand-700: #0a5a41;
  --brand-50: #e7f3ed;
  --accent: #d9882a;
  --accent-50: #fbf0df;
  --danger: #b3261e;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(14, 27, 22, .06), 0 1px 3px rgba(14, 27, 22, .05);
  --shadow: 0 8px 30px rgba(14, 27, 22, .08);
  --shadow-lg: 0 24px 60px rgba(14, 27, 22, .14);

  --font: "Manrope", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --maxw: 1140px;
  --space: clamp(3rem, 6vw, 5.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: .15em 0 .25em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 .4em; font-weight: 700; }
h3 { font-size: 1.18rem; margin: 0 0 .4em; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--brand-700); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.hl { color: var(--brand); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .76rem;
  font-weight: 700; color: var(--brand-700); margin: 0 0 .4rem;
}

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

/* ---------- Header ---------- */
.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); display: inline-flex; align-items: center; gap: .35rem; }
.brand strong { color: var(--brand-700); font-weight: 700; }
.brand-mark { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a:not(.btn) { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--brand-700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font); font-weight: 700; font-size: .98rem; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(15, 122, 90, .25); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn.full { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 2.5rem; background:
  radial-gradient(1200px 500px at 80% -10%, var(--brand-50), transparent 60%),
  linear-gradient(180deg, #fbfdfb, #ffffff); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 46ch; }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 1.1rem; }
.trust-microcopy { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.trust-microcopy li { white-space: nowrap; }

.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.4rem 1.5rem; position: relative;
}
.hc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.hc-tag { font-weight: 700; color: var(--brand-700); font-size: .9rem; }
.hc-illu { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-soft); padding: .2rem .5rem; border-radius: 999px; }
.hc-total { display: flex; flex-direction: column; padding: .6rem 0 1rem; border-bottom: 1px solid var(--line); }
.hc-total span { color: var(--muted); font-size: .9rem; }
.hc-total strong { font-family: var(--font-display); font-size: 2.4rem; color: var(--brand-700); }
.hc-list { list-style: none; padding: .8rem 0 0; margin: 0; }
.hc-list li { display: flex; justify-content: space-between; padding: .4rem 0; color: var(--ink-2); }
.hc-list b { color: var(--ink); }
.hc-foot { margin: .8rem 0 0; font-size: .78rem; color: var(--muted); }

/* Sources strip */
.sources-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.ss-label { font-weight: 700; color: var(--ink-2); font-size: .88rem; margin-right: .3rem; }
.chip { font-size: .8rem; font-weight: 600; color: var(--brand-700); background: var(--brand-50); border: 1px solid #d4e8de; padding: .32rem .7rem; border-radius: 999px; }

/* ---------- Bands & sections ---------- */
.band { padding: var(--space) 0; }
.band-alt { background: var(--bg-soft); }
.band-calc { background: linear-gradient(180deg, #fff, var(--bg-soft)); }
.band-cta { background: radial-gradient(900px 400px at 50% -20%, var(--brand-50), transparent 60%), var(--bg-soft); }
.section-head { max-width: 60ch; margin: 0 auto 2rem; text-align: center; }
.section-head.center { text-align: center; }
.section-head .muted { font-size: 1.05rem; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.1rem; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.card.lever h3, .card.trust h3 { color: var(--brand-700); }
.card.lever p, .card.trust p { color: var(--ink-2); margin: 0; font-size: .96rem; }

.stat-card .stat { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: .4rem; }
.stat-card p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.4rem; box-shadow: var(--shadow-sm); position: relative; }
.step-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: .8rem; }
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--ink-2); margin: 0; font-size: .96rem; }

/* Pricing */
.pricing .price { display: flex; flex-direction: column; position: relative; }
.price .price-tag { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--brand-700); margin: .2rem 0; }
.price .price-sub { color: var(--ink-2); font-size: .95rem; min-height: 3.2em; }
.price.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.ribbon { position: absolute; top: -12px; right: 16px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; letter-spacing: .03em; }
.ticks { list-style: none; padding: 0; margin: .6rem 0 1.2rem; flex: 1; }
.ticks li { padding: .35rem 0 .35rem 1.6rem; position: relative; color: var(--ink-2); font-size: .94rem; border-bottom: 1px dashed var(--line); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }

/* Security grid */
.security-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.security-grid li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .25rem; box-shadow: var(--shadow-sm); }
.security-grid strong { color: var(--brand-700); }
.security-grid span { color: var(--ink-2); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; font-family: var(--font-display); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; font-weight: 700; transition: transform .15s ease; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 1.2rem 1.1rem; margin: 0; color: var(--ink-2); }

/* ---------- Calculator / Forms ---------- */
.calc-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.2rem, 3vw, 2rem); }
.upload-box { border: 1.5px dashed var(--brand); background: var(--brand-50); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; }
.ub-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.ub-head strong { color: var(--brand-700); font-family: var(--font-display); }
.badge { font-size: .72rem; font-weight: 700; color: var(--brand-700); background: #fff; border: 1px solid #d4e8de; padding: .2rem .55rem; border-radius: 999px; }
.ub-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .5rem; }
.ingest-status { margin: .6rem 0 0; font-size: .9rem; }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-form.card-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.2rem, 3vw, 2rem); }
.grid-form label { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; gap: .35rem; color: var(--ink-2); }
.grid-form .full { grid-column: 1 / -1; }
.grid-form input, .grid-form select, .grid-form textarea {
  padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-weight: 500; color: var(--ink); background: #fff;
}
.grid-form input:hover, .grid-form select:hover { border-color: #cfdcd5; }
.grid-form input:focus, .grid-form select:focus, .grid-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.grid-form input:invalid:not(:placeholder-shown) { border-color: #e3b7b4; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.consent { margin: 0; }

/* ---------- Result ---------- */
.result { margin-top: 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.result .total { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--brand-700); }
.result .source-line { margin: .3rem 0 1rem; font-size: .9rem; }
.result .source-line.proxy { color: var(--accent); font-weight: 600; }
.rec { padding: .9rem 0; border-top: 1px solid var(--line); }
.rec:first-of-type { border-top: 0; }
.rec-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.rec-head strong { font-family: var(--font-display); }
.rec .amt { font-weight: 800; color: var(--brand-700); white-space: nowrap; }
.rec .flag strong { color: var(--accent); }
.rec small { color: var(--muted); display: block; margin-top: .2rem; }
.result .next { margin-top: 1.4rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.assumptions { margin-top: 1rem; }
.assumptions summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.assumptions ul { font-size: .84rem; color: var(--muted); margin: .5rem 0 0; padding-left: 1.1rem; }
.ok { color: var(--brand-700); font-weight: 700; }
.err { color: var(--danger); font-weight: 700; }

/* ---------- Footer ---------- */
.site-foot { background: var(--bg-deep); color: #cfe3da; padding: 2.6rem 0; margin-top: 1rem; }
.site-foot .brand, .site-foot .brand strong { color: #fff; }
.site-foot .brand-mark { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.6rem; }
.foot-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 .4rem; }
.site-foot .muted { color: #9db8ac; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 80; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .cards.three, .cards.two, .steps, .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
  .grid-form { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 940px) {
  .cards.three, .security-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Print: clean "save as PDF" of the savings result ---------- */
@media print {
  :root { --shadow: none; --shadow-sm: none; --shadow-lg: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site, .nav, .toast, .upload-box, .cta-row, .trust-microcopy,
  .band-cta, .site-foot, #calc-form .form-actions, .result .next { display: none !important; }
  body { background: #fff; }
  .band, .hero { padding: 12px 0; }
  .calc-shell, .result, .card, .hero-card { box-shadow: none; border: 1px solid #ccc; }
  a[href]::after { content: ""; }
}
