/* ============================================================
   NÖRDWYL — KANTONSSPITAL ORDNUNG
   Design System v1.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Fira+Code:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --inst-navy:     #253858;
  --prof-burgundy: #6C2E39;
  --ref-sage:      #5E6D54;
  --prac-cream:    #F5EFE3;
  --prof-paper:    #FAF5EA;
  --inst-gold:     #8E6F33;
  --prac-black:    #1D2025;
  --prof-grey:     #555A62;
  --rule-color:    #D4C9B5;
  --border-light:  #E8E0D0;

  --font-header: 'Libre Caslon Text', Georgia, serif;
  --font-body:   'Crimson Pro', 'Times New Roman', serif;
  --font-mono:   'Fira Code', 'Courier New', monospace;

  --max-width: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-gap: clamp(4rem, 8vw, 7rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: linear-gradient(160deg, var(--prac-cream) 0%, var(--prof-paper) 100%);
  background-attachment: fixed;
  color: var(--prac-black);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.72;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 700;
  line-height: 1.22;
  color: var(--inst-navy);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p { color: var(--prac-black); margin-bottom: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--prof-grey);
}
.mono-sm {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inst-gold);
}

/* ── Layout Utilities ── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-gap); }
.section + .section { border-top: 1px solid var(--rule-color); }

/* ── Section Reference (§ XX) ── */
.section-ref {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-ref::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-color);
}
.section-ref-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--inst-gold);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Institutional Closing Block ── */
.inst-closing {
  border-left: 3px solid var(--inst-gold);
  padding: 1.5rem 1.75rem;
  background: rgba(142, 111, 51, 0.05);
  margin-top: 2rem;
}
.inst-closing p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--prof-grey);
  font-style: italic;
}

/* ── Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 227, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule-color);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--inst-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--inst-navy);
  letter-spacing: 0.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prof-grey);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--inst-navy);
  border-bottom-color: var(--inst-navy);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-phone {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--prof-grey);
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: var(--inst-navy);
  color: #fff;
  border: 1px solid var(--inst-navy);
}
.nav-cta:hover {
  background: transparent;
  color: var(--inst-navy);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}
.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--inst-navy);
  width: 100%;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--prac-cream);
  border-top: 1px solid var(--rule-color);
  padding: 1.5rem var(--gutter);
  gap: 1rem;
}
.nav-mobile a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prof-grey);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule-color);
  display: block;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--inst-navy); }
.nav-mobile.open { display: flex; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.75rem;
  background: var(--inst-navy);
  color: #fff;
  border: 1px solid var(--inst-navy);
}
.btn-primary:hover {
  background: transparent;
  color: var(--inst-navy);
}
.btn-secondary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.75rem;
  background: transparent;
  color: var(--inst-navy);
  border: 1px solid var(--inst-navy);
}
.btn-secondary:hover {
  background: var(--inst-navy);
  color: #fff;
}
.btn-burgundy {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.75rem;
  background: var(--prof-burgundy);
  color: #fff;
  border: 1px solid var(--prof-burgundy);
}
.btn-burgundy:hover {
  background: transparent;
  color: var(--prof-burgundy);
}

/* ── Hero ── */
.hero {
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--rule-color);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--inst-gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--inst-gold);
}
.hero h1 { max-width: 720px; margin-bottom: 1.5rem; }
.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--prof-grey);
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-rule {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero-rule::before, .hero-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-color);
}
.hero-rule-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prof-grey);
  white-space: nowrap;
}

/* ── Cards ── */
.card {
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--border-light);
  padding: 2rem;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--inst-gold);
  margin-bottom: 0.75rem;
  display: block;
}
.card h3 { margin-bottom: 0.75rem; }
.card p { font-size: 1rem; color: var(--prof-grey); line-height: 1.65; }

/* ── Service Cards ── */
.service-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--inst-navy);
  padding: 2.25rem 2rem;
}
.service-card.burgundy { border-top-color: var(--prof-burgundy); }
.service-card.sage { border-top-color: var(--ref-sage); }
.service-price {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--inst-gold);
  margin-bottom: 0.5rem;
  display: block;
}
.service-card h3 { margin-bottom: 1rem; }
.service-card p { font-size: 1rem; color: var(--prof-grey); line-height: 1.65; margin-bottom: 1.5rem; }
.service-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--prof-grey);
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-color);
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1.5rem; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border: 1px solid var(--rule-color);
  background: rgba(255,255,255,0.35);
}
.stat-item {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--rule-color);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-header);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--inst-navy);
  line-height: 1;
  margin-bottom: 0.35rem;
  display: block;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prof-grey);
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prof-grey);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--inst-navy);
  background: rgba(37, 56, 88, 0.04);
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule-color);
  color: var(--prac-black);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(37,56,88,0.03); }
.check { color: var(--ref-sage); font-size: 1rem; }
.dash { color: var(--rule-color); }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--rule-color);
}
.faq-item:first-child { border-top: 1px solid var(--rule-color); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-header);
  font-size: 1.05rem;
  color: var(--inst-navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--inst-gold);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-body {
  padding-bottom: 1.25rem;
  color: var(--prof-grey);
  font-size: 1rem;
  line-height: 1.72;
  max-width: 720px;
}

/* ── Form ── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prof-grey);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border-light);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--prac-black);
  outline: none;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--inst-navy);
  background: rgba(255,255,255,0.8);
}
.form-textarea { min-height: 130px; resize: vertical; }

/* ── CTA Block ── */
.cta-block {
  background: var(--inst-navy);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  text-align: center;
}
.cta-block h2 { color: #fff; margin-bottom: 1rem; }
.cta-block p { color: rgba(255,255,255,0.72); font-size: 1.1rem; margin-bottom: 2rem; max-width: 600px; margin-inline: auto; }
.cta-block .btn-primary {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.cta-block .btn-primary:hover {
  background: #fff;
  color: var(--inst-navy);
}

/* ── Footer ── */
.site-footer {
  background: var(--prac-black);
  color: rgba(255,255,255,0.65);
  padding-block: 3rem 2rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 2rem;
}
.footer-brand .nav-logo-mark {
  background: rgba(255,255,255,0.12);
  margin-bottom: 1rem;
}
.footer-brand .nav-logo-text { color: #fff; }
.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-top: 0.75rem;
  color: rgba(255,255,255,0.5);
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
  display: block;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
}
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.footer-legal a:hover { color: rgba(255,255,255,0.6); }

/* ── Testimonial Cards ── */
.testimonial-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border-light);
  padding: 1.75rem;
}
.testimonial-stars { color: var(--inst-gold); font-size: 0.8rem; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.testimonial-quote { font-size: 0.975rem; color: var(--prof-grey); line-height: 1.65; font-style: italic; margin-bottom: 1.25rem; }
.testimonial-meta { border-top: 1px solid var(--rule-color); padding-top: 1rem; }
.testimonial-initials {
  width: 32px; height: 32px;
  background: var(--inst-navy);
  color: #fff;
  font-family: var(--font-header);
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
}
.testimonial-name { font-family: var(--font-header); font-size: 0.9rem; color: var(--inst-navy); }
.testimonial-role { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--prof-grey); }

/* ── Process Steps ── */
.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule-color);
}
.process-step:last-child { border-bottom: none; }
.process-num {
  font-family: var(--font-header);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rule-color);
  line-height: 1;
  padding-top: 0.2rem;
}
.process-content h4 { color: var(--inst-navy); margin-bottom: 0.5rem; }
.process-content p { font-size: 0.975rem; color: var(--prof-grey); }

/* ── Team ── */
.team-card { text-align: left; }
.team-avatar {
  width: 72px; height: 72px;
  background: var(--inst-navy);
  color: #fff;
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.team-name { font-family: var(--font-header); font-size: 1.1rem; color: var(--inst-navy); margin-bottom: 0.25rem; }
.team-title { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--inst-gold); margin-bottom: 0.75rem; }
.team-bio { font-size: 0.95rem; color: var(--prof-grey); line-height: 1.65; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--prac-black);
  color: rgba(255,255,255,0.75);
  padding: 1.25rem var(--gutter);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.cookie-text { font-size: 0.875rem; flex: 1; min-width: 240px; }
.cookie-text a { color: rgba(255,255,255,0.55); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-accept {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: var(--inst-gold);
  color: #fff;
  border: none;
  cursor: pointer;
}
.cookie-decline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
}
.cookie-banner.hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links, .nav-phone { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid var(--rule-color); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--rule-color); border-right: none; }
  .process-step { grid-template-columns: 52px 1fr; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
