:root {
    --petrol: #16383b;
    --petrol-deep: #0e2628;
    --terra: #9e4f2b;
    --terra-hover: #833f20;
    --limestone: #f5efe4;
    --sand: #ebe2d2;
    --paper: #faf7f1;
    --ink: #1b2423;
    --muted: #5a6461;
    --line: #d6cbb8;
    --line-strong: #b4a790;
    --header: 76px;
    --wrap: 1140px;
    --serif: "Libre Baskerville", Georgia, serif;
    --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--limestone);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--petrol-deep);
    margin: 0 0 0.55em;
}

h1 { font-size: clamp(2.15rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 2.7vw, 2.35rem); }
h3 { font-size: 1.25rem; }
h4 {
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 600;
    margin: 0 0 0.2em;
}

p { margin: 0 0 1em; }

.wrap {
    width: min(var(--wrap), calc(100% - 48px));
    margin: 0 auto;
}

/* Utility top bar */
.utility-bar {
    background: var(--petrol-deep);
    color: #cdd8d6;
    font-size: 0.8rem;
    padding: 8px 0;
}

.utility-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.utility-bar a { color: #fff; }

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--header);
    background: rgba(245, 239, 228, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.header-inner {
    height: 100%;
    width: min(var(--wrap), calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand img {
    height: 50px;
    width: auto;
    max-width: min(240px, 50vw);
    object-fit: contain;
}

header nav { margin-left: auto; }

header nav ul {
    display: flex;
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--muted);
}

header nav a:hover { color: var(--petrol-deep); }

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid var(--petrol);
    color: var(--petrol);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-phone:hover {
    background: var(--petrol);
    color: var(--paper);
}

/* Split hero */
.hero {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    border-bottom: 1px solid var(--line);
}

.hero-panel {
    background: var(--petrol);
    color: var(--paper);
    display: flex;
    align-items: center;
    padding: 76px 6vw 68px max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
}

.hero-panel h1 {
    color: var(--paper);
    margin-bottom: 22px;
}

.hero-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 30px;
    padding: 16px 0;
    border-top: 1px solid rgba(250, 247, 241, 0.2);
    border-bottom: 1px solid rgba(250, 247, 241, 0.2);
    list-style: none;
    font-size: 0.94rem;
    color: #dce5e3;
}

.hero-perks i {
    color: #e09a78;
    margin-right: 6px;
    font-size: 0.78rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-terra {
    background: var(--terra);
    color: #fff;
}

.btn-terra:hover { background: var(--terra-hover); }

.btn-panel-ghost {
    background: transparent;
    color: var(--paper);
    border-color: rgba(250, 247, 241, 0.45);
}

.btn-panel-ghost:hover {
    border-color: var(--paper);
    background: rgba(255, 255, 255, 0.08);
}

.btn-petrol {
    background: var(--petrol);
    color: var(--paper);
}

.btn-petrol:hover { background: var(--petrol-deep); }

.btn-line-dark {
    background: transparent;
    color: var(--petrol-deep);
    border-color: var(--line-strong);
}

.btn-line-dark:hover { border-color: var(--petrol-deep); }

.hero-loc {
    margin: 22px 0 0;
    font-size: 0.86rem;
    color: #b8c7c5;
}

.hero-media {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--sand);
}

.hero-media img {
    width: 100%;
    flex: 1;
    min-height: 440px;
    object-fit: cover;
}

.hero-media figcaption {
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--muted);
}

/* Chapter layout with Roman numeral rail */
.section { padding: 88px 0; }

.section-sand {
    background: var(--sand);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-petrol {
    background: var(--petrol);
    color: var(--paper);
}

.chapter {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 44px;
    align-items: start;
}

.chapter-rail {
    position: sticky;
    top: calc(var(--header) + 24px);
    padding-top: 6px;
    border-top: 1px solid var(--petrol);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chapter-rail.light { border-top-color: rgba(250, 247, 241, 0.35); }

.roman {
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--terra);
}

.chapter-rail.light .roman { color: #e09a78; }

.rail-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.chapter-rail.light .rail-label { color: #b8c7c5; }

/* Chapter I */
.essay-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 44px;
    align-items: start;
}

.essay-split p { color: var(--muted); }

.link-under {
    display: inline-block;
    margin-top: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--terra);
    color: var(--terra);
    font-weight: 600;
    font-size: 0.92rem;
}

.essay-photo { margin: 0; }
.essay-photo img {
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.essay-photo figcaption {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--muted);
}

.team-section {
    margin-top: 68px;
    padding-top: 44px;
    border-top: 1px solid var(--line);
}

.team-intro {
    max-width: 560px;
    margin-bottom: 28px;
}

.team-intro p { color: var(--muted); margin: 0; }

.team-portraits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-portraits img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 10px;
}

.team-portraits p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Chapter II */
.section-lead {
    max-width: 640px;
    margin-bottom: 32px;
}

.section-lead p { color: var(--muted); margin: 0; }

.steps-stack {
    border-top: 1px solid var(--line-strong);
}

.step-row {
    display: grid;
    grid-template-columns: 64px 240px 1fr;
    gap: 24px;
    align-items: baseline;
    padding: 26px 0;
    border-bottom: 1px solid var(--line-strong);
}

.step-num {
    font-family: var(--serif);
    font-style: italic;
    color: var(--terra);
}

.step-row h3 { margin: 0; }
.step-row p { margin: 0; color: var(--muted); }

.callout-bar {
    margin-top: 36px;
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.callout-title {
    font-family: var(--serif);
    font-size: 1.18rem;
    color: var(--petrol-deep);
    margin-bottom: 4px;
}

.callout-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Chapter III */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 28px 0 44px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pillar-letter {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    color: var(--terra);
    margin-bottom: 8px;
}

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

.topics-matrix { padding-top: 44px; }
.topics-matrix h3 { margin-bottom: 20px; }

.topics-matrix ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.topics-matrix li {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.topics-matrix strong {
    font-weight: 600;
    color: var(--petrol-deep);
}

.topics-matrix span { color: var(--muted); }

/* Chapter IV */
.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar { display: none; }

.testimonial {
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 0;
}

.testimonial p {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    line-height: 1.45;
    color: var(--paper);
}

.testimonial footer {
    margin-top: 16px;
    color: #e09a78;
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.testimonial-controls button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(250, 247, 241, 0.4);
    background: transparent;
    color: var(--paper);
    cursor: pointer;
}

.testimonial-controls button:hover {
    background: var(--paper);
    color: var(--petrol-deep);
}

/* Chapter V Contact */
.contact-columns {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 52px;
    align-items: start;
}

.contact-sub { color: var(--muted); margin-bottom: 24px; }

.two-Up {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { margin-bottom: 16px; }

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--petrol-deep);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

textarea { resize: vertical; }

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--petrol);
}

.form-group.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 20px 0;
}

.form-group.check input {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex-shrink: 0;
}

.form-group.check label {
    margin: 0;
    font-weight: 400;
    color: var(--muted);
}

.form-message { margin-top: 14px; padding: 12px 14px; }
.form-message.success { background: #dfece5; color: #194730; }
.form-message.error { background: #f4dfdc; color: #7a2c22; }
.form-message.loading { background: var(--limestone); color: var(--ink); }

.contact-aside {
    padding-left: 36px;
    border-left: 1px solid var(--line-strong);
}

.contact-aside p {
    font-size: 0.94rem;
    color: var(--muted);
}

.contact-aside strong { color: var(--petrol-deep); }
.contact-aside a:hover { text-decoration: underline; }

.map {
    margin-top: 18px;
    border: 1px solid var(--line-strong);
}

/* Footer */
footer {
    background: var(--petrol-deep);
    color: #b8c7c5;
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

footer h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--paper);
    margin-bottom: 6px;
}

footer p { margin: 0; font-size: 0.88rem; }

.float-call {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--terra);
    color: #fff;
    font-size: 1rem;
}

section[id] { scroll-margin-top: calc(var(--header) + 12px); }

@media (max-width: 980px) {
    .utility-bar { display: none; }
    header nav { display: none; }
    .header-phone { margin-left: auto; }

    .hero,
    .chapter,
    .essay-split,
    .pillars,
    .contact-columns {
        grid-template-columns: 1fr;
    }

    .hero-panel { padding: 48px 24px 40px; }
    .hero-media img { min-height: 280px; max-height: 360px; }

    .chapter { gap: 20px; }
    .chapter-rail {
        position: static;
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
        padding-bottom: 10px;
        border-top: 0;
        border-bottom: 1px solid var(--line);
    }

    .step-row,
    .topics-matrix li {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .team-portraits { grid-template-columns: 1fr 1fr; }

    .contact-aside {
        padding-left: 0;
        padding-top: 28px;
        border-left: 0;
        border-top: 1px solid var(--line-strong);
    }
}

@media (max-width: 760px) {
    :root { --header: 64px; }

    .wrap,
    .header-inner {
        width: min(100% - 28px, var(--wrap));
    }

    .header-inner { gap: 12px; }

    .brand img {
        height: 38px;
        max-width: min(185px, 54vw);
    }

    .header-phone {
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .hero-panel { padding: 36px 14px 32px; }

    .hero-perks {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .cta-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .cta-row .btn,
    .contact-form .btn { width: 100%; }

    .section { padding: 60px 0; }
    .two-Up,
    .team-portraits { grid-template-columns: 1fr; }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea { font-size: 16px; }

    .form-group.check label { word-break: break-word; }
    .contact-aside p,
    .contact-aside a { overflow-wrap: anywhere; }
    .map iframe { width: 100%; height: 220px; }
}

@media (max-width: 470px) {
    .brand img { height: 34px; max-width: min(160px, 56vw); }
    .header-phone span { display: none; }
    .header-phone { padding: 9px 11px; }
}
