@import url('tokens.css');

/* ---------------------------------------------------------------
   Reset — minimal, opinionated. Modern browsers only.
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* Skip link — hidden until keyboard focus. */
.skip-link {
    position: absolute;
    top: -40px;
    left: var(--gutter);
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--color-dark);
    color: var(--color-white);
    font-size: var(--fs-sm);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* ---------------------------------------------------------------
   Document
   --------------------------------------------------------------- */
html, body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------
   Typography
   --------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--color-text);
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { max-width: var(--container-prose); }
p + p { margin-top: 1em; }

.eyebrow,
.label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.lead {
    font-size: var(--fs-md);
    color: var(--color-text-light);
    max-width: var(--container-prose);
}

a.link, .prose a {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 1px;
    transition: color var(--transition), border-color var(--transition);
}
a.link:hover, .prose a:hover {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-accent-dark);
}

/* ---------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--prose { max-width: calc(var(--container-prose) + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); }
.section--cream { background: var(--color-cream); }
.section--dark {
    background: var(--color-dark);
    color: var(--color-white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--color-white); }

.section__head {
    max-width: var(--container-prose);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section__head .eyebrow + h1,
.section__head .eyebrow + h2 { margin-top: 0.75rem; }
.section__head h2 + .lead,
.section__head h1 + .lead { margin-top: 1rem; }

/* ---------------------------------------------------------------
   Header + navigation
   Sticky translucent-white bar with backdrop blur — matches the
   landing-page nav Sandra already has in production.
   --------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(1.1) blur(10px);
    -webkit-backdrop-filter: saturate(1.1) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--color-border); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 64px;
}

.site-header__brand {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: 0.005em;
    color: var(--color-text);
}
.site-header__brand span { color: var(--color-text-light); font-weight: 400; }

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
}
.site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
}
.site-nav a {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-light);
    transition: color var(--transition);
    padding-block: 0.5rem;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--color-text); }
.site-nav a[aria-current="page"] {
    color: var(--color-text);
    border-bottom-color: var(--color-accent);
}

/* Mobile nav. */
.site-nav__toggle { display: none; }
@media (max-width: 840px) {
    .site-nav__toggle {
        display: inline-flex;
        width: 40px; height: 40px;
        align-items: center; justify-content: center;
        background: transparent; border: 0; cursor: pointer;
        color: var(--color-text);
    }
    .site-nav__list {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        background: var(--color-bg);
        border-top: 1px solid var(--color-border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem var(--gutter);
    }
    .site-nav__list a {
        display: block;
        padding-block: 0.75rem;
        border-bottom: 1px solid var(--color-border);
    }
    .site-nav[data-open="true"] .site-nav__list { display: flex; }
}

/* ---------------------------------------------------------------
   Buttons — filled-gray primary + bordered ghost.
   Matches .lp-btn-primary / .lp-btn-secondary on the landing pages.
   --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform 150ms;
}
.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
}
.btn--primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-white);
    transform: translateY(-1px);
}
.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--ghost:hover {
    border-color: var(--color-text);
    background: var(--color-cream);
}
.btn--on-dark {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.35);
}
.btn--on-dark:hover {
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.06);
}

/* Uppercase text link — the "PREISLISTE PER MAIL" pattern. */
.text-link {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-text);
    padding-bottom: 3px;
    transition: color var(--transition), border-color var(--transition);
}
.text-link:hover {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-accent-dark);
}

/* ---------------------------------------------------------------
   Hero — home-page text-only default. A full-bleed image hero
   (section--dark variant) is available for landing pages.
   --------------------------------------------------------------- */
.hero {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__headline {
    font-size: var(--fs-hero);
    max-width: 20ch;
    line-height: var(--lh-heading);
}
.hero__headline em {
    font-style: normal;
    color: var(--color-accent);
}
.hero__lead {
    margin-top: clamp(1.25rem, 2vw, 1.75rem);
    font-size: var(--fs-lg);
    color: var(--color-text-light);
    max-width: 52ch;
}
.hero__cta {
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------
   Portfolio gallery — CSS-columns masonry, progressive enhancement.
   --------------------------------------------------------------- */
.gallery {
    column-count: 1;
    column-gap: var(--gallery-gap);
}
@media (min-width: 640px)  { .gallery { column-count: 2; } }
@media (min-width: 1024px) { .gallery { column-count: 3; } }

.gallery__item {
    break-inside: avoid;
    margin-bottom: var(--gallery-gap);
}
.gallery__item img {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
    background: var(--color-cream);
    transition: transform var(--transition), opacity var(--transition);
}
.gallery__item a:hover img {
    transform: scale(1.015);
    opacity: 0.96;
}

.gallery__empty {
    padding: clamp(2rem, 5vw, 4rem) 0;
    text-align: center;
    color: var(--color-text-light);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
    margin-top: clamp(4rem, 8vw, 7rem);
    padding-block: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: var(--fs-sm);
}
.site-footer__inner {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .site-footer__inner {
        grid-template-columns: 2fr 1fr 1fr;
        align-items: start;
    }
}
.site-footer__brand {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--color-text);
}
.site-footer__tagline { margin-top: 0.5rem; max-width: 40ch; }
.site-footer h4 {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}
.site-footer ul { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer a { color: var(--color-text-light); transition: color var(--transition); }
.site-footer a:hover { color: var(--color-text); }
.site-footer__meta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-light);
    font-size: var(--fs-xs);
}

/* ---------------------------------------------------------------
   Prose — About, FAQ, legal pages
   --------------------------------------------------------------- */
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose p + p { margin-top: 1.25em; }
.prose ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-block: 1em;
}
.prose ul li + li { margin-top: 0.4em; }

/* ---------------------------------------------------------------
   Hero — full-width cover with overlaid text (Sandra landing-page pattern)
   --------------------------------------------------------------- */
.hero--cover {
    position: relative;
    min-height: min(100vh, 820px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-dark);
    overflow: hidden;
    padding: 0;
    color: var(--color-white);
}
.hero--cover .hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero--cover .hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero--cover .hero__bg-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3a3a3a 0%, #1a1a1a 100%);
    position: relative;
}
.hero--cover .hero__bg-placeholder > div {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.5rem 0.875rem;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.45);
    font-size: var(--fs-xs);
    text-align: right;
    max-width: 240px;
}
.hero--cover .hero__bg-placeholder small {
    display: block;
    margin-top: 0.15rem;
    opacity: 0.75;
}
.hero--cover .hero__band {
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.hero--cover .hero__band-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vh, 2.5rem) var(--gutter);
}
.hero--cover .eyebrow {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}
.hero--cover .hero__headline {
    color: var(--color-white);
    max-width: 28ch;
    margin: 0;
}
.hero--cover .hero__lead {
    color: rgba(255, 255, 255, 0.88);
    max-width: 60ch;
    margin: 0;
}
.hero--cover .hero__cta {
    margin-top: clamp(1.25rem, 2vw, 1.75rem);
}
.hero--cover .btn--primary {
    background: var(--color-white);
    color: var(--color-text);
}
.hero--cover .btn--primary:hover {
    background: var(--color-white);
    color: var(--color-accent-dark);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------------
   About (2-col: portrait + prose)
   --------------------------------------------------------------- */
.about__grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}
@media (min-width: 860px) {
    .about__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    }
}
.about__portrait {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
}
.about__portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.about__text h1 { margin-bottom: 0.5rem; }
.about__text .lead { margin-bottom: 1.5rem; color: var(--color-text-light); }

/* ---------------------------------------------------------------
   Home portfolio teaser
   --------------------------------------------------------------- */
.portfolio-teaser {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.portfolio-teaser__card {
    display: block;
    padding: 1.5rem;
    border: var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), transform var(--transition);
}
.portfolio-teaser__card:hover {
    border-color: var(--color-text);
    transform: translateY(-1px);
}
.portfolio-teaser__card h3 {
    font-size: var(--fs-lg);
    margin-bottom: 0.25rem;
    color: var(--color-text);
}
.portfolio-teaser__card p {
    color: var(--color-text-light);
    font-size: var(--fs-sm);
    margin: 0;
}

/* ---------------------------------------------------------------
   Placeholders — dashed outlines for images that will be supplied later.
   Visual cue so Carol can see where imagery is expected.
   --------------------------------------------------------------- */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--color-cream);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text-light);
}
.placeholder strong {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.01em;
}
.placeholder span { font-size: var(--fs-sm); }
.placeholder--portrait { aspect-ratio: 4 / 5; }
.placeholder--tile     { aspect-ratio: 3 / 2; min-height: 180px; }

.gallery--placeholder { margin-top: 1.5rem; }

/* ---------------------------------------------------------------
   Lightbox overlay — opens from gallery anchor clicks.
   --------------------------------------------------------------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.94);
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox__stage {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}
.lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.lightbox__caption {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-sm);
    text-align: center;
    max-width: 60ch;
}
.lightbox__caption[hidden] { display: none; }
.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms, border-color 150ms;
    font-family: inherit;
}
.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
}
.gallery__empty-note {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-cream);
    border-radius: var(--radius-md);
    color: var(--color-text);
}
.gallery__empty-note a { text-decoration: underline; }
