/* ferita.ro — precision engineering / stainless steel flue systems */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --panel: #ffffff;
  --fg: #14171c;
  --muted: #5d6470;
  --line: #e2e5ea;
  --line-strong: #cfd4dc;
  --accent: #1f6f5c;
  --accent-fg: #ffffff;
  --accent-soft: #e7f2ee;
  --steel: #8d95a1;
  --shadow: 0 1px 2px rgba(16, 20, 28, .05), 0 8px 24px rgba(16, 20, 28, .06);
  --radius: 10px;
  --wrap: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --bg-alt: #14171d;
    --panel: #171b22;
    --fg: #e8eaef;
    --muted: #969ead;
    --line: #242932;
    --line-strong: #333a45;
    --accent: #6ec5ab;
    --accent-fg: #0b1512;
    --accent-soft: #16302a;
    --steel: #7c8593;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-fg);
  padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ── buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .7rem 1.25rem;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .05s ease;
}
.btn:hover { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-sm { padding: .45rem .85rem; font-size: .875rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── header ───────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.brand-tld { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-size: .9375rem; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }
.site-nav a.btn { color: var(--accent-fg); }
.site-nav a.btn:hover { color: var(--accent-fg); }

@media (max-width: 860px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ── hero ─────────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.hero-inner { padding: 4.5rem 1.5rem 3.5rem; }
.hero-copy { max-width: 46rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .1em; font-size: .75rem;
  font-weight: 700; color: var(--accent); margin-bottom: .9rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.15rem); margin-bottom: 1.1rem; }
.lede { font-size: 1.0625rem; color: var(--muted); max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.hero-stats {
  list-style: none; margin: 3rem 0 0; padding: 0;
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(4, 1fr);
}
.hero-stats li { background: var(--bg); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-n { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-u { font-size: .875rem; font-weight: 600; color: var(--muted); margin-left: .1em; }
.stat-l { font-size: .8125rem; color: var(--muted); }
@media (max-width: 780px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── sections ─────────────────────────────────────────────────── */
section { padding: 4rem 0; }
.hero { padding: 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-h { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .6rem; }
.section-sub { color: var(--muted); max-width: 44rem; margin-bottom: 2.25rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .9375rem; }

/* ── configurator ─────────────────────────────────────────────── */
.cfg { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .cfg { grid-template-columns: 1fr; } }

.cfg-viewport {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 520px;
}
#viewer { display: block; width: 100%; height: 520px; touch-action: none; }
.viewer-hint {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .5rem .9rem; font-size: .75rem; color: var(--muted);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border-top: 1px solid var(--line);
}
.viewer-fallback { padding: 2rem; color: var(--muted); }

.cfg-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.5rem;
}
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .85rem; }
legend { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 0; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field-l { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .875rem; font-weight: 600; }
.field-l output { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.field-help { font-size: .8125rem; color: var(--muted); }

input[type="range"] { width: 100%; accent-color: var(--accent); }

input[type="text"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: .9375rem;
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: .6rem .7rem;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, .dropzone:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* segmented radio group */
.segmented { display: flex; gap: .4rem; flex-wrap: wrap; }
.segmented-col { flex-direction: column; }
.segmented label {
  flex: 1 1 auto; display: flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: .5rem .7rem; font-size: .875rem; cursor: pointer;
  background: var(--bg); justify-content: center;
}
.segmented-col label { justify-content: flex-start; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented label:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent); font-weight: 600;
}
.tag {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0 .4rem; font-weight: 600;
}

/* quote boxes */
.quote, .estimate {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); padding: 1.15rem;
}
.estimate { background: var(--bg); }
.quote-h { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: .75rem; }
.quote-lines { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.quote-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; }
.quote-lines .q-label { color: var(--muted); }
.quote-lines .q-val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.quote-total {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line-strong); padding-top: .7rem;
  font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums;
}
.quote-note { font-size: .75rem; color: var(--muted); margin-top: .5rem; }

/* ── form modules ─────────────────────────────────────────────── */
.module {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.checks { flex-direction: row; flex-wrap: wrap; gap: .5rem; align-items: center; }
.checks legend { width: 100%; }
.check {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .4rem .8rem; font-size: .875rem; cursor: pointer;
}
.check input { accent-color: var(--accent); }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.radios { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.radios legend { grid-column: 1 / -1; }
@media (max-width: 720px) { .radios { grid-template-columns: 1fr; } }
.radio-card {
  display: flex; gap: .6rem; align-items: flex-start;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .85rem 1rem; cursor: pointer; background: var(--bg);
}
.radio-card input { margin-top: .25rem; accent-color: var(--accent); }
.rc-body { display: flex; flex-direction: column; gap: .15rem; font-size: .9375rem; }
.rc-body small { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* dropzone */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  padding: 2.25rem 1.5rem; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  color: var(--muted); background: var(--bg);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { width: 34px; height: 34px; color: var(--steel); margin-bottom: .3rem; }
.dropzone.is-over .dz-icon { color: var(--accent); }
.dz-title { font-weight: 600; color: var(--fg); }
.dz-sub { font-size: .8125rem; }

.filelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.filelist li {
  display: flex; align-items: center; gap: .6rem; font-size: .875rem;
  border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; background: var(--bg);
}
.filelist .f-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .f-size { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8125rem; }
.filelist .f-del {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 0 .2rem;
}
.filelist .f-del:hover { color: var(--fg); }
.filelist .f-bad { color: #c0392b; font-size: .8125rem; }

.module-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { font-size: .875rem; color: var(--muted); }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #c0392b; font-weight: 600; }

/* ── footer ───────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 2.25rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: baseline; justify-content: space-between; }
.footer-note { color: var(--muted); font-size: .875rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
