/* ============================================================
   Gynäkologische Praxis Dr. Irina Öttl-Mancenko
   Design system: "clinical minimalism" —
   porcelain ground, mulberry accent, Newsreader + Hanken Grotesk
   ============================================================ */

/* ---------- Self-hosted fonts (GDPR: no third-party requests) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-italic-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens: light (default) ---------- */
:root {
  color-scheme: light;

  --bg: #fbf9fa;
  --surface: #ffffff;
  --ink: #231a20;
  --muted: #6b5c65;
  --line: #e8dfe5;
  --accent: #7a3a62;
  --accent-deep: #5d2a4a;
  --accent-soft: #f4e9f0;
  --header-bg: rgba(251, 249, 250, 0.88);

  --icon-sun: none;   /* theme-toggle icon visibility, driven by theme state */
  --icon-moon: inline-block;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --fs-display: clamp(2.5rem, 5.5vw, 4.25rem);
  --fs-h2: clamp(1.75rem, 3vw, 2.375rem);
  --fs-h3: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.8125rem;

  --measure: 62ch;
  --wrap: 66rem;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7rem);
}

/* ---------- Tokens: dark via OS preference (unless light chosen) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171115;
    --surface: #1f181d;
    --ink: #f1e9ee;
    --muted: #b0a0aa;
    --line: #372b33;
    --accent: #d9a6c4;
    --accent-deep: #e7c3d8;
    --accent-soft: #2c2027;
    --header-bg: rgba(23, 17, 21, 0.88);
    --icon-sun: inline-block;
    --icon-moon: none;
  }
}

/* ---------- Tokens: explicit toggle choices ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171115;
  --surface: #1f181d;
  --ink: #f1e9ee;
  --muted: #b0a0aa;
  --line: #372b33;
  --accent: #d9a6c4;
  --accent-deep: #e7c3d8;
  --accent-soft: #2c2027;
  --header-bg: rgba(23, 17, 21, 0.88);
  --icon-sun: inline-block;
  --icon-moon: none;
}
:root[data-theme="light"] {
  color-scheme: light;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  transition: background-color 0.35s ease, color 0.35s ease;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: var(--measure);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-small);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  color: var(--bg);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vertical-align: -0.25em;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}
.lang-switch button:not([aria-pressed="true"]):hover {
  color: var(--ink);
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle .icon {
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: middle;
}
.theme-toggle .icon-sun {
  display: var(--icon-sun);
}
.theme-toggle .icon-moon {
  display: var(--icon-moon);
}

.site-nav {
  border-bottom: 1px solid var(--line);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding-block: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 550;
  letter-spacing: 0.02em;
  padding-block: 0.25rem;
}
.site-nav a:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  border-bottom: 1px solid var(--line);
}
.hero-figure {
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34rem;
  height: 34rem;
  color: var(--accent);
  opacity: 0.07;
  pointer-events: none;
}
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-size: var(--fs-display);
  font-weight: 420;
  letter-spacing: -0.01em;
  max-width: 21ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 440;
  color: var(--accent);
}
.hero-lead {
  margin-top: 1.75rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--bg);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-top: 3.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.fact {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}
.fact .icon {
  color: var(--accent);
  margin-top: 0.22rem;
}
.fact strong {
  display: block;
  font-weight: 650;
  font-size: var(--fs-small);
}
.fact span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-y);
  border-bottom: 1px solid var(--line);
}
.section-head {
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section-head h2 {
  font-size: var(--fs-h2);
}
.section-head .section-note {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 52ch;
}

/* Services: shared-hairline grid, no floating cards */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service {
  background: var(--bg);
  padding: clamp(1.4rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: background-color 0.25s ease;
}
.service:hover {
  background: var(--surface);
}
.service .icon {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--accent);
  stroke-width: 1.5;
}
.service h3 {
  font-size: var(--fs-h3);
  font-weight: 520;
  font-family: var(--font-body);
}
.service p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.6;
}

/* Practice */
.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.pill {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--ink);
}
.pill-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}
.aside-label {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.practice-aside > div + div {
  margin-top: 1.9rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--line);
}

/* Hours ledger */
.hours-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  vertical-align: top;
}
.hours-table th {
  font-weight: 650;
  padding-right: 1.5rem;
  white-space: nowrap;
  width: 1%;
}
.hours-table td {
  color: var(--ink);
}
.hours-note {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.hours-foot {
  margin-top: 1.25rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
.hours-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.hours-cta h3 {
  font-size: 1.5rem;
  font-weight: 460;
}
.hours-cta p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: var(--fs-small);
}
.hours-cta .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Emergency / on-call block */
.emergency {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.emergency-title {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}
.emergency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.emergency-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.emergency-item .icon {
  color: var(--accent);
  margin-top: 0.3rem;
}
.emergency-item strong {
  display: block;
  font-size: var(--fs-small);
  font-weight: 650;
}
.emergency-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 470;
  color: var(--ink);
  text-decoration: none;
  margin: 0.15rem 0 0.3rem;
  font-variant-numeric: tabular-nums;
}
a.emergency-num:hover {
  color: var(--accent);
}
.emergency-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 700px) {
  .emergency-grid {
    grid-template-columns: 1fr;
  }
}

/* Directions */
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.address-card address {
  font-style: normal;
  line-height: 1.6;
}
.travel-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 1.75rem;
}
.travel-item .icon {
  color: var(--accent);
  margin-top: 0.3rem;
}
.travel-item strong {
  display: block;
  font-weight: 650;
  font-size: var(--fs-small);
}
.travel-item p {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 0.15rem;
}

.map-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 30% 20%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.map-consent p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 40ch;
}
.map-consent .icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  stroke-width: 1.4;
}
.map-links {
  margin-top: 0.8rem;
  font-size: var(--fs-small);
}

/* Contact */
.contact-list {
  display: flex;
  flex-direction: column;
}
.contact-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:first-child {
  border-top: 1px solid var(--line);
}
.contact-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 9.5rem;
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--muted);
}
.contact-label .icon {
  color: var(--accent);
}
.contact-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 450;
  color: var(--ink);
  text-decoration: none;
}
a.contact-value:hover {
  color: var(--accent);
}
.contact-hint {
  width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.footer-brand {
  max-width: 24rem;
}
.footer-brand .brand-mark {
  width: 1.8rem;
  height: 1.8rem;
}
.footer-brand p {
  margin-top: 0.9rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: var(--fs-small);
}
.footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-meta p {
  max-width: none;
}

/* ---------- Legal pages ---------- */
.legal-main {
  padding-block: var(--section-y);
}
.legal-main h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 430;
}
.legal-main h2 {
  font-size: 1.45rem;
  font-weight: 480;
  margin-top: 3rem;
}
.legal-main h2:first-of-type {
  margin-top: 2.5rem;
}
.legal-main p,
.legal-main ul {
  margin-top: 0.9rem;
  max-width: var(--measure);
  color: var(--ink);
}
.legal-main ul {
  padding-left: 1.2rem;
}
.legal-main li {
  margin-top: 0.3rem;
}
.legal-muted {
  color: var(--muted);
  font-size: var(--fs-small);
}
.legal-en-note {
  display: none;
  margin-top: 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.2rem;
  font-size: var(--fs-small);
}
html.lang-en .legal-en-note {
  display: block;
}
.legal-placeholder {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-weight: 650;
}

/* ---------- Reveal animation (skipped for reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.in {
    opacity: 1;
    transform: none;
  }
  .hero .reveal:nth-child(2) {
    transition-delay: 0.08s;
  }
  .hero .reveal:nth-child(3) {
    transition-delay: 0.16s;
  }
  .hero .reveal:nth-child(4) {
    transition-delay: 0.24s;
  }
  .hero .reveal:nth-child(5) {
    transition-delay: 0.32s;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
  .practice-grid,
  .hours-grid,
  .map-grid {
    grid-template-columns: 1fr;
  }
  .hero-figure {
    display: none;
  }
}
@media (max-width: 560px) {
  .services {
    grid-template-columns: 1fr;
  }
  .brand-sub {
    display: none;
  }
  .contact-value {
    word-break: break-word;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-nav,
  .skip-link,
  .map-frame,
  .hero-actions,
  .hours-cta .btn {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
