/* style.css */
@font-face {
    font-family: 'Karla';
    src: url('./Karla/Karla-VariableFont_wght.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: 'Karla';
    src: url('./Karla/Karla-Italic-VariableFont_wght.woff2') format('woff2');
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --bg: #fcf7f0;
    --surface: #fcf7f0;
    --text: #232323;
    --muted: #232323;
    --line: #d9dde3;
    --primary: #1f3a5f;
    --primary-hover: #17304f;
    --nav-panel-top: calc(100% + 0.45rem);
}

* {
    box-sizing: border-box;
}

html {
    background: #000000;
}

body {
    margin: 0;
    font-family: 'Karla', sans-serif;
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding-bottom: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2000;
    background: #ffffff;
    color: #000000;
    border: 3px solid #005fcc;
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-weight: 700;
    text-decoration: none;
    clip-path: inset(0 0 100% 0);
}

.skip-link:focus,
.skip-link:focus-visible {
    clip-path: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 4px;
}

main {
    flex: 1;
}

#main-content {
    scroll-margin-top: 96px;
}

.container {
    width: min(100% - 2rem, 1000px);
    margin: 0 auto;
}

.site-header {
    --header-bg: var(--surface);
    --header-fg: var(--text);
    --header-panel-bg: var(--surface);
    --header-panel-border: var(--line);
    --header-toggle-bg: #000000;
    --header-toggle-fg: #ffffff;
    background: var(--surface);
    border-bottom: 1px solid rgba(35, 35, 35, 0.12);
    color: var(--header-fg);
    position: sticky;
    top: 0;
    z-index: 1100;
    background-color: var(--header-bg);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
}

.brand a {
    display: inline-block;
}

.brand img {
    display: block;
    max-height: 56px;
    width: auto;
}

.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

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

.hamburger {
    position: relative;
    display: block;
    width: 40px;
    height: 4px;
    background: currentColor;
    border-radius: 999px;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 40px;
    height: 4px;
    background: currentColor;
    border-radius: 999px;
}

.hamburger::before {
    top: -12px;
}

.hamburger::after {
    top: 12px;
}

.main-nav.is-open .hamburger {
    background: transparent;
}

.main-nav.is-open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.main-nav.is-open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

.main-nav a {
    color: var(--header-fg);
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0.15rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
}

.main-nav a:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 2px;
}

.main-nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 2px;
}

.site-header.nav-compact .container {
    flex-wrap: nowrap;
    align-items: center;
}

.site-header.nav-compact .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0.75rem;
    border-radius: 6px;
}

.site-header.nav-compact .main-nav {
    width: auto;
    margin-left: auto;
    position: relative;
}

.site-header.nav-compact .main-nav > ul {
    flex-direction: column;
    gap: 0;
    width: min(92vw, 360px);
    margin-top: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--header-panel-border);
    border-radius: 10px;
    background: var(--header-panel-bg);
    position: absolute;
    right: 0;
    top: var(--nav-panel-top);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.js .site-header.nav-compact .main-nav > ul {
    display: none;
}

.js .site-header.nav-compact .main-nav.is-open > ul {
    display: flex;
}

.site-header.nav-compact .main-nav li {
    width: 100%;
}

.site-header.is-scrolled {
    --header-bg: #000000;
    --header-fg: #ffffff;
    --header-panel-bg: #000000;
    --header-panel-border: #333333;
    --header-toggle-bg: #ffffff;
    --header-toggle-fg: #000000;
    border-color: #333333;
}

.hero {
    background: var(--surface);
    border-bottom: none;
    padding: 4.5rem 0 3rem;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.hero-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    align-items: start;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.hero h1 {
    margin: 0 0 1.2rem;
    font-size: clamp(2.25rem, 8vw, 3.25rem);
    line-height: 1.2;
    max-width: none;
    text-align: left;
}

.hero p {
    max-width: none;
    color: var(--muted);
    margin: 0;
}


.hero-content p + p {
    margin-top: 1rem;
}

.hero-content .button {
    margin-top: 1.6rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.hero-content .button-row .button {
    margin-top: 0;
}

.hero-portrait {
    margin: 0;
    justify-self: end;
}

.hero-portrait img {
    display: block;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1067 / 1600;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: none;
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.18);
}

.button {
    display: inline-block;
    justify-self: start;
    background: #ffc1c1;
    color: var(--text);
    text-decoration: none;
    padding: 1rem 1.35rem;
    font-size: 1.15rem;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid currentColor;
    min-height: 44px;
}

.button:hover,
.button:focus-visible {
    background: var(--bg);
}

@media (max-width: 900px) {
    .hero-intro {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 0;
        align-items: center;
        text-align: center;
    }

    .hero h1 {
        text-align: center;
    }

    .hero p {
        max-width: 38ch;
    }

    .button {
        justify-self: center;
    }

    .button-row {
        justify-content: center;
    }

    .hero-portrait {
        justify-self: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-text h1,
    .about-text h2 {
        font-size: 2.75rem;
        text-align: center;
    }

    .about-image {
        order: 2;
        justify-self: center;
        width: 100%;
        max-width: 420px;
    }

    .about-image img {
        width: 100%;
    }
}

.section {
    padding: 1.6rem 0;
}

.about-section {
    padding: 3rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.25fr;
    align-items: center;
    gap: 2rem;
}

.about-text p {
    margin: 0;
    color: var(--muted);
}

.about-image {
    margin: 0;
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: none;
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.18);
}

.section h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.detail-header {
    background: var(--surface);
    border-bottom: none;
    padding: 2rem 0 1rem;
}

.detail-header h1 {
    margin: 0 0 0.6rem;
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    line-height: 1.2;
}

.detail-header p {
    margin: 0;
    max-width: 700px;
    color: var(--muted);
}

.detail-content {
    padding: 1rem 0 2.5rem;
}

.detail-content p {
    margin-top: 0;
    color: var(--muted);
}

.readable-article p {
    max-width: 68ch;
}

.detail-content article {
    max-width: 760px;
}

.detail-content article h2 {
    margin: 1.8rem 0 0.55rem;
}

.detail-content article h2:first-child {
    margin-top: 0;
}

.site-footer {
    background: #000000;
    border-top: none;
    color: #ffffff;
    padding: 1.5rem 0;
    font-size: 0.95rem;
}

.site-footer .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.site-footer p {
    margin: 0.2rem 0;
    color: #ffffff;
}

.site-footer p:first-child {
    justify-self: start;
    text-align: left;
}

.footer-contact,
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0;
    row-gap: 0.35rem;
}

.footer-contact {
    justify-self: center;
    text-align: center;
}

.footer-legal {
    justify-self: end;
    justify-content: flex-end;
    text-align: right;
}

.footer-contact > *,
.footer-legal > * {
    display: inline-flex;
    align-items: center;
}

.footer-contact > * + *,
.footer-legal > * + * {
    padding-left: 0;
}

.footer-contact > * + *::before,
.footer-legal > * + *::before {
    content: "|";
    margin: 0 0.45rem;
    color: #ffffff;
}

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

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

@media (max-width: 700px) {
    .site-footer .container {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .site-footer p:first-child,
    .footer-contact,
    .footer-legal {
        justify-self: center;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 700px) {
    .site-header .container {
        flex-wrap: nowrap;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 0.75rem;
        border-radius: 6px;
    }

    .main-nav {
        width: auto;
        margin-left: auto;
        position: relative;
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0.35rem;
        width: min(92vw, 360px);
        margin-top: 0;
        padding: 0.85rem 0.9rem;
        border: 1px solid var(--header-panel-border);
        border-radius: 10px;
        background: var(--header-panel-bg);
        position: absolute;
        right: 0;
        top: var(--nav-panel-top);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    }

    .js .main-nav > ul {
        display: none;
    }

    .js .main-nav.is-open > ul {
        display: flex;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav > ul > li > a {
        display: block;
        width: 100%;
        padding: 0.65rem 0;
        font-size: 1.28rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-text h2 {
        font-size: 2.75rem;
        text-align: center;
    }

    .about-image {
        order: 2;
        justify-self: center;
        width: 100%;
        max-width: 420px;
    }

    .about-image img {
        width: 100%;
    }

}
