/* Kamm & Kante — mint wall tiles, bottle-green woodwork, and the barber pole's red, white and blue. */
@font-face { font-family: "Caprasimo"; src: url("fonts/caprasimo-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-latin-vf.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --tile: #D7EADD;
  --white: #FFFFFF;
  --green: #0F3B2E;
  --red: #C8102E;
  --red-dark: #A50D26;
  --blue: #1D3F8F;
  --muted: #3F5A50;
  --line: rgba(15, 59, 46, .2);
  --display: "Caprasimo", Georgia, "Times New Roman", serif;
  --text: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1100px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tile); color: var(--green); font: 400 1.125rem/1.55 var(--text); }
h1, h2, h3, p, ul, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 1.2rem; background: var(--green); color: #fff; padding: .6rem 1rem; z-index: 30; }
.skip:focus { left: .5rem; }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.02; text-wrap: balance; }
/* One sentence per line; 4.6rem keeps "Ohne Termin." inside the copy column at desktop width. */
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); }
h1 span { display: block; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font: 400 1.7rem/1.15 var(--display); }
.fineprint { font-size: .9063rem; color: var(--muted); }

/* The pole: three colours on the diagonal, turning slowly. */
.pole { height: 14px; background: repeating-linear-gradient(-45deg, var(--red) 0 16px, var(--white) 16px 32px, var(--blue) 32px 48px, var(--white) 48px 64px); background-size: 90.51px 100%; animation: turn 6s linear infinite; }
@keyframes turn { to { background-position: 90.51px 0; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.2rem; padding: .5rem 1.5rem; border: 2px solid transparent; border-radius: 999px; font: 700 1.0625rem/1.2 var(--text); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { border-color: var(--green); background: none; color: var(--green); }
.btn-line:hover { background: var(--green); color: #fff; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .7rem var(--pad); background: rgba(215, 234, 221, .94); backdrop-filter: blur(10px); border-bottom: 2px solid var(--green); }
.brand { font: 400 1.6rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; gap: 1.5rem; }
.top nav a { font-weight: 700; text-decoration: none; }
.top nav a:hover { color: var(--red-dark); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; max-width: calc(var(--wrap) + 6rem); margin-inline: auto; padding: clamp(2.2rem, 6vw, 4.5rem) var(--pad) clamp(3rem, 7vw, 5.5rem); }
.hero-copy { padding-top: clamp(0rem, 3vw, 2.5rem); }
.lede { max-width: 29em; margin-top: 1.4rem; font-size: 1.25rem; }
.state { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.6rem; padding: .4rem 1rem; border: 2px solid var(--green); border-radius: 999px; font-weight: 700; }
.state::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: #8AA69A; }
.state.is-open::before { background: #18A558; }

.queue { display: grid; gap: 1.1rem; padding: clamp(1.2rem, 3vw, 1.8rem); background: var(--white); border: 2px solid var(--green); border-radius: 18px; box-shadow: 0 10px 0 var(--green); }
.queue h2 { font-size: 2rem; }
#view-closed, #view-draw, #view-ticket { display: grid; gap: 1rem; justify-items: start; }
#view-draw fieldset, #view-draw .btn, #view-ticket .ticket { justify-self: stretch; }
#view-ticket:focus { outline: none; }
.waiting strong { font: 400 3.4rem/1 var(--display); color: var(--red); margin-right: .3rem; font-variant-numeric: tabular-nums; }
.waiting { font-weight: 700; line-height: 1.3; }
legend { margin-bottom: .5rem; font-weight: 700; }
.picks { border-top: 2px solid var(--green); }
.picks label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.picks label:hover { background: #F0F7F2; }
.picks input { width: 1.4rem; height: 1.4rem; margin: 0; accent-color: var(--green); }
.picks b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick-total { min-height: 1.6em; font-weight: 700; }
.pick-total.is-error { color: var(--red-dark); }

.ticket { position: relative; display: grid; gap: .5rem; padding: 1.4rem 1.4rem 1.3rem; background: #FFF8E1; border: 2px solid var(--green); border-radius: 10px; transform: rotate(-1.2deg); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 1.5rem; height: 1.5rem; margin-top: -.75rem; border: 2px solid var(--green); border-radius: 50%; background: var(--white); }
.ticket::before { left: -.85rem; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -.85rem; clip-path: inset(0 50% 0 0); }
.ticket-label { font-weight: 700; font-size: .9375rem; }
.ticket-number { font: 400 clamp(4.2rem, 12vw, 5.6rem)/.9 var(--display); color: var(--red); font-variant-numeric: tabular-nums; }
.ticket-ahead { font-weight: 700; font-size: 1.125rem; line-height: 1.35; }
.is-up .ticket-ahead { color: #0B7A3E; }
.bar { height: .7rem; border: 2px solid var(--green); border-radius: 999px; background: #fff; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); transition: width .4s; }
.ticket-what { font-size: .9688rem; color: var(--muted); }

/* ---------- sections ---------- */
.team, .shop { padding-block: clamp(3.2rem, 7vw, 5.5rem); }
.team { background: var(--green); color: #fff; }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.2rem); margin-top: 2.2rem; }
.people li { padding-top: 1.1rem; border-top: 3px solid var(--tile); }
.chair { display: inline-block; margin-bottom: .6rem; padding: .1rem .7rem; border-radius: 999px; background: var(--tile); color: var(--green); font-weight: 700; font-size: .9063rem; }
.people p { margin-top: .5rem; color: #CFE3D8; font-size: 1.0313rem; }
.team :focus-visible { outline-color: #fff; }

.shop-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.address { margin-top: 1.3rem; font-size: 1.25rem; }
.phone { display: inline-block; margin-top: .7rem; font: 400 clamp(1.9rem, 4vw, 2.6rem)/1.1 var(--display); color: var(--red-dark); text-decoration: none; font-variant-numeric: tabular-nums; }
.phone:hover { text-decoration: underline; }
.shop-note { margin-top: 1rem; max-width: 26em; }
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font: 400 1.7rem/1.15 var(--display); padding-bottom: .7rem; }
.hours th, .hours td { padding: .65rem 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 800; color: var(--red-dark); }

/* ---------- footer & dialog ---------- */
.foot { padding-block: 2rem; border-top: 2px solid var(--green); font-size: 1rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.foot-row a { margin-left: 1.2rem; }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.linklike:hover, .foot a:hover { color: var(--red-dark); }
.demo-note { margin-top: 1.4rem; font-size: .875rem; color: var(--muted); }
dialog { width: min(32rem, calc(100vw - 2rem)); padding: 1.8rem; border: 2px solid var(--green); border-radius: 18px; background: var(--white); color: var(--green); }
dialog::backdrop { background: rgba(15, 59, 46, .7); }
dialog h2 { font-size: 2rem; }
dialog p { margin-top: 1rem; }
dialog .btn { margin-top: 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .queue { max-width: 32rem; }
  .people { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top nav a:not(:first-child) { display: none; }
  .brand { font-size: 1.35rem; }
  .foot-row a { display: block; margin: .4rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole { animation: none; }
  .btn, .bar span { transition: none; }
  .ticket { transform: none; }
}
