:root {
  --ink: #15191d;
  --muted: #646d75;
  --line: #dfe4e8;
  --surface: #ffffff;
  --soft: #f4f7f8;
  --accent: #ED1C24;
  --accent-dark: #650105;
  --amber: #d8a545;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  /* background: var(--ink); */
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0;
  padding: 7px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.language-toggle {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
  padding: clamp(44px, 8vw, 112px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    url("https://www.fischerengineering.at/wp-content/uploads/2025/01/logFlow-1.jpg") center/cover;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.hero-copy p:last-child,
.section-head p,
.formula-layout p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-metrics,
.calculator-shell,
.formula-layout {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(21, 25, 29, 0.08);
}

.hero-metrics {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.hero-metrics div,
.result-grid div {
  background: var(--surface);
  padding: 26px;
}

.hero-metrics span,
.result-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-metrics strong,
.result-grid strong {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
}

.calculator-band,
.formula-band {
  padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 72px);
}

.calculator-band {
  background: var(--soft);
}

.section-head {
  margin-bottom: 32px;
}

.calculator-shell {
  padding: clamp(18px, 3vw, 34px);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon-button,
.ghost-button,
.remove-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  min-height: 42px;
}

.icon-button {
  width: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.ghost-button {
  padding: 0 18px;
  font-weight: 800;
}

.remove-button {
  width: 36px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.remove-button:hover {
  color: #a33b2b;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f9fbfb;
  font-size: 0.82rem;
  text-transform: uppercase;
}

td.result-cell {
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 1px;
}

.custom-density {
  margin-top: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

.formula-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
}

code {
  display: block;
  padding: 22px;
  overflow-x: auto;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding: 34px clamp(20px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .site-header,
  nav,
  footer {
    align-items: flex-start;
  }

  .site-header,
  .hero,
  .formula-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    flex-direction: column;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 3.2rem;
  }
}
