/* Nouă picături într-un secol · Site Style */
:root {
  --bg: #0b0d11;
  --bg-card: #12161f;
  --bg-card-hover: #181d28;
  --bg-glass: rgba(18, 22, 31, 0.75);
  --border: #232a36;
  --border-highlight: #3b4657;
  --text: #e1e4ea;
  --text-muted: #8d98a8;
  --text-faint: #596373;
  --brass: #c99a57;
  --brass-light: #e5b97d;
  --brass-glow: rgba(201, 154, 87, 0.2);
  --amber: #df7a28;
  --amber-glow: rgba(223, 122, 40, 0.25);
  --pitch: #08090b;
  --glass-refract: #4a758c;
  --font-serif: "Newsreader", "Charter", "Bitstream Charter", "Sitka Text", "Cambria", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #161b24 0%, #0b0d11 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--brass);
  color: #0b0d11;
  font-weight: 600;
  z-index: 9999;
  border-radius: 4px;
  clip: auto;
}

/* Layout shells */
.shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.shell-wide {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--brass-light);
}

.langsw {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.langsw a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.langsw a:hover {
  color: var(--brass-light);
}

.langsw a[aria-current="page"] {
  color: var(--brass);
  font-weight: 600;
  background: rgba(201, 154, 87, 0.12);
}

/* Typography & Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass);
  margin-bottom: 1.25rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.standfirst {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto 3rem;
  font-weight: 400;
}

/* Ledger Line (Stat Cards) */
.ledgerline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-box:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.stat-box .n {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--brass-light);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-box .l {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Section styling */
section {
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--brass-light);
  margin-bottom: 0.75rem;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #c9d0dc;
  margin-bottom: 2.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* The Funnel & Droplet Rheometer */
.instrument-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.instrument-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 820px) {
  .instrument-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #151a24 0%, #0c0e14 100%);
  border: 1px solid #2a3342;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}

canvas#funnelCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.instrument-controls {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ctrl-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ctrl-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.ctrl-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brass-light);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #202734;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid #0b0d11;
  box-shadow: 0 0 10px var(--brass-glow);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--brass-light);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--brass);
}

.readout-card {
  background: rgba(11, 13, 17, 0.7);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.readout-card .r-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.readout-card .r-status {
  font-size: 1.125rem;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.readout-card .r-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 99-Year Chronograph / Timeline */
.timeline-strip {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2.5rem 0;
}

.drop-entry {
  display: grid;
  grid-template-columns: 80px 140px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (max-width: 700px) {
  .drop-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.drop-entry:hover, .drop-entry.active {
  border-color: var(--brass);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.drop-entry .d-num {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brass-light);
}

.drop-entry .d-date {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
}

.drop-entry .d-info {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.drop-entry .d-duration {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: rgba(201, 154, 87, 0.1);
  color: var(--brass);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* Viscosity Scale Table */
.viscosity-table-wrap {
  overflow-x: auto;
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.viscosity-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

.viscosity-table th,
.viscosity-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.viscosity-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.viscosity-table tr:last-child td {
  border-bottom: none;
}

.viscosity-table tr.highlight-pitch {
  background: rgba(201, 154, 87, 0.08);
}

.viscosity-table tr.highlight-pitch td {
  color: #ffffff;
  font-weight: 500;
}

.viscosity-table .fluid-name {
  font-weight: 500;
  color: #ffffff;
}

.viscosity-table .val-mono {
  font-family: var(--font-mono);
  color: var(--brass-light);
}

/* Personal Pitch Calculator */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 2.5rem 0;
  text-align: center;
}

.calc-inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0 2rem;
  flex-wrap: wrap;
}

.calc-inputs label {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--text);
}

.calc-inputs input[type="number"] {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  background: #0b0d11;
  border: 1px solid var(--border-highlight);
  border-radius: 6px;
  color: var(--brass-light);
  width: 120px;
  text-align: center;
  outline: none;
}

.calc-inputs input[type="number"]:focus {
  border-color: var(--brass);
  box-shadow: 0 0 10px var(--brass-glow);
}

.calc-result-box {
  background: rgba(11, 13, 17, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  max-width: 620px;
  margin: 0 auto;
}

.calc-result-box .c-num {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--brass-light);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.calc-result-box .c-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Method / Sources Note */
.method-note {
  border-left: 3px solid var(--brass);
  padding: 1.25rem 1.5rem;
  background: rgba(201, 154, 87, 0.05);
  border-radius: 0 6px 6px 0;
  margin: 2rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.method-note h4 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-light);
  margin-bottom: 0.5rem;
}

/* Back to top button */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  transition: all 0.2s ease;
  margin-top: 2rem;
}

.back-to-top:hover {
  color: var(--brass-light);
  border-color: var(--brass);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--text-faint);
  text-align: center;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--brass-light);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
