/*
  Zabal Website
  File: assets/css/site.css
  Purpose: Core visual language for the Zabal institutional homepage
  Version: 0.3.3
  Theme: Centered Slate Observatory Layout
*/

/* ================================
   Root Theme
================================ */

:root {
    --bg-deep: #101820;
    --bg-deeper: #0d151c;
    --bg-panel: #17232e;
    --bg-soft: #243647;

    --text-main: #f2f0e6;
    --text-muted: #c8d0d6;

    --accent-soft: #a68a4c;
    --accent-warm: #c3a45e;

    --line-soft: rgba(242, 240, 230, 0.16);
    --panel-border: rgba(242, 240, 230, 0.14);

    --max-width: 1120px;

    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body:
        "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

/* ================================
   Base Reset
================================ */

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top left,
            rgba(36, 54, 71, 0.34),
            transparent 34rem
        ),
        radial-gradient(
            circle at bottom right,
            rgba(166, 138, 76, 0.13),
            transparent 32rem
        ),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deeper) 100%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

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

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-warm);
    outline-offset: 0.25rem;
}

/* ================================
   Page Shell
================================ */

.site-header,
.site-main,
.site-footer {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
}

/* ================================
   Typography
================================ */

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3,
.brand-name {
    color: var(--text-main);
}

.hero h1,
.section h2 {
    font-family: var(--font-display);
    font-weight: 700;
}

.hero h1 {
    max-width: 980px;
    margin-inline: auto;
    margin-bottom: 0;
    font-size: clamp(3.4rem, 9vw, 7.8rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.section h2 {
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.card h3 {
    margin-bottom: 0.75rem;
    color: var(--accent-warm);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ================================
   Header
================================ */

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line-soft);
    text-align: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.brand-seal {
    width: 3.2rem;
    height: 3.2rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    gap: 0.1rem;
}

.brand-name {
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.1;
    text-transform: uppercase;
}

.brand-role {
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.site-nav a {
    text-decoration: none;
    transition: color 160ms ease;
}

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

/* ================================
   Hero Section
================================ */

.hero {
    min-height: 72vh;
    display: grid;
    align-items: center;
    padding: 4rem 0;
    text-align: center;
}

.hero > div {
    margin-inline: auto;
}

.hero-kicker {
    margin-bottom: 1rem;
    color: var(--accent-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-intro {
    max-width: 700px;
    margin: 1.5rem auto 0;
    color: var(--text-muted);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ================================
   Buttons
================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0 1.2rem;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.button.primary {
    background: var(--text-main);
    color: var(--bg-deep);
    border-color: var(--text-main);
}

.button.secondary {
    color: var(--text-main);
}

.button:hover {
    transform: translateY(-1px);
}

.button.secondary:hover {
    border-color: var(--accent-warm);
}

/* ================================
   Sections
================================ */

.section {
    padding: 3rem 0;
    border-top: 1px solid var(--line-soft);
    text-align: center;
}

.section-lede {
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 1.06rem;
}

/* ================================
   Cards
================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    min-height: 220px;
    padding: 1.4rem;
    background: rgba(23, 35, 46, 0.88);
    border: 1px solid var(--panel-border);
    border-radius: 1.2rem;
    text-align: center;
}

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

/* ================================
   Footer
================================ */

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer p {
    margin-bottom: 0;
}

/* ================================
   Small Screens
================================ */

@media (max-width: 760px) {
    .site-header {
        gap: 1rem;
    }

    .brand-link {
        flex-direction: column;
        gap: 0.65rem;
    }

    .brand-seal {
        width: 3.6rem;
        height: 3.6rem;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .hero {
        min-height: 68vh;
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

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