/* =========================================================================
   Janosch & Friends AG - Main stylesheet
   Structure:
   1. Design tokens
   2. Base / reset
   3. Layout helpers
   4. Header & navigation
   5. Hero section
   6. Challenge section (light cyan)
   7. Solution section
   8. Contact section
   9. Legal / text pages
   10. Footer
   11. Responsive breakpoints
   12. Accessibility & print
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
    /* Brand colours — sampled directly from the client's design file
       (Medium_1x.pdf). The source design uses a single brand teal for the
       logo, headings, body copy, buttons and footer; #93cddc is the pale
       accent used inside the capability icons. */
    --color-teal-900: #225f67;   /* brand teal: headings, footer, logo */
    --color-teal-700: #1a4850;   /* computed darker shade for link/button hover */
    --color-teal-500: #93cddc;   /* pale accent, matches the capability icon strokes */
    --color-cyan-200: #e5fcff;   /* watercolour section background (exact match) */
    --color-cyan-100: #e4f7fa;   /* soft background tint (contact section, not in source) */
    --color-ink: #225f67;        /* body copy — the source uses the same teal throughout */
    --color-ink-muted: #225f67;  /* captions/footnotes; opacity carries the hierarchy instead of hue */
    --color-surface: #ffffff;
    --color-surface-muted: #faf9f5; /* capability panel background (exact match) */
    --color-border: #d7e6e8;
    --color-focus: #0b3f46;

    /* Typography
       Confirmed from the client's design file (Medium_1x.pdf): Montserrat
       Bold + Regular. Self-hosted .woff2 files can be dropped into
       /assets/fonts and enabled via the @font-face block below (no external
       CDN / Google Fonts call, so no third-party requests or GDPR issue). */
    --font-display: "Montserrat", "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Montserrat", "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Type scale (fluid) */
    --size-hero: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
    --size-h2: clamp(1.6rem, 1.1rem + 2vw, 2.5rem);
    --size-h3: clamp(1.1rem, 0.95rem + 0.6vw, 1.35rem);
    --size-lead: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
    --size-body: 1.0625rem;
    --size-small: 0.875rem;

    /* Spacing */
    --space-2xs: 0.375rem;
    --space-xs: 0.75rem;
    --space-sm: 1.25rem;
    --space-md: 2rem;
    --space-lg: 3.5rem;
    --space-xl: 5.5rem;

    /* Layout */
    --container-width: 76rem;
    --container-gutter: clamp(1.25rem, 4vw, 3rem);
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 40px -24px rgba(18, 84, 92, 0.45);
}

/* Self-hosted fonts: place the files in /assets/fonts and remove the comment.
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
*/

/* -------------------------------------------------------------------------
   2. Base / reset
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Offset for the sticky header when jumping to #anchors */
    scroll-padding-top: 6rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--color-surface);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--size-body);
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: var(--color-teal-700);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--color-teal-900);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--color-teal-900);
    line-height: 1.2;
    margin: 0 0 var(--space-xs);
    text-wrap: balance;
}

p {
    margin: 0 0 var(--space-sm);
    max-width: 62ch;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

strong {
    font-weight: 700;
    color: var(--color-teal-900);
}

/* -------------------------------------------------------------------------
   3. Layout helpers
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

.section {
    padding-block: var(--space-xl);
    position: relative;
}

.section--tint {
    background-color: var(--color-cyan-200);
}

.section--muted {
    background-color: var(--color-cyan-100);
}

.section__head {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section__title {
    font-size: var(--size-h2);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.section__subtitle {
    font-size: var(--size-lead);
    text-transform: uppercase;
    color: var(--color-ink);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0;
    max-width: none;
}

.center {
    text-align: center;
}

.logo-eu {
    max-width: 320px;
    display: inline-block;
}

@media screen and (min-width: 640px) {
    .logo-eu {
        max-width: 520px;
        display: inline-block;
    }
}

.section__head--left {
    text-align: left;
}

/* Watercolour brush edges framing the tinted section — cropped directly
   from the client's design file, so the colours are an exact match and
   need no separate background-color fallback. */
.brush-edge {
    display: block;
    width: 100%;
    height: auto;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.7em 1.6em;
    border-radius: var(--radius-sm);
    background-color: var(--color-teal-900);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background-color: var(--color-teal-700);
    color: #fff;
    transform: translateY(-1px);
}

.button--ghost {
    background-color: transparent;
    color: var(--color-teal-900);
    border: 2px solid var(--color-teal-900);
}

.button--ghost:hover {
    background-color: var(--color-teal-900);
    color: #fff;
}

/* -------------------------------------------------------------------------
   4. Header & navigation
   ------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid transparent;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding-block: var(--space-sm);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
}

.brand__logo {
    width: 46px;
    height: auto;
    flex-shrink: 0;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-teal-900);
    display: block;
    line-height: 1.3;
}

.brand__claim {
    font-size: var(--size-small);
    color: var(--color-ink);
    display: block;
    line-height: 1.3;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.75rem);
    flex-wrap: wrap;
}

.site-nav__link {
    font-family: var(--font-display);
    font-size: var(--size-small);
    font-weight: 700;
    color: var(--color-teal-900);
    text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
    text-decoration: underline;
}

/* Language switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--size-small);
    font-weight: 700;
}

.lang-switch__item[aria-current="true"] {
    color: var(--color-ink-muted);
    opacity: 0.6;
    text-decoration: none;
    pointer-events: none;
}

.lang-switch__divider {
    color: var(--color-border);
}

/* -------------------------------------------------------------------------
   5. Hero section
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-block: var(--space-lg) var(--space-xl);
}

.hero__title {
    font-size: var(--size-hero);
    font-weight: 700;
    margin-bottom: 0.2em;
}

.hero__subtitle {
    font-size: var(--size-lead);
    color: var(--color-ink);
    margin-bottom: var(--space-lg);
    max-width: 40ch;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
}

.feature-list {
    display: grid;
    gap: 0.9rem;
    margin-bottom: var(--space-sm);
}

.feature-list__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.35rem);
    color: var(--color-ink);
}

.feature-list__check {
    flex-shrink: 0;
    color: var(--color-teal-900);
    font-weight: 700;
    font-size: 1.1em;
    margin-right: 0.6em;
}

.hero__footnote {
    font-size: 0.78rem;
    color: var(--color-ink-muted);
    opacity: 0.65;
    padding-left: 2.4rem;
    max-width: 34ch;
    line-height: 1.4;
}

.hero__media {
    margin: 0;
}

.hero__media img {
    width: 100%;
    border-radius: var(--radius-md);
}

/* -------------------------------------------------------------------------
   6. Challenge section
   ------------------------------------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.split__media img {
    width: 100%;
}

.problem-list {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.problem-list__item {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    column-gap: 0.9rem;
}

.problem-list__marker {
    font-size: 1.6rem;
    line-height: 1;
    color: var(--color-teal-900);
    font-weight: 400;
    grid-row: span 2;
    text-align: center;
}

.problem-list__title {
    font-size: var(--size-h3);
    font-weight: 700;
    margin: 0 0 0.2em;
}

.problem-list__text {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
}

/* -------------------------------------------------------------------------
   7. Solution section
   ------------------------------------------------------------------------- */
.solution__lead {
    font-size: var(--size-lead);
    max-width: 68ch;
    margin-bottom: var(--space-md);
}

.capability-panel {
    background-color: var(--color-surface-muted);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 3vw, 2.75rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.capability {
    display: grid;
    grid-template-columns: 3rem 1fr;
    column-gap: 1rem;
    align-items: start;
}

.capability__icon {
    width: 3rem;
    height: 3rem;
    grid-row: span 2;
    object-fit: contain;
    object-position: left top;
}

.capability__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.15em;
}

.capability__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* -------------------------------------------------------------------------
   8. Contact section
   ------------------------------------------------------------------------- */
.contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: var(--shadow-soft);
}

.contact-details {
    display: grid;
    gap: var(--space-xs);
    font-style: normal;
}

.contact-details__row {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.5rem;
    align-items: baseline;
}

.contact-details__label {
    font-weight: 700;
    color: var(--color-teal-900);
    font-size: var(--size-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------
   9. Legal / text pages
   ------------------------------------------------------------------------- */
.page-header {
    background-color: var(--color-cyan-100);
    padding-block: var(--space-lg);
}

.page-header__title {
    font-size: var(--size-h2);
    margin-bottom: 0.2em;
}

.page-header__intro {
    margin: 0;
    color: var(--color-ink);
}

.prose h2 {
    font-size: var(--size-h3);
    margin-top: var(--space-md);
    text-transform: none;
}

.prose h3 {
    font-size: 1.05rem;
    margin-top: var(--space-sm);
}

.prose ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: var(--space-sm);
    max-width: 62ch;
}

.prose li {
    margin-bottom: 0.35rem;
}

.breadcrumb {
    font-size: var(--size-small);
    color: var(--color-ink-muted);
    opacity: 0.65;
    margin-bottom: var(--space-xs);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* -------------------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-teal-900);
    color: #dff2f4;
    padding-block: var(--space-md);
    text-align: center;
    font-size: var(--size-small);
}

.site-footer p {
    margin: 0 auto;
    max-width: none;
}

.site-footer a {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer a:hover {
    color: var(--color-cyan-200);
}

.footer-lang {
    margin-top: var(--space-xs) !important;
    font-weight: 700;
}

.footer-lang a {
    text-decoration: none;
}

.footer-lang a:hover {
    text-decoration: underline;
}

.footer-lang a[aria-current="true"] {
    color: var(--color-cyan-200);
    pointer-events: none;
}

/* -------------------------------------------------------------------------
   11. Responsive breakpoints
   ------------------------------------------------------------------------- */
@media (max-width: 62rem) {
    .hero__grid,
    .split,
    .contact-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__media {
        order: -1;
    }

    .split__media {
        max-width: 30rem;
        margin-inline: auto;
    }
}

@media (max-width: 48rem) {
    :root {
        --space-xl: 3.5rem;
        --space-lg: 2.5rem;
    }

    .site-header__inner {
        justify-content: center;
        text-align: center;
    }

    .capability-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-details__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .hero__footnote {
        padding-left: 0;
    }
}

@media (max-width: 30rem) {
    .brand__claim {
        display: none;
    }

    .capability {
        grid-template-columns: 2.5rem 1fr;
    }

    .capability__icon {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* -------------------------------------------------------------------------
   12. Accessibility & print
   ------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-teal-900);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

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

/* Visually hidden but available to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

@media print {
    .site-header,
    .brush-edge,
    .button {
        display: none;
    }

    body {
        color: #000;
    }
}
