/* Anwaltskanzlei Imhof — Affoltern am Albis
   Voice: composed · principled · personal
   Strategy: Committed oxblood, warm off-white, restrained brass accent. */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Hanken+Grotesk:wght@400;500;600&display=swap');

:root {
  --oxblood:        oklch(0.33 0.085 25);
  --oxblood-deep:   oklch(0.255 0.065 25);
  --oxblood-ink:    oklch(0.205 0.045 25);
  --bg:             oklch(0.975 0.004 60);
  --surface:        oklch(0.992 0.003 60);
  --surface-warm:   oklch(0.955 0.008 60);
  --ink:            oklch(0.245 0.018 30);
  --muted:          oklch(0.445 0.02 30);
  --brass:          oklch(0.62 0.095 70);
  --brass-light:    oklch(0.80 0.085 78);
  --line:           oklch(0.88 0.008 40);
  --line-dark:      oklch(0.45 0.04 25);
  --on-dark:        oklch(0.93 0.012 60);
  --on-dark-muted:  oklch(0.78 0.02 50);

  --maxw: 72rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-sticky: 100;
  --z-menu: 200;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p { text-wrap: pretty; }

a { color: inherit; text-underline-offset: 0.18em; }

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

.container { width: min(100% - 0px, var(--maxw)); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: var(--z-menu);
  background: var(--oxblood); color: var(--on-dark);
  padding: 0.6rem 1rem; border-radius: 0.4rem; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease),
              color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--oxblood); color: var(--on-dark); }
.btn-primary:hover { background: var(--oxblood-deep); }
.btn-ghost { border-color: currentColor; color: var(--oxblood); }
.btn-ghost:hover { background: var(--oxblood); color: var(--on-dark); border-color: var(--oxblood); }
.btn-on-dark { border-color: var(--on-dark-muted); color: var(--on-dark); }
.btn-on-dark:hover { background: var(--on-dark); color: var(--oxblood-ink); border-color: var(--on-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem; padding-block: 0.75rem;
}
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand span { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav-links { display: flex; gap: clamp(1rem, 2.2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem;
  padding-block: 0.35rem; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--oxblood); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--oxblood); }

.nav-phone { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; color: var(--oxblood); white-space: nowrap; }
.nav-phone:hover { text-decoration: underline; }

.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 0.5rem;
  width: 2.75rem; height: 2.75rem; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 1.4rem; height: 1.4rem; }

@media (max-width: 860px) {
  .nav-links, .nav .nav-phone { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav[data-open="true"] .nav-links {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0;
    top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem; gap: 0.25rem; box-shadow: 0 24px 40px -28px rgba(0,0,0,0.4);
  }
  .nav[data-open="true"] .nav-links a { padding-block: 0.7rem; font-size: 1.1rem; }
  .nav[data-open="true"] .nav-phone { display: inline-flex; margin-top: 0.75rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--oxblood-deep);
  color: var(--on-dark);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 85% -10%, color-mix(in oklch, var(--oxblood) 70%, transparent), transparent 60%),
    radial-gradient(90% 90% at 0% 120%, color-mix(in oklch, var(--oxblood-ink) 90%, transparent), transparent 55%);
  pointer-events: none;
}
.hero-inner {
  position: relative; padding-block: clamp(4.5rem, 12vh, 8rem);
  max-width: 46rem;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass-light); margin-bottom: 1.5rem; font-weight: 600;
}
.hero .eyebrow::before { content: ''; width: 2rem; height: 1px; background: var(--brass); }
.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
  line-height: 1.02; letter-spacing: -0.022em; color: var(--on-dark);
}
.hero h1 em { font-style: italic; color: var(--brass-light); font-weight: 400; }
.hero p.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.45vw, 1.35rem);
  line-height: 1.6; color: var(--on-dark-muted); max-width: 38ch;
  margin: 1.75rem 0 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.75rem, 9vh, 7rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.section-head h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); letter-spacing: -0.015em; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; max-width: 60ch; }
.kicker {
  display: block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--oxblood); font-weight: 600; margin-bottom: 0.9rem;
}

.intro {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start;
}
.intro .lead-line {
  font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.15rem);
  line-height: 1.25; color: var(--ink); letter-spacing: -0.01em;
}
.intro .lead-line span { color: var(--oxblood); }
.intro .body p { color: var(--muted); margin: 0 0 1.1rem; max-width: 62ch; }
.intro .body p:first-child { margin-top: 0; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Practice areas (editorial list) ---------- */
.areas { background: var(--surface-warm); border-block: 1px solid var(--line); }
.area-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.area-item {
  display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 3vw, 2.5rem); align-items: baseline;
  padding: clamp(1.4rem, 3vw, 2.1rem) 0; border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease);
  position: relative;
}
.area-item:hover { background: color-mix(in oklch, var(--oxblood) 5%, transparent); }
.area-item h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); font-weight: 500; }
.area-item p { color: var(--muted); margin: 0; font-size: 0.98rem; max-width: 52ch; }
.area-item .num { font-family: var(--serif); color: var(--brass); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .area-item { grid-template-columns: auto 1fr; gap: 0.4rem 1rem; }
  .area-item h3 { grid-column: 2; }
  .area-item .num { grid-row: 1; }
  .area-item p { grid-column: 2; }
}

/* ---------- Split feature ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0.75rem;
  aspect-ratio: 4 / 3; box-shadow: 0 30px 60px -40px rgba(0,0,0,0.55);
}
.split-body h2 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.75rem); }
.split-body p { color: var(--muted); margin: 1.1rem 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* ---------- Timeline (Über mich) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
.timeline .yr { font-family: var(--serif); color: var(--oxblood); font-weight: 500; font-variant-numeric: tabular-nums; }
.timeline .what { color: var(--ink); }
@media (max-width: 620px) { .timeline li { grid-template-columns: 1fr; gap: 0.2rem; } }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.tag {
  font-size: 0.9rem; padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}

.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.5rem;
}
.detail-grid h3 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.6rem; }
.detail-grid ul { list-style: none; margin: 0; padding: 0; }
.detail-grid li { padding-block: 0.2rem; }

/* ---------- Contact band ---------- */
.contact-band { background: var(--oxblood-deep); color: var(--on-dark); }
.contact-band .split-media img { aspect-ratio: 3 / 4; }
.contact-band h2 { color: var(--on-dark); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.contact-band p { color: var(--on-dark-muted); }
.contact-list { list-style: none; margin: 1.75rem 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-list .lbl { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); font-weight: 600; }
.contact-list a, .contact-list span { color: var(--on-dark); text-decoration: none; font-size: 1.15rem; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Generic prose (legal pages) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 600; margin-top: 1.75rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-block: 0.35rem; }
.prose a { color: var(--oxblood); }

.page-hero {
  background: var(--surface-warm); border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 8vh, 5.5rem);
}
.page-hero h1 { font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem); letter-spacing: -0.02em; }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 56ch; margin-top: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--oxblood-ink); color: var(--on-dark-muted); padding-block: clamp(3rem, 6vh, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer-grid .brand b { color: var(--on-dark); }
.footer-grid .brand span { color: var(--on-dark-muted); }
.footer-col h3 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); font-weight: 600; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--on-dark-muted); text-decoration: none; }
.footer-col a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-about p { max-width: 36ch; margin: 1rem 0 0; }
.footer-bottom {
  margin-top: clamp(2rem, 5vh, 3.5rem); padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1rem; font-size: 0.85rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Reveal motion ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: 0.08s; }
  .js .reveal.d2 { transition-delay: 0.16s; }
  .js .reveal.d3 { transition-delay: 0.24s; }
}
