/* =====================================================================
   Kanzlei Staevsky – stylesheet
   Colours are taken from the original site (slate blue #879bb3,
   rosy brown #bc8f8f, greys) and deepened for readable contrast.
   Fonts are system fonts: nothing is loaded from Google or other
   third parties (GDPR-friendly, fast).
   ===================================================================== */

:root {
    --ink: #1f2a38;          /* headings, footer background */
    --text: #3b4350;
    --muted: #677180;
    --slate: #879bb3;        /* original brand blue */
    --slate-dark: #4f6580;
    --rose: #9a675f;         /* original rosy brown, darkened for contrast */
    --rose-light: #bc8f8f;
    --paper: #f6f4f0;
    --surface: #ffffff;
    --line: #e3dfd7;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(31, 42, 56, .06), 0 8px 24px rgba(31, 42, 56, .08);

    --font-serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, serif;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --container: 1120px;
    --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
}

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

a { color: var(--rose); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--slate-dark); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .5em; }

address { font-style: normal; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff; padding: .6em 1em; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------- buttons */

.button {
    display: inline-block;
    padding: .75em 1.4em;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.button:hover { background: var(--slate-dark); border-color: var(--slate-dark); color: #fff; }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------------------------------------------------- top bar */

.topbar { background: var(--ink); color: #c9d2de; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar a { color: #e6ebf1; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__contact { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.lang-switch { display: flex; gap: .25rem; }
.lang-switch a {
    padding: .15em .55em;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: .05em;
}
.lang-switch a[aria-current] { background: var(--slate); color: var(--ink); }

/* ---------------------------------------------------------- header + nav */

.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 88px; }
.brand img { width: 220px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
    display: block;
    padding: .5em .9em;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-variant: small-caps;
    letter-spacing: .06em;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--rose); }
.main-nav a[aria-current="page"] { color: var(--rose); border-bottom-color: var(--rose-light); }

.nav-toggle { display: none; }

@media (max-width: 820px) {
    .topbar__contact a:last-child { display: none; }
    .site-header__inner { min-height: 72px; }
    .brand img { width: 180px; }

    .js .nav-toggle {
        display: inline-flex; align-items: center; gap: .5rem;
        padding: .5em .8em;
        background: none; border: 1px solid var(--line); border-radius: var(--radius);
        color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer;
    }
    .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
        display: block; width: 18px; height: 2px; background: currentColor; position: relative;
    }
    .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle__bars::before { top: -6px; }
    .nav-toggle__bars::after { top: 6px; }

    .site-header__inner { flex-wrap: wrap; }
    .main-nav { flex-basis: 100%; }
    .js .main-nav { display: none; }
    .js .nav-open .main-nav { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding-bottom: .75rem; }
    .main-nav a { padding: .7em 0; border-bottom: 1px solid var(--line); }
    .main-nav a[aria-current="page"] { border-bottom-color: var(--line); }
}

/* ---------------------------------------------------------- home hero */

.hero {
    background:
        linear-gradient(180deg, var(--paper) 0%, var(--paper) 78%, var(--surface) 78%);
    padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.eyebrow {
    margin: 0 0 .75rem;
    color: var(--slate-dark);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.hero__lead { font-size: 1.2rem; color: var(--text); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.hero__photo {
    margin: 0;
    padding: 10px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero__photo img { width: 100%; border-radius: 3px; }

@media (max-width: 820px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__photo { max-width: 540px; }
}

/* ---------------------------------------------------------- sections */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tint { background: var(--paper); }
.section__title { margin-top: 0; }

.intro { max-width: 760px; }
.intro p:first-child { font-size: 1.2rem; color: var(--ink); }

.cards {
    list-style: none; margin: 1.5rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem;
}
.card {
    display: flex; flex-direction: column;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--slate);
    border-radius: var(--radius);
}
.card p { flex: 1; margin: 0 0 1.25rem; color: var(--muted); }
.card__link { font-weight: 600; text-decoration: none; }
.card__link:hover { text-decoration: underline; }

.contact-strip {
    display: grid; grid-template-columns: 1fr minmax(280px, 380px);
    gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 820px) { .contact-strip { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- inner pages */

.page-hero {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(2rem, 5vw, 3.25rem);
}
.page-hero h1 { margin: 0; }
.page-hero h1::after {
    content: ""; display: block;
    width: 56px; height: 3px; margin-top: .6em;
    background: var(--rose-light);
}

.page-body { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.page-body--sidebar {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 900px) { .page-body--sidebar { grid-template-columns: 1fr; } }

.sidebar { position: sticky; top: 110px; }
@media (max-width: 900px) { .sidebar { position: static; } }

.prose { max-width: 720px; }
.prose > :first-child, .prose > section:first-child > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 1.4em; margin-bottom: .35em; }
.prose li::before {
    content: ""; position: absolute; left: .2em; top: .7em;
    width: 7px; height: 7px; border-radius: 50%; background: var(--slate);
}
.prose section { scroll-margin-top: 110px; }
.lead { font-size: 1.15rem; color: var(--ink); }
.note { font-size: .875rem; color: var(--muted); }

.callout {
    padding: 1rem 1.25rem;
    background: var(--paper);
    border-left: 3px solid var(--rose-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.portrait {
    float: right;
    margin: .3rem 0 1.5rem 2rem;
    padding: 8px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
@media (max-width: 560px) { .portrait { float: none; margin: 0 0 1.5rem; width: max-content; } }

.link-list li { margin-bottom: .75em; }

/* ---------------------------------------------------------- contact card */

.contact-card {
    padding: 1.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: .95rem;
}
.contact-card__eyebrow { margin: 0; color: var(--slate-dark); font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.contact-card__name { margin: .1rem 0 .9rem; font-family: var(--font-serif); font-size: 1.4rem; color: var(--ink); }
.contact-card address { margin-bottom: 1rem; }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; }
.contact-card__hours { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); }

.contact-grid {
    display: grid; grid-template-columns: minmax(280px, 380px) 1fr;
    gap: clamp(2rem, 5vw, 3.5rem); align-items: start; margin-top: 2rem;
}
.page-contact .prose { max-width: none; }
.directions h2 { margin-top: 0; }
.directions__links { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- footer */

.site-footer { background: var(--ink); color: #c9d2de; font-size: .95rem; }
.site-footer a { color: #e6ebf1; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; padding-block: 3rem 2rem;
}
.site-footer__name { margin-top: 0; font-family: var(--font-serif); font-size: 1.2rem; color: #fff; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.site-footer__nav li { margin-bottom: .35em; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.25rem; font-size: .85rem; }
.site-footer__bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
