:root {
    --ink: #3f2a22;
    --muted: #74665d;
    --line: #e7d8bd;
    --paper: #fff8e9;
    --soft: #f3ead6;
    --green: #566f49;
    --teal: #497973;
    --amber: #c58042;
    --blue: #516c8f;
    --cocoa: #56382d;
    --cream: #ffe4ad;
    --white: #ffffff;
    --shadow: 0 20px 70px rgba(63, 42, 34, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body.theme-coder {
    --green: #4b6d56;
    --teal: #55738a;
    --amber: #b9793f;
}

body.theme-course {
    --green: #6a7442;
    --teal: #4d776c;
    --amber: #bd7543;
}

body.theme-ads {
    --green: #557144;
    --teal: #497973;
    --amber: #c07a36;
}

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

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--green);
}

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

h1,
h2,
h3 {
    line-height: 1.1;
    letter-spacing: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 24px;
    font-size: 4.2rem;
    font-weight: 780;
}

h2 {
    margin-bottom: 18px;
    font-size: 2.55rem;
    font-weight: 760;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

p {
    color: var(--muted);
}

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

.narrow {
    max-width: 760px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    transform: translateY(-160%);
    border-radius: 6px;
    background: var(--ink);
    color: var(--white);
    padding: 10px 14px;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(231, 216, 189, 0.9);
    background: rgba(255, 248, 233, 0.94);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo {
    display: inline-flex;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    min-width: 0;
}

.brand-copy strong,
.brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy strong {
    font-size: 0.98rem;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #554137;
    font-size: 0.95rem;
    font-weight: 650;
}

.main-nav a {
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.main-nav a[aria-current="page"] {
    color: var(--green);
}

.main-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: var(--green);
}

.nav-cta {
    border: 1px solid var(--cocoa);
    border-radius: 8px;
    background: #fff1cf;
    padding: 10px 14px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px auto;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    color: var(--white);
}

.hero-media,
.hero-media img,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(42, 28, 22, 0.9) 0%, rgba(42, 28, 22, 0.7) 38%, rgba(42, 28, 22, 0.25) 68%, rgba(42, 28, 22, 0.08) 100%),
        linear-gradient(180deg, rgba(42, 28, 22, 0.08) 0%, rgba(42, 28, 22, 0.36) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 78vh;
    flex-direction: column;
    justify-content: center;
    padding: 72px 0 58px;
}

.eyebrow,
.section-label,
.card-tag {
    margin-bottom: 14px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffe0a2;
}

.hero-lead-callout {
    max-width: 700px;
    margin-bottom: 16px;
    padding: 14px 0 14px 20px;
    border-left: 3px solid rgba(255, 224, 162, 0.7);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.hero-lead {
    max-width: 700px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.18rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 13px 18px;
    font-weight: 760;
    line-height: 1.2;
}

.btn-primary {
    border: 1px solid var(--cocoa);
    background: var(--cocoa);
    color: var(--white);
}

.btn-primary:hover {
    border-color: #321f19;
    background: #321f19;
    color: var(--white);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.btn-secondary:hover {
    border-color: var(--white);
    color: var(--white);
}

.hero-metrics {
    display: grid;
    max-width: 900px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-metrics div {
    min-width: 0;
}

.hero-metrics dt {
    color: var(--white);
    font-weight: 800;
}

.hero-metrics dd {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.section {
    padding: 92px 0;
}

.section-intro {
    padding: 68px 0;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.section-muted {
    background: var(--soft);
}

.intro-grid,
.split-grid,
.local-grid,
.faq-grid,
.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: start;
}

.intro-grid p,
.split-grid p,
.local-grid p,
.contact-panel p {
    font-size: 1.04rem;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card,
.use-case {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf6;
    box-shadow: 0 12px 38px rgba(63, 42, 34, 0.07);
}

.service-card {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    padding: 28px;
}

.service-card p {
    margin-bottom: 18px;
}

.term-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: auto 0 22px;
    padding: 0;
    list-style: none;
}

.term-list li,
.location-list span {
    border: 1px solid #dcc9a9;
    border-radius: 999px;
    background: #fff2d3;
    color: #56382d;
    font-size: 0.84rem;
    font-weight: 680;
}

.term-list li {
    padding: 7px 10px;
}

.text-link {
    color: var(--green);
    font-weight: 800;
}

.text-link::after {
    content: " ➔";
}

.check-list {
    display: grid;
    gap: 14px;
}

.check-list p {
    position: relative;
    margin: 0;
    padding: 18px 18px 18px 44px;
    border: 1px solid rgba(86, 56, 45, 0.18);
    border-radius: 8px;
    background: rgba(255, 253, 246, 0.78);
    color: var(--ink);
}

.check-list p::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 5px rgba(197, 128, 66, 0.16);
}

.location-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.location-list span {
    padding: 9px 12px;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.use-case {
    padding: 24px;
}

.use-case p {
    margin: 0;
    color: var(--ink);
    font-weight: 650;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.process-step {
    padding-top: 18px;
    border-top: 3px solid var(--green);
}

.process-step span {
    display: block;
    margin-bottom: 24px;
    color: var(--amber);
    font-size: 0.9rem;
    font-weight: 850;
}

.process-step p {
    margin-bottom: 0;
}

.faq-list {
    display: grid;
    gap: 12px;
}

details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf6;
}

summary {
    cursor: pointer;
    padding: 20px 22px;
    color: var(--ink);
    font-weight: 800;
}

details p {
    margin: 0;
    padding: 0 22px 22px;
}

.contact-section {
    padding-top: 0;
}

.contact-panel {
    align-items: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 56px 0;
}

.contact-actions {
    justify-self: end;
    max-width: 360px;
}

.contact-actions .btn {
    width: 100%;
    margin-bottom: 18px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--cocoa);
    color: rgba(255, 255, 255, 0.82);
}

.footer-inner {
    display: flex;
    min-height: 110px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.footer-inner div {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-inner a:hover {
    color: #ffe0a2;
}

.not-found {
    min-height: 66vh;
    padding: 120px 0;
}

@media (max-width: 980px) {
    h1 {
        font-size: 3.35rem;
    }

    h2 {
        font-size: 2.2rem;
    }

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

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

    .intro-grid,
    .split-grid,
    .local-grid,
    .faq-grid,
    .contact-panel {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .contact-actions {
        justify-self: stretch;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 32px, 1160px);
    }

    h1 {
        font-size: 2.55rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-copy small {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 8px;
    }

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

    .main-nav a {
        border-radius: 6px;
        padding: 12px;
    }

    .nav-cta {
        border-color: var(--line);
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 90px 0 46px;
    }

    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(42, 28, 22, 0.92) 0%, rgba(42, 28, 22, 0.78) 58%, rgba(42, 28, 22, 0.42) 100%),
            linear-gradient(180deg, rgba(42, 28, 22, 0.16) 0%, rgba(42, 28, 22, 0.48) 100%);
    }

    .hero-lead-callout {
        font-size: 1.15rem;
        padding: 12px 0 12px 16px;
    }

    .hero-lead {
        font-size: 1.03rem;
    }

    .hero-actions,
    .hero-actions .btn {
        width: 100%;
    }

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

    .section {
        padding: 66px 0;
    }

    .section-intro {
        padding: 54px 0;
    }

    .card-grid,
    .use-case-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: auto;
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 28px 0;
    }
}

@media (max-width: 420px) {
    h1 {
        font-size: 2.18rem;
    }

    h2 {
        font-size: 1.65rem;
    }

    .brand-logo,
    .brand-logo img {
        width: 48px;
        height: 48px;
    }

    .brand-copy strong {
        max-width: 205px;
        font-size: 0.9rem;
    }

    .btn {
        width: 100%;
    }
}

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