/*
  Kanzlei Dr. Keller — Familienrecht, Hamburg

  Design palette drawn from warm Hamburg interiors:
  aged oak panelling, linen-white walls, sandstone mouldings,
  and the quiet sage greens along the Außenalster.
  Typography pairs a warm serif (Georgia) for headings with
  a neutral system sans-serif for body text, tuned for generous
  line-height and deliberate spacing.
*/

/* -------------------------------------------------- reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ------------------------------------------ custom props */
:root {
  /* palette */
  --color-bg:           hsl(40, 33%, 97%);
  --color-bg-alt:       hsl(38, 28%, 93%);
  --color-text:         hsl(25, 22%, 16%);
  --color-text-soft:    hsl(25, 12%, 42%);
  --color-accent:       hsl(152, 18%, 36%);
  --color-accent-hover: hsl(152, 22%, 28%);
  --color-border:       hsl(35, 20%, 85%);
  --color-footer-bg:    hsl(25, 20%, 14%);
  --color-footer-text:  hsl(38, 20%, 82%);
  --color-footer-link:  hsl(38, 28%, 72%);
  --color-top-bar:      hsl(152, 18%, 36%);

  /* type */
  --font-heading: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* layout */
  --max-width: 52rem;
  --section-gap: 5rem;
}

/* -------------------------------------------------- base */
html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--color-text);
  background-color: var(--color-bg);
  border-top: 3px solid var(--color-top-bar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: hsl(152, 18%, 36%, 0.15);
  color: var(--color-text);
}

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

/* ------------------------------------------- skip-link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------- focus */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ------------------------------------------ container */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------------------------------------------- header */
.site-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

.site-title span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-top: 0.25rem;
}

.site-title-link {
  text-decoration: none;
  color: inherit;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-accent);
}

/* -------------------------------------------- sections */
section {
  padding: var(--section-gap) 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1.75rem;
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--color-accent);
}

/* ------------------------------------------------ hero */
.hero {
  padding: var(--section-gap) 0 calc(var(--section-gap) * 1.2);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.hero-text {
  max-width: 38rem;
  color: var(--color-text-soft);
  font-size: 1.125rem;
  line-height: 1.8;
}

.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  background: var(--color-accent);
  color: var(--color-bg);
  text-decoration: none;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}

.hero-cta:hover {
  background: var(--color-accent-hover);
}

/* ------------------------------------------ services */
.services-list {
  list-style: none;
  display: grid;
  gap: 0;
}

.service-item {
  padding: 1.5rem 0 1.5rem 1.25rem;
  border-left: 2px solid var(--color-border);
  transition: border-color 0.25s;
}

.service-item:hover {
  border-left-color: var(--color-accent);
}

.service-item + .service-item {
  border-top: 1px solid hsl(35, 20%, 90%);
}

.service-name {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 400;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.service-desc {
  color: var(--color-text-soft);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --------------------------------------------- about */
.about-text {
  max-width: 40rem;
}

.about-text p + p {
  margin-top: 1.25rem;
}

.about-note {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--color-text-soft);
  padding-left: 1.25rem;
  border-left: 2px solid var(--color-accent);
}

/* --------------------------------------------- hours */
.hours-table {
  border-collapse: collapse;
}

.hours-table td {
  padding: 0.5rem 2rem 0.5rem 0;
  font-size: 1rem;
}

.hours-table td:first-child {
  color: var(--color-text-soft);
  font-size: 0.9375rem;
}

.hours-note {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-soft);
}

/* ------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-label {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 0.375rem;
}

.contact-value {
  font-size: 1.0625rem;
  color: var(--color-text);
}

.contact-value a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-value a:hover {
  border-bottom-color: var(--color-accent);
}

/* -------------------------------------------- footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2.5rem 0;
  margin-top: var(--section-gap);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--color-footer-link);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-bg);
}

.footer-copyright {
  color: hsl(38, 12%, 50%);
}

/* ---------------------------------------- legal pages */
.legal-page {
  padding: var(--section-gap) 0;
}

.legal-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  margin-bottom: 2.5rem;
  color: var(--color-text);
}

.legal-page h2 {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.legal-page h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.legal-page p {
  margin-bottom: 0.75rem;
  max-width: 42rem;
}

.legal-page ul {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  max-width: 42rem;
}

.legal-page li {
  margin-bottom: 0.375rem;
}

.legal-page a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.legal-page a:hover {
  border-bottom-color: var(--color-accent);
}

.legal-date {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: var(--color-text-soft);
}

/* ------------------------------------------- mobile */
@media (max-width: 640px) {
  :root {
    --section-gap: 3.5rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    gap: 0.125rem 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }
}

/* -------------------------------------------- print */
@media print {
  body {
    border-top: none;
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .site-nav,
  .hero-cta,
  .skip-link {
    display: none;
  }

  section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }

  .site-footer {
    background: none;
    color: #000;
    border-top: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
