/* =========================================================
   Tilitoimisto Ariluoma Oy
   Heritage + Trust design system
   ========================================================= */

:root {
    --bg: #FEFEFE;
    --bg-warm: #F9F7F4;
    --bg-elev: #FFFFFF;
    --dark: #1A2E1A;
    --accent: #2D6A4F;
    --accent-hover: #245642;
    --accent-light: #E8F5E9;
    --gold: #B8860B;
    --gold-light: #FFF8E1;
    --text: #2C2C2C;
    --text-muted: #6B6B6B;
    --text-inverse: #FEFEFE;
    --border: #E8E4DF;
    --border-strong: #D4CEC5;
    --shadow-sm: 0 1px 2px rgba(26, 46, 26, 0.04), 0 1px 3px rgba(26, 46, 26, 0.06);
    --shadow: 0 4px 20px -8px rgba(26, 46, 26, 0.12), 0 2px 6px rgba(26, 46, 26, 0.06);
    --shadow-lg: 0 20px 40px -12px rgba(26, 46, 26, 0.18), 0 8px 16px rgba(26, 46, 26, 0.08);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 16px;
    --container: 1200px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 320ms var(--ease-out);
    --header-h: 76px;
}

:root[data-theme="dark"] {
    --bg: #0F1A12;
    --bg-warm: #141F16;
    --bg-elev: #1B2A1E;
    --dark: #E8EFE4;
    --accent: #52B788;
    --accent-hover: #6FD49E;
    --accent-light: #1F3A2C;
    --gold: #E0B84F;
    --gold-light: #2A2416;
    --text: #E8EFE4;
    --text-muted: #9FAE9F;
    --text-inverse: #0F1A12;
    --border: #2A3A2D;
    --border-strong: #3A4D3D;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

*::selection {
    background: var(--accent);
    color: var(--text-inverse);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 400ms var(--ease), color 400ms var(--ease);
}

h1, h2, h3, h4 {
    font-family: "Libre Baskerville", Georgia, serif;
    color: var(--dark);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.0625rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: "Source Sans 3", sans-serif; font-weight: 600; }

p { color: var(--text); margin-bottom: 1rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

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

/* ---------- Layout ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 96px 0; position: relative; }
@media (max-width: 768px) { section { padding: 64px 0; } }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dark);
    color: var(--text-inverse);
    padding: 10px 16px;
    z-index: 10000;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; color: var(--text-inverse); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(254, 254, 254, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

:root[data-theme="dark"] .site-header {
    background: rgba(15, 26, 18, 0.82);
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    font-weight: 700;
}
.brand:hover { color: var(--dark); }

.brand-mark {
    color: var(--accent);
    transition: transform 400ms var(--ease-out);
}
.brand:hover .brand-mark {
    transform: rotate(-8deg) scale(1.05);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}
.brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-nav > ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

.site-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.975rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: color var(--transition), background var(--transition);
}
.site-nav a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 1.5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms var(--ease-out);
}
.site-nav a:hover { color: var(--accent); }
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--accent); }

.nav-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.lang-switch a {
    color: var(--text-muted);
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}
.lang-switch a.active { color: var(--accent); }
.lang-switch a:hover { color: var(--accent); }

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(15deg);
}
.theme-toggle svg {
    position: absolute;
    transition: transform 500ms var(--ease-out), opacity 300ms var(--ease);
}
.icon-sun { transform: scale(1) rotate(0deg); opacity: 0; }
.icon-moon { transform: scale(1) rotate(0deg); opacity: 1; }
:root[data-theme="dark"] .icon-sun { opacity: 1; }
:root[data-theme="dark"] .icon-moon { opacity: 0; transform: scale(0.5) rotate(-90deg); }
:root:not([data-theme="dark"]) .icon-sun { opacity: 0; transform: scale(0.5) rotate(90deg); }
:root:not([data-theme="dark"]) .icon-moon { opacity: 1; }

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.nav-toggle span {
    width: 22px;
    height: 1.8px;
    background: var(--text);
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: var(--bg);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 32px 24px;
        gap: 24px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition), transform var(--transition);
        border-top: 1px solid var(--border);
    }
    .site-nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .site-nav > ul {
        flex-direction: column;
        gap: 4px;
    }
    .site-nav a { font-size: 1.1rem; padding: 12px 14px; }
    .nav-tools {
        border: none;
        padding: 16px 0 0 0;
        border-top: 1px solid var(--border);
        justify-content: space-between;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 0.975rem;
    letter-spacing: 0.01em;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-lg { padding: 16px 32px; font-size: 1rem; }

.btn-primary {
    background: var(--dark);
    color: var(--text-inverse);
    border-color: var(--dark);
}
.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverse);
    box-shadow: 0 10px 30px -10px var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--dark);
    border-color: var(--border-strong);
}
.btn-ghost:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: var(--text-inverse);
    box-shadow: 0 10px 30px -10px var(--accent);
}

.btn-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-link::after {
    content: '→';
    transition: transform var(--transition);
}
.btn-link:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
    background: var(--bg-warm);
    padding: clamp(80px, 10vw, 140px) 0 clamp(80px, 10vw, 120px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 24px,
        rgba(45, 106, 79, 0.025) 24px,
        rgba(45, 106, 79, 0.025) 25px
    );
    z-index: -1;
}
:root[data-theme="dark"] .hero::before {
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 24px,
        rgba(82, 183, 136, 0.04) 24px,
        rgba(82, 183, 136, 0.04) 25px
    );
}
.hero::after {
    content: '';
    position: absolute;
    top: -200px;
    right: -180px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 65%);
    opacity: 0.65;
    z-index: -1;
    animation: floatBlob 14s ease-in-out infinite alternate;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, 40px) scale(1.08); }
}

.hero-inner {
    max-width: 860px;
    text-align: center;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    background: var(--gold-light);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 36px;
    font-family: "Source Sans 3", sans-serif;
    animation: fadeInDown 800ms var(--ease-out) both;
}
.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.55);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(184, 134, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0); }
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.12;
    animation: fadeInUp 900ms var(--ease-out) 120ms both;
}

.hero-subtitle {
    font-family: "Libre Baskerville", Georgia, serif;
    font-style: italic;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    color: var(--accent);
    max-width: 680px;
    margin: 0 auto 48px;
    line-height: 1.55;
    animation: fadeInUp 900ms var(--ease-out) 240ms both;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 72px;
    animation: fadeInUp 900ms var(--ease-out) 360ms both;
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    max-width: 720px;
    margin: 0 auto;
    animation: fadeIn 1000ms var(--ease-out) 560ms both;
}
.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}
.hero-trust-item::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Section headings ---------- */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.eyebrow::before {
    content: '— ';
}
.eyebrow::after {
    content: ' —';
}
.section-title {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    margin-bottom: 20px;
}
.section-intro {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.75;
}

/* ---------- Services Grid ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.service-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: transform 500ms var(--ease-out), border-color var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 4px; height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 400ms var(--ease-out);
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleY(1); }

.service-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform var(--transition);
}
.service-card:hover .service-icon {
    transform: rotate(-6deg) scale(1.06);
}
.service-title {
    font-family: "Libre Baskerville", serif;
    font-size: 1.375rem;
    margin-bottom: 12px;
    color: var(--dark);
}
.service-desc {
    color: var(--text-muted);
    font-size: 0.975rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ---------- Trust Section ---------- */
.trust-section {
    background: var(--bg);
    padding: 80px 0;
}
.trust-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1000px;
    margin: 48px auto 0;
}
.trust-item {
    text-align: center;
    padding: 20px 16px;
    border-right: 1px solid var(--border);
    transition: transform var(--transition);
}
.trust-item:last-child { border-right: none; }
.trust-item:hover { transform: translateY(-4px); }

.trust-num {
    font-family: "Libre Baskerville", serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
    display: inline-block;
}
.trust-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
}
@media (max-width: 720px) {
    .trust-row { grid-template-columns: repeat(2, 1fr); }
    .trust-item:nth-child(2) { border-right: none; }
    .trust-item:nth-child(1), .trust-item:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ---------- Pricing ---------- */
.pricing-section { background: var(--bg-warm); }

.pricing-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}
.pricing-toggle {
    display: inline-flex;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.pricing-toggle button {
    border: none;
    background: transparent;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.925rem;
    color: var(--text-muted);
    transition: color 300ms var(--ease);
    position: relative;
    z-index: 1;
}
.pricing-toggle button.active { color: var(--text-inverse); }
.pricing-toggle .pill {
    position: absolute;
    top: 5px; bottom: 5px;
    background: var(--accent);
    border-radius: 999px;
    transition: all 380ms var(--ease-out);
    z-index: 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
@media (max-width: 960px) { .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; } }

.pricing-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
}
.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.pricing-card.featured {
    border: 2px solid var(--accent);
    transform: scale(1.02);
}
.pricing-card.featured:hover { transform: scale(1.02) translateY(-6px); }

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-inverse);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pricing-name {
    font-family: "Libre Baskerville", serif;
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 6px;
}
.pricing-sub {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 24px;
    min-height: 3em;
}
.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.pricing-from {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.pricing-amount {
    font-family: "Libre Baskerville", serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    transition: all 400ms var(--ease-out);
}
.pricing-unit {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    flex: 1;
}
.pricing-features li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.975rem;
    color: var(--text);
    line-height: 1.5;
}
.pricing-features li::before {
    content: '';
    flex-shrink: 0;
    width: 20px; height: 20px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--accent-light) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D6A4F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat;
}

.pricing-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.925rem;
    max-width: 720px;
    margin: 0 auto;
}

.legal-note {
    margin: 64px auto 0;
    max-width: 860px;
    padding: 24px 28px;
    border-left: 3px solid var(--gold);
    background: var(--gold-light);
    color: var(--text-muted);
    font-size: 0.925rem;
    border-radius: var(--radius-sm);
}

/* ---------- Services accordion ---------- */
.accordion { max-width: 860px; margin: 0 auto; }
.accordion-item {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.accordion-item:first-child { border-top: 1px solid var(--border); }

.accordion-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
    background: transparent;
    border: none;
    font-family: "Libre Baskerville", serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    text-align: left;
    transition: color var(--transition);
}
.accordion-head:hover { color: var(--accent); }

.accordion-head .icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: transform 400ms var(--ease-out), background var(--transition), border-color var(--transition);
    position: relative;
}
.accordion-head .icon::before,
.accordion-head .icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 400ms var(--ease-out), opacity var(--transition);
}
.accordion-head .icon::before {
    width: 12px; height: 1.6px;
}
.accordion-head .icon::after {
    width: 1.6px; height: 12px;
}
.accordion-item.open .accordion-head .icon {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverse);
    transform: rotate(90deg);
}
.accordion-item.open .accordion-head .icon::after { opacity: 0; transform: rotate(90deg); }

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 500ms var(--ease-out);
}
.accordion-item.open .accordion-body {
    max-height: 500px;
}
.accordion-inner {
    padding: 4px 0 32px 0;
    max-width: 720px;
    color: var(--text-muted);
}
.accordion-inner p { font-size: 1.05rem; line-height: 1.8; }
.accordion-inner ul {
    list-style: none;
    margin: 16px 0 20px;
    display: grid;
    gap: 8px;
}
.accordion-inner ul li {
    display: flex;
    gap: 12px;
    color: var(--text);
    font-size: 0.975rem;
}
.accordion-inner ul li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Timeline ---------- */
.timeline {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0; bottom: 0;
    width: 1.5px;
    background: var(--border);
}
.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    padding: 24px 0;
    position: relative;
}
.timeline-year {
    font-family: "Libre Baskerville", serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gold);
    padding-right: 24px;
    text-align: right;
}
.timeline-dot {
    position: absolute;
    left: 113px;
    top: 34px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 2.5px solid var(--accent);
    transition: transform var(--transition), box-shadow var(--transition);
}
.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px var(--accent-light);
}
.timeline-content { padding-left: 16px; }
.timeline-title {
    font-family: "Libre Baskerville", serif;
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 8px;
}
.timeline-desc { color: var(--text-muted); font-size: 1rem; }

@media (max-width: 600px) {
    .timeline::before { left: 8px; }
    .timeline-item { grid-template-columns: 1fr; gap: 8px; padding-left: 36px; }
    .timeline-year { text-align: left; padding: 0; }
    .timeline-dot { left: 1px; top: 32px; }
    .timeline-content { padding-left: 0; }
}

/* ---------- Values ---------- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}
@media (max-width: 780px) { .values-grid { grid-template-columns: 1fr; } }

.value-card {
    padding: 36px 28px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.value-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.value-icon {
    font-family: "Libre Baskerville", serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 16px;
    display: inline-flex;
    width: 64px; height: 64px;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: transform 400ms var(--ease-out);
}
.value-card:hover .value-icon {
    transform: rotate(-8deg) scale(1.08);
}

/* ---------- Team placeholder ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}
@media (max-width: 780px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
    text-align: center;
    padding: 32px 20px;
}
.team-avatar {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-warm) 100%);
    border: 1px solid var(--border);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-family: "Libre Baskerville", serif;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: transform 500ms var(--ease-out);
}
.team-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 50%);
}
.team-card:hover .team-avatar { transform: scale(1.05) translateY(-4px); }
.team-name {
    font-family: "Libre Baskerville", serif;
    font-size: 1.125rem;
    color: var(--dark);
    margin-bottom: 4px;
}
.team-role {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
    background: var(--bg-elev);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group {
    margin-bottom: 20px;
    position: relative;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: 0.04em;
}
.form-group label .req { color: var(--gold); }

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
textarea.form-control {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.975rem;
    border-left: 4px solid;
}
.form-alert.success {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}
.form-alert.error {
    background: #fdecea;
    border-color: #c0392b;
    color: #8b2d22;
}
:root[data-theme="dark"] .form-alert.error {
    background: #3a1f1c;
    color: #f5b7b1;
}

.contact-info {
    background: #1A2E1A;
    color: #FEFEFE;
    padding: 40px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.contact-info::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(184, 134, 11, 0.15), transparent 50%);
    pointer-events: none;
}
.contact-info > * { position: relative; z-index: 1; }
.contact-info h3 {
    color: #FEFEFE;
    margin-bottom: 28px;
    font-family: "Libre Baskerville", serif;
}
.contact-info .info-block {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.contact-info .info-block:last-child { border-bottom: none; }
.contact-info .info-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 4px;
}
.contact-info .info-value {
    font-size: 1.05rem;
    color: #FEFEFE;
    font-weight: 500;
    line-height: 1.5;
}
.contact-info a { color: #FEFEFE; }
.contact-info a:hover { color: #E0B84F; }

.map-wrap {
    margin-top: 56px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 440px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.9); transition: filter var(--transition); }
.map-wrap:hover iframe { filter: saturate(1); }
:root[data-theme="dark"] .map-wrap iframe { filter: invert(0.9) hue-rotate(180deg) saturate(0.6); }

/* ---------- Legal pages ---------- */
.page-head {
    background: var(--bg-warm);
    padding: 100px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 24px,
        rgba(45, 106, 79, 0.025) 24px,
        rgba(45, 106, 79, 0.025) 25px
    );
}
:root[data-theme="dark"] .page-head::before {
    background-image: repeating-linear-gradient(
        135deg,
        transparent 0,
        transparent 24px,
        rgba(82, 183, 136, 0.04) 24px,
        rgba(82, 183, 136, 0.04) 25px
    );
}
.page-head > .container { position: relative; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.page-head p { max-width: 720px; margin: 0 auto; color: var(--text-muted); font-size: 1.125rem; }

.prose {
    max-width: 760px;
    margin: 0 auto;
}
.prose h2 {
    font-size: 1.5rem;
    margin: 40px 0 14px;
    color: var(--dark);
}
.prose h2:first-child { margin-top: 0; }
.prose p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

/* ---------- CTA bottom ---------- */
.cta-bottom {
    background: #1A2E1A;
    color: #FEFEFE;
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-bottom::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(184, 134, 11, 0.18), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(45, 106, 79, 0.35), transparent 45%);
    pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-title {
    font-family: "Libre Baskerville", serif;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    color: #FEFEFE;
    margin-bottom: 20px;
    line-height: 1.2;
}
.cta-sub {
    color: rgba(255, 255, 255, 0.85);
    max-width: 620px;
    margin: 0 auto 36px;
    font-size: 1.125rem;
}
.cta-bottom .btn-primary {
    background: #B8860B;
    border-color: #B8860B;
    color: #1A2E1A;
    font-weight: 700;
}
.cta-bottom .btn-primary:hover {
    background: #d6a220;
    border-color: #d6a220;
    color: #1A2E1A;
    box-shadow: 0 10px 30px -8px rgba(184, 134, 11, 0.55);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-warm);
    border-top: 1px solid var(--border);
    padding: 72px 0 32px;
    color: var(--text-muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand-inner { color: var(--dark); }
.footer-tagline {
    margin-top: 16px;
    max-width: 300px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-col h4 {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    color: var(--dark);
    margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col li { font-size: 0.95rem; color: var(--text-muted); }

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.error-page {
    min-height: calc(100vh - var(--header-h));
    display: grid;
    place-items: center;
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-warm);
}
.error-code {
    font-family: "Libre Baskerville", serif;
    font-size: clamp(6rem, 18vw, 12rem);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: clamp(16px, 3vw, 32px);
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 32px));
    z-index: 1000;
    pointer-events: none;
}
.cookie-consent[hidden] { display: none; }

.cookie-consent-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 18px;
    padding: 22px 24px;
    background: var(--bg-elev);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(120%) scale(0.98);
    transition:
        opacity 480ms var(--ease-out),
        transform 560ms var(--ease-out);
    will-change: opacity, transform;
}

.cookie-consent.is-visible .cookie-consent-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cookie-consent-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.cookie-consent-body { min-width: 0; }

.cookie-consent-title {
    font-family: "Libre Baskerville", serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.cookie-consent-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.cookie-consent-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.cookie-consent-link:hover { color: var(--accent-hover); }

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cookie-btn { padding: 10px 20px; font-size: 0.875rem; }

.cookie-consent-close {
    appearance: none;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 200ms var(--ease), color 200ms var(--ease);
    flex-shrink: 0;
}
.cookie-consent-close:hover {
    background: var(--bg-warm);
    color: var(--dark);
}

@media (max-width: 600px) {
    .cookie-consent { bottom: 12px; width: calc(100vw - 20px); }
    .cookie-consent-card {
        grid-template-columns: 1fr auto;
        padding: 18px 18px 20px;
        gap: 12px;
    }
    .cookie-consent-icon { display: none; }
    .cookie-consent-actions { flex-direction: column-reverse; }
    .cookie-consent-actions .cookie-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-card {
        transition: opacity 1ms linear;
        transform: none;
    }
}
