@import url("fonts.css");

:root {
  --wall: #D9DCDE;
  --wall-2: #CDD1D4;
  --acrylic: #F3F5F6;
  --paper: #FFFFFF;
  --ink: #23272B;
  --ink-2: #474D53;
  --ink-3: #5F666C;
  --brass: #9A7B4F;
  --brass-ink: #6F542C;
  --rule: #C9CED1;
  --rule-soft: #E4E7E9;
  --alarm: #8E1F23;
  --alarm-bg: #F7EBEB;
  --display: "Barlow Semi Condensed", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --sheen: linear-gradient(100deg, #F9FAFB 0%, #EEF1F3 40%, #F8F9FA 56%, #EAEEF0 100%);
  --screw: radial-gradient(circle 8px, #9A7B4F 0 6.6px, #6F542C 7px 7.6px, transparent 8px);
  --shadow-plate: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(35, 39, 43, .07),
    0 22px 36px -18px rgba(35, 39, 43, .42), 0 3px 7px rgba(35, 39, 43, .10);
  --shadow-low: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 22px -14px rgba(35, 39, 43, .35), 0 1px 3px rgba(35, 39, 43, .10);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  background: var(--wall);
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--wall);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #E8D8B6; color: var(--ink); }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brass-ink); outline-offset: 3px; border-radius: 3px; }

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

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: 12px; }

.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ header */

.site-header {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px var(--gutter) 18px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.brand b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.brand span { font-size: .875rem; color: var(--ink-2); }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color .2s var(--ease-out);
}
.nav a:hover { background: rgba(255, 255, 255, .5); }
.nav a[aria-current="page"] { background: var(--acrylic); box-shadow: var(--shadow-low); }

.header-tel {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 1.125rem; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
}
.header-tel svg { width: 18px; height: 18px; color: var(--brass-ink); }

/* ------------------------------------------------------------------ plates */

.plate {
  position: relative;
  background: var(--sheen);
  background-color: var(--acrylic);
  border-radius: var(--radius);
  box-shadow: var(--shadow-plate);
}
.plate--screws {
  background:
    var(--screw) 22px 22px / 20px 20px no-repeat,
    var(--screw) calc(100% - 22px) 22px / 20px 20px no-repeat,
    var(--screw) 22px calc(100% - 22px) / 20px 20px no-repeat,
    var(--screw) calc(100% - 22px) calc(100% - 22px) / 20px 20px no-repeat,
    var(--sheen);
  background-color: var(--acrylic);
}
.plate--pair {
  background:
    var(--screw) 18px 50% / 20px 20px no-repeat,
    var(--screw) calc(100% - 18px) 50% / 20px 20px no-repeat,
    var(--sheen);
  background-color: var(--acrylic);
}
.engraved {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .065em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}

/* ------------------------------------------------------------------ lobby (start page) */

.lobby {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.sign { padding: 60px 68px 48px; overflow: hidden; }
.sign::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, .65) 48%, transparent 60%);
  transform: translateX(-75%);
  opacity: 0;
  pointer-events: none;
  animation: sheen 1.8s var(--ease-out) .3s 1 both;
}
@keyframes sheen {
  0% { transform: translateX(-75%); opacity: 1; }
  100% { transform: translateX(75%); opacity: 0; }
}

.sign h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  line-height: 1;
}
.sign-sub { margin: 12px 0 0; font-size: 1.3rem; color: var(--ink-2); }

.doctors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0 28px;
  padding-top: 20px;
  border-top: 2px solid var(--brass);
}
.doctors p { margin: 0; }
.doctors b { display: block; font-size: 1.25rem; font-weight: 600; }
.doctors span { display: block; font-size: 1rem; color: var(--ink-2); line-height: 1.45; }

.hours { width: 100%; border-collapse: collapse; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th { position: relative; }
.hours tr.is-today th::before {
  content: "";
  position: absolute; left: -20px; top: 7px; bottom: 7px;
  width: 4px;
  border-radius: 2px;
  background: var(--brass);
}

.akut-line { margin: 16px 0 0; font-weight: 600; color: var(--brass-ink); }
.status {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
  min-height: 1.3em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.sheet .status { max-width: none; }
.sign-address { margin: 6px 0 0; font-size: 1rem; color: var(--ink-3); }

.tasks h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 6px 0 16px;
}

.tel-plate {
  display: block;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px 16px;
  text-decoration: none;
  box-shadow: 0 16px 28px -16px rgba(35, 39, 43, .7), 0 2px 5px rgba(35, 39, 43, .2);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.tel-plate:hover { transform: translateY(-1px); box-shadow: 0 20px 32px -16px rgba(35, 39, 43, .75), 0 3px 6px rgba(35, 39, 43, .22); }
.tel-plate b {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 600; font-size: 1.85rem; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.tel-plate b svg { width: 24px; height: 24px; color: #D9BE8E; flex: none; }
.tel-plate > span { display: block; color: #D5D9DC; font-size: 1rem; margin-top: 2px; }

.task-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  background: var(--acrylic);
  border-radius: var(--radius);
  box-shadow: var(--shadow-low);
  overflow: hidden;
}
.task-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 20px;
  text-decoration: none;
  font-weight: 500;
  border-top: 1px solid var(--rule-soft);
  transition: background-color .2s var(--ease-out);
}
.task-list li:first-child a { border-top: 0; }
.task-list a:hover { background: #fff; }
.task-list svg { width: 18px; height: 18px; color: var(--brass-ink); flex: none; transition: transform .2s var(--ease-out); }
.task-list a:hover svg { transform: translateX(3px); }

.emergency {
  margin-top: 14px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--alarm-bg);
  color: var(--alarm);
  font-size: 1rem;
  line-height: 1.5;
}
.emergency strong { font-family: var(--display); font-size: 1.25rem; letter-spacing: .02em; }

/* ------------------------------------------------------------------ room sign (sub pages) */

.room {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px var(--gutter) 30px;
}
.room .plate { display: inline-block; padding: 26px 60px 22px; max-width: 100%; }
.room h1 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.05; }
.room p { margin: 8px 0 0; color: var(--ink-2); font-size: 1.125rem; }

/* ------------------------------------------------------------------ sheets (reading) */

.page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.toc { position: sticky; top: 24px; font-size: 1rem; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.toc ol + .toc-title { margin-top: 22px; }
.sheet .facts { list-style: none; padding-left: 0; }
.facts li { padding: 8px 0; margin: 0; border-bottom: 1px solid var(--rule-soft); }
.toc-title {
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 6px 0 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); }

.sheet {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-low);
  padding: 48px 56px;
  padding: clamp(28px, 5vw, 60px) clamp(22px, 5.5vw, 68px);
}
.sheet > section + section { margin-top: 3.2rem; padding-top: 2.6rem; border-top: 1px solid var(--rule-soft); }

.sheet h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: .005em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
.sheet h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 1.8em 0 .4em; }
.sheet p, .sheet ul, .sheet ol { max-width: 68ch; margin: 0 0 1em; }
.sheet ul, .sheet ol { padding-left: 1.2em; }
.sheet li { margin-bottom: .4em; }
.sheet li::marker { color: var(--brass); }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--ink-2); }

.data { width: 100%; max-width: 860px; border-collapse: collapse; margin: .4em 0 1.2em; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; font-weight: 600; margin-bottom: .4em; }
.data th, .data td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--rule-soft); }
.data thead th { font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.data td.num { white-space: nowrap; }

.note { background: var(--acrylic); border-radius: var(--radius); padding: 16px 20px; max-width: 68ch; margin: 0 0 1em; }
.note p:last-child, .warn p:last-child { margin-bottom: 0; }
.warn { background: var(--alarm-bg); color: var(--alarm); border-radius: var(--radius); padding: 16px 20px; max-width: 68ch; margin: 0 0 1em; }
.warn strong, .note strong { font-weight: 600; }

.qa h3 { margin-top: 1.6em; }
.qa h3:first-of-type { margin-top: .4em; }

/* split sections on the start page */
.band { max-width: var(--wrap); margin: 0 auto 36px; padding: 0 var(--gutter); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: clamp(20px, 4vw, 56px); }
.split h2 { margin: 0; }
.split .more { font-weight: 500; }

/* ------------------------------------------------------------------ name plates (team) */

.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 4px 0 8px; }
.nameplate { padding: 28px 56px 26px; }
.nameplate h3, .nameplate .np-name { margin: 0; font-size: 1.5rem; line-height: 1.1; }
.nameplate .np-role { display: block; margin: 8px 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.nameplate .np-name { display: block; }
a.nameplate { display: block; text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
a.nameplate:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 26px 40px -18px rgba(35, 39, 43, .45), 0 4px 8px rgba(35, 39, 43, .12); }
.sheet.bio { margin-top: 18px; padding: 26px 32px; }
.sheet.bio p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ map */

.map { margin: .4em 0 1.2em; max-width: 860px; }
.map figcaption { font-size: .95rem; color: var(--ink-3); margin-top: 8px; }
.map-tall { display: none; }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var(--wall-2); margin-top: 24px; }
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px var(--gutter) 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  font-size: 1rem;
  line-height: 1.55;
}
.footer-inner .footer-title { font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.footer-inner p, .footer-inner ul { margin: 0; padding: 0; list-style: none; }
.footer-inner li { margin-bottom: 4px; }
.demo-note {
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--wrap) - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 16px 0 28px;
  border-top: 1px solid rgba(35, 39, 43, .14);
  font-size: .9rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .site-header { flex-wrap: wrap; gap: 10px 24px; }
  .nav { order: 3; width: 100%; margin-left: -12px; flex-wrap: wrap; gap: 0 2px; }
  .header-tel { margin-left: auto; }
  .lobby { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .page { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; overflow: visible; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px 16px; border-left: 0; padding-left: 0; }
  .toc a { padding: 4px 0; text-decoration: underline; text-decoration-color: var(--brass); }
}

@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .sign { padding: 54px 28px 40px; }
  .sign-sub { font-size: 1.125rem; }
  .doctors { grid-template-columns: 1fr; gap: 14px; }
  .hours { font-size: 1rem; }
  .hours th, .hours td { padding: 7px 0; }
  .hours tr.is-today th::before { left: -16px; }
  .map-wide { display: none; }
  .map-tall { display: block; }
  .doctors { margin: 22px 0 20px; padding-top: 16px; gap: 4px; }
  .doctors span { display: none; }
  .doctors b { font-size: 1.125rem; }
  .status { font-size: 1.2rem; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .plates { grid-template-columns: 1fr; }
  .nameplate { padding: 24px 44px 22px; }
  .room .plate { padding: 22px 50px 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .data thead { display: none; }
  .data tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
  .data td { display: block; border: 0; padding: 2px 0; }
  .data td:first-child { font-weight: 600; }
  .brand b { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body, html { background: #fff; }
  .site-header .nav, .tasks .task-list svg, .toc { display: none; }
  .plate, .sheet { box-shadow: none; border: 1px solid #ccc; }
}

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

.nowrap { white-space: nowrap; }
