/* =====================================================================
   Shiatsu Glarmin — design system (demo v3)
   ---------------------------------------------------------------------
   Type: all typography lives in typography.css (load it before this file).
   Colour: white ground, warm ink, gold #a88c62 as accent.
           Mist / sea only for thin decorative lines and markers.
   Components: SiteHeader · Hero · Layout · Overview carousel · Teaser
               Intro · Box · Checklist · Timeline · Gallery · Banner
               Form · SiteFooter
   ===================================================================== */

:root {
  --white: #ffffff;
  --paper: #faf8f4;
  --ink: #3a332b;
  --text: #5a534a;
  --muted: #766f65;
  --line: #e8e3da;
  --line-strong: #d3ccc0;

  --gold: #a88c62;
  --gold-dark: #86704e;
  --mist: #abc2c7;
  --sea: #456f73;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --space: clamp(64px, 8vw, 104px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0; color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px;
  color: var(--gold-dark);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--mist); }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: rgba(255, 255, 255, .7); }

/* ---------- Links & buttons ---------- */
.text-link {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 3px;
  color: var(--gold-dark);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease);
}
.text-link:hover { background-size: 35% 1px; }
.text-link--light { color: #fff; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid var(--gold); border-radius: var(--radius);
  background: transparent; color: var(--gold-dark);
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.button:hover { background: var(--gold); color: #fff; }

/* Chevron (sprite: #chevron) with PostFinance-style slide */
.chevron { position: relative; flex: none; width: 24px; height: 24px; overflow: hidden; color: var(--gold); }
.chevron svg { position: absolute; inset: 0; transition: transform .4s var(--ease); }
.chevron svg + svg { transform: translateX(-100%); }
a:hover .chevron svg:first-child { transform: translateX(100%); }
a:hover .chevron svg + svg { transform: translateX(0); }

/* =====================================================================
   SiteHeader
   ===================================================================== */
.site-header { position: absolute; inset: 0 0 auto; z-index: 50; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: 92px; }
.site-header__logo { position: relative; z-index: 2; display: block; }
.site-header__logo img { width: 168px; height: auto; filter: brightness(0) invert(1); transition: filter .3s ease; }

.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 32px); }
.site-nav a { position: relative; padding: 6px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__meta { display: none; }

.site-header__toggle {
  display: none; position: relative; z-index: 2;
  width: 44px; height: 44px; padding: 0 9px;
  flex-direction: column; justify-content: center; gap: 7px;
  background: none; border: 0; color: inherit; cursor: pointer;
}
.site-header__toggle span { display: block; height: 1px; background: currentColor; transition: transform .35s var(--ease); }

@media (max-width: 900px) {
  .site-header__bar { height: 80px; }
  .site-header__logo img { width: 150px; }
  .site-header__toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: stretch; justify-content: center; gap: 0;
    padding: 110px var(--gutter) 40px;
    background: var(--white); color: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
  }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--gold-dark); }
  .site-nav__meta { display: block; margin-top: 28px; color: var(--muted); }
  .site-nav__meta a { display: inline; padding: 0; border: 0; }
  .site-header.is-open { color: var(--ink); }
  .site-header.is-open .site-nav { opacity: 1; visibility: visible; }
  .site-header.is-open .site-header__logo img { filter: none; }
  .site-header.is-open .site-header__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .site-header.is-open .site-header__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* =====================================================================
   Hero — one component for every page (.hero--home is taller)
   ===================================================================== */
.hero { position: relative; overflow: hidden; color: #fff; background: #9a948b; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 2.4s var(--ease); }
.is-loaded .hero__media img { transform: scale(1); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42, 37, 31, .42) 0%, rgba(42, 37, 31, .08) 42%, rgba(42, 37, 31, .5) 100%);
}
.hero__inner {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(380px, 52svh, 520px);
  padding-top: 132px; padding-bottom: clamp(32px, 4vw, 48px);
}
.hero--home .hero__inner { min-height: clamp(480px, 70svh, 680px); }
.hero h1 { color: #fff; max-width: 22ch; }
.hero__meta {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .35);
}
.hero__meta p { margin: 0; }
.hero__person strong { display: block; }
.hero__person span, .hero__person a { display: block; }

/* =====================================================================
   Layout: label column + main column
   ===================================================================== */
.section { padding-block: var(--space); }
.section--flush-top { padding-top: 0; }
.section--ruled > .wrap > .layout { padding-top: var(--space); border-top: 1px solid var(--line); }

.layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.5vw, 32px); }
.layout__label { grid-column: 1 / span 3; }
.layout__main { grid-column: 4 / -1; min-width: 0; }
.section-label {
  position: sticky; top: 32px; margin: 12px 0 24px;
  color: var(--gold-dark);
}
.layout__main > h2 + * { margin-top: 24px; }
.layout__main > * + :is(ul, ol, figure, div, form) { margin-top: 32px; }

@media (max-width: 1024px) {
  .layout__label, .layout__main { grid-column: 1 / -1; }
  .section-label { position: static; margin: 0 0 16px; }
}

/* =====================================================================
   Overview carousel (home) — heading, aside with controls, bleeding track
   ===================================================================== */
.overview__head { margin-bottom: clamp(24px, 3vw, 40px); }
.overview__row {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: clamp(24px, 3vw, 48px);
  padding-left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.overview__aside { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding-bottom: 8px; }
.carousel__controls { display: flex; gap: 8px; }
.carousel__btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink);
  cursor: pointer; transition: border-color .3s ease, color .3s ease, opacity .3s ease;
}
.carousel__btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.carousel__btn:disabled { opacity: .35; cursor: default; border-color: var(--line-strong); color: var(--ink); }
.carousel__btn--prev svg { transform: scaleX(-1); }

.carousel__track {
  display: flex; gap: 20px; margin: 0; padding: 4px var(--gutter) 24px 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 clamp(300px, 24vw, 340px); scroll-snap-align: start; }

@media (max-width: 860px) {
  .overview__row { grid-template-columns: 1fr; }
  .overview__aside { flex-direction: row; align-items: center; padding-right: var(--gutter); }
  .carousel__track { gap: 12px; }
  .carousel__slide { flex-basis: min(88vw, 340px); }
}
.carousel__slide .teaser__body { gap: 8px; padding-inline: 16px 12px; }

/* =====================================================================
   Teaser (PostFinance "teaser-basic" style) — image optional
   ===================================================================== */
.teaser {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--ink);
  transition: box-shadow .35s ease, border-color .35s ease;
}
.teaser:hover { border-color: var(--line-strong); box-shadow: 0 12px 32px rgba(58, 51, 43, .08); }
.teaser__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper); }
.teaser__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.teaser:hover .teaser__media img { transform: scale(1.04); }
.teaser__body { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: 1; padding: 16px 20px 18px; }
.teaser__body .chevron { align-self: center; }
.teaser__body > :first-child { min-width: 0; }
.teaser__title { display: block; }
.teaser__sub { display: block; color: var(--muted); }
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.teaser-group + .teaser-group { margin-top: 40px; }
.teaser-group .eyebrow { margin-bottom: 16px; }

/* =====================================================================
   Intro (home) — small image + decorative serif quote
   ===================================================================== */
.intro__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 7vw, 110px); align-items: center; }
.intro__media { position: relative; max-width: 440px; }
.intro__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.intro__media::after {
  content: ""; position: absolute; right: -14%; bottom: -9%;
  width: 42%; aspect-ratio: 1; border: 1px solid var(--mist); border-radius: 50%; pointer-events: none;
}
.intro__body { margin: 0; }
.intro__body .quote { margin: 0 0 24px; }
.intro__sign { display: block; margin-top: 24px; color: var(--gold-dark); }
@media (max-width: 860px) {
  .intro__grid { grid-template-columns: 1fr; }
  .intro__media { width: 80%; max-width: 360px; }
  .intro__media::after { right: -6%; }
}

/* =====================================================================
   Box — small informative tile (facts, directions)
   ===================================================================== */
.box-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 640px) { .box-grid { grid-template-columns: 1fr; } }
.box { position: relative; padding: 22px 24px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.box::before { content: ""; position: absolute; top: -1px; left: 24px; width: 32px; height: 1px; background: var(--gold); }
.box__value { display: block; margin-bottom: 4px; color: var(--ink); }
.box p { margin: 0 0 .75em; }
.box p:last-child { margin: 0; }

/* =====================================================================
   Checklist · Timeline · Portrait · Media
   ===================================================================== */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid var(--line); }
.checklist--single { grid-template-columns: 1fr; }
.checklist li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 25px; width: 7px; height: 7px; border: 1px solid var(--sea); border-radius: 50%; }
@media (max-width: 760px) { .checklist { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline__year { color: var(--gold-dark); }
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* Person — text on the grid line, large portrait on the right with an offset frame.
   The photo is locked to a square (aspect-ratio + cover), so it never stretches;
   the frame is a pseudo-element behind it, offset inside the column (no overflow). */
.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 5vw, 72px); align-items: center; }
.person .person__photo { position: relative; isolation: isolate; margin: 0 16px 16px 0; }
.person__photo img { position: relative; display: block; width: 250px; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius); }
.person__photo::after {
  content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1;
  border: 1px solid var(--gold); border-radius: var(--radius);
}
@media (max-width: 760px) {
  .person { grid-template-columns: 1fr; }
  .person__photo { order: -1; justify-self: start; }
  .person__photo img { width: min(250px, calc(100vw - 2 * var(--gutter) - 16px)); }
}

/* Quote — decorative serif line inside content (type in typography.css) */
.quote { margin: 32px 0; color: var(--ink); }

.media-frame { margin-top: 32px; }
.media-frame img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); }

/* =====================================================================
   Gallery (client photos)
   ===================================================================== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gallery img { width: 100%; height: auto; aspect-ratio: 213 / 170; object-fit: cover; border-radius: 2px; }

/* =====================================================================
   Map
   ===================================================================== */
.map { margin-top: 16px; aspect-ratio: 16 / 7; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(.75) contrast(.95); }
@media (max-width: 760px) { .map { aspect-ratio: 4 / 3; } }

/* =====================================================================
   Legal rows (Impressum, Datenschutz) — label + text, divided by lines
   ===================================================================== */
.legal-row { padding-block: 32px; border-top: 1px solid var(--line); }
.legal-row:first-child { padding-top: 0; border-top: 0; }
.legal-row .section-label { position: static; margin: 0 0 12px; }
.legal-row .layout__main { max-width: 68ch; }
.legal-row .layout__main > * + :is(ul, ol, div, address) { margin-top: 0; }
.legal-row address, .legal-row ul { margin: 0 0 1em; }
.legal-row address:last-child, .legal-row ul:last-child { margin-bottom: 0; }
.legal-row ul { padding-left: 20px; }
.legal-row a { color: var(--gold-dark); }

/* =====================================================================
   Banner — contact call-to-action box (every page but Kontakt)
   ===================================================================== */
.banner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.banner__media img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.banner__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 56px); }
.banner__body h2 { margin-bottom: 20px; }
.banner__links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 28px; }
.banner__links a {
  color: var(--ink);
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease);
}
.banner__links a:hover { background-size: 100% 1px; }
.banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
@media (max-width: 760px) {
  .banner { grid-template-columns: 1fr; margin-inline: calc(-1 * var(--gutter)); border-inline: 0; border-radius: 0; }
  .banner__media img { min-height: 0; aspect-ratio: 2 / 1; }
  .banner__body { padding: 32px var(--gutter) 40px; }
}

/* =====================================================================
   Form (Kontakt)
   ===================================================================== */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 10px 0; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  transition: border-color .3s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field textarea { min-height: 140px; resize: vertical; }
.consent { grid-column: 1 / -1; display: flex; gap: 14px; align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--gold); }
.consent a { color: var(--gold-dark); }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.form__foot p { margin: 0; color: var(--muted); }
.form__status { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--gold); color: var(--ink); }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* =====================================================================
   SiteFooter
   ===================================================================== */
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.site-footer__bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 40px; padding-block: 32px; }
.site-footer__logo img { width: 140px; height: auto; }
.site-footer__info, .site-footer__nav { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); }
.site-footer__nav a:hover, .site-footer__nav a[aria-current="page"] { color: var(--gold-dark); }
@media (max-width: 760px) { .site-footer__bar { flex-direction: column; align-items: flex-start; } }

/* =====================================================================
   Motion
   ===================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .carousel__track { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
