/* sanitaer-schmidlin.ch – handwritten CSS, no build step.
   Design follows the business card: white ground, one blue, light condensed wordmark. */

@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../fonts/archivo-variable.c5a01ed02269.woff2") format("woff2"); }

:root {
  --brand: #2E5E9A;      /* wordmark blue from the business card */
  --brand-dark: #234A7A;
  --ink: #1E252B;        /* body text, black on the card */
  --muted: #5A6570;
  --tint: #F1F5FA;       /* alternating section background */
  --white: #FFFFFF;
  --line: #DCE3EA;
  --error: #B42318;
  --placeholder: #F6A623;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 4px;
  --section: clamp(4rem, 9vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--white); }
h1, h2, h3 { margin: 0 0 0.6em; line-height: 1.15; font-weight: 600; font-stretch: 88%; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }

[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; padding: 0.5rem 1rem; background: var(--white); color: var(--ink); }
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Placeholders for the client meeting (SHOW_PLACEHOLDERS) */
.placeholder { background: color-mix(in srgb, var(--placeholder) 22%, transparent); color: inherit; border: 1px dashed var(--placeholder); border-radius: 3px; padding: 0 0.3em; font-size: 0.92em; }
.placeholder::before { content: "["; } .placeholder::after { content: "]"; }
.demo-bar { margin: 0; padding: 0.4rem var(--gutter); background: #FFF6E5; color: #6B4A00; font-size: 0.85rem; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border: 0; border-radius: var(--radius); background: var(--brand); color: var(--white); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.btn-outline:hover { background: var(--tint); color: var(--brand-dark); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-spinner { display: none; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.htmx-request .btn-spinner, .btn.htmx-request .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Wordmark: lowercase, light and condensed as on the business card */
.wordmark { display: inline-block; font-weight: 300; font-stretch: 68%; line-height: 0.95; letter-spacing: -0.005em; color: var(--brand); white-space: nowrap; }
.site-header .wordmark { font-size: 1.75rem; }
.wordmark-stacked { text-align: center; }  /* "sanitär" centred over "schmidlin+co", as on the card */
.wordmark-stacked .wm-line { display: block; }
.wordmark:not(.wordmark-stacked) .wm-line + .wm-line::before { content: " "; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { text-decoration: none; margin-right: auto; }
.site-nav ul { display: flex; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--brand); }
.header-call { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.9rem; border-radius: var(--radius); background: var(--brand); color: var(--white); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.header-call:hover { background: var(--brand-dark); color: var(--white); }
.nav-toggle { display: none; padding: 0.35rem; border: 0; background: none; color: var(--ink); cursor: pointer; }

@media (max-width: 52rem) {
  .header-inner { gap: 0.75rem; }
  .nav-toggle { display: block; }
  .header-call span { display: none; }
  .header-call { padding: 0.6rem; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { display: block; padding: 0.75rem 0; font-size: 1.15rem; }
}

/* Hero: laid out like the business card – wordmark on top, contact lines below */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner { text-align: center; padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.hero h1 { margin: 0 0 clamp(2rem, 5vw, 3.5rem); font-weight: inherit; font-stretch: inherit; }
.hero .wordmark { font-size: clamp(4rem, 15vw, 10.5rem); }
.hero-lead { max-width: 34rem; margin: 0 auto 2.25rem; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* Sections */
.section { padding: var(--section) 0; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; }

.service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2.5rem; margin: 2.5rem 0 1rem; padding: 0; list-style: none; }
.service { padding-top: 1.1rem; border-top: 2px solid var(--brand); }
.service h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
.service p { margin: 0; color: var(--muted); }
@media (max-width: 52rem) { .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .service-list { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; } }

.about { background: var(--tint); }
.about-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-text p { max-width: 40rem; }
.facts { margin: 0; padding: 1.75rem; background: var(--white); border-radius: var(--radius); }
.facts div { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { padding-top: 0; }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: 0.9rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 52rem) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-details > p { max-width: 32rem; color: var(--muted); }
.contact-list { margin: 2rem 0 0; display: grid; gap: 1.1rem; }
.contact-list dt { font-size: 0.9rem; color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 600; }
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--brand); }
.whatsapp-link { display: inline-flex; align-items: center; gap: 0.45rem; }
.whatsapp-link .icon-wa { color: #25D366; flex: none; }  /* WhatsApp brand green, icon only */
.contact-phone { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.map { margin: 2.5rem 0 0; }
.map > a { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(0.55); }
.map > a:hover img { filter: none; }
/* Pin at the image centre = the address (see scripts/render_map.py) */
.map-pin { position: absolute; left: 50%; top: 50%; width: 1.5rem; height: 1.5rem; margin: -1.5rem 0 0 -0.75rem; background: var(--brand); border: 3px solid var(--white); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.map figcaption { margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.map figcaption a { color: inherit; }
.contact-panel { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--tint); border-radius: var(--radius); }
.contact-panel h3 { font-size: 1.4rem; }
@media (max-width: 52rem) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Form */
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1rem; }
.contact-form > .field, .contact-form > .form-alert, .contact-form > .form-hint, .contact-form > .btn { grid-column: 1 / -1; }
.contact-form > .field-phone, .contact-form > .field-email { grid-column: auto; }
@media (max-width: 34rem) { .contact-form > .field-phone, .contact-form > .field-email { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.95rem; }
.field input:not([type=checkbox]), .field textarea { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid #B9C7D4; border-radius: var(--radius); background: var(--white); color: var(--ink); font: inherit; }
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.has-error input:not([type=checkbox]), .has-error textarea { border-color: var(--error); }
.field-error { margin: 0.35rem 0 0; color: var(--error); font-size: 0.9rem; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.field-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--brand); }
.field-check label { font-weight: 400; font-size: 0.92rem; }
.field-check .field-error { grid-column: 2; }
.form-hint { margin: -0.4rem 0 0; font-size: 0.9rem; color: var(--muted); order: 0; }
.form-alert { display: flex; gap: 0.5rem; align-items: center; padding: 0.75rem 1rem; border-radius: var(--radius); background: #FDECEA; color: var(--error); }
.contact-form > .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-success { padding: 1rem 0; }
.contact-success svg { color: var(--brand); margin-bottom: 0.75rem; }

/* Footer */
.site-footer { padding: 3rem 0; background: var(--tint); color: var(--muted); font-size: 0.95rem; }
.site-footer .wordmark { font-size: 1.75rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 2rem; align-items: start; }
.footer-address { margin: 0.9rem 0 0; }
.site-footer a { color: var(--ink); }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
.footer-copy { grid-column: 1 / -1; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; }
@media (max-width: 52rem) { .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } }

/* Legal pages */
.legal { padding-top: clamp(3rem, 7vw, 5rem); }
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal-meta { color: var(--muted); }
.page-sub .contact { padding-top: clamp(3rem, 7vw, 5rem); }

/* Password gate */
.page-gate { min-height: 100vh; display: grid; place-items: center; background: var(--tint); padding: 1rem; }
.gate-card { width: min(100%, 26rem); padding: 2.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.gate-card .wordmark { font-size: 2.5rem; }
.gate-card h1 { margin-top: 1.75rem; font-size: 1.4rem; }
.gate-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.gate-contact { margin: 1.5rem 0 0; font-size: 0.9rem; color: var(--muted); }
