:root {
    --bg: #efe5d3;
    --panel: rgba(255, 251, 243, 0.86);
    --panel-strong: #fffaf0;
    --text: #17110b;
    --muted: #665c4f;
    --line: rgba(23, 17, 11, 0.12);
    --accent: #14574f;
    --accent-strong: #0d4039;
    --warm: #b67537;
    --shadow: 0 24px 70px rgba(18, 14, 10, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(20, 87, 79, 0.18), transparent 26rem),
        radial-gradient(circle at bottom right, rgba(182, 117, 55, 0.12), transparent 24rem),
        linear-gradient(180deg, #fbf5ec 0%, var(--bg) 46%, #e5d7be 100%);
}

body.menu-open {
    overflow: hidden;
}

body.lang-mi .lang-en,
body.lang-en .lang-mi {
    display: none;
}

body.lang-mi .lang-mi,
body.lang-en .lang-en {
    display: inline;
}

body.lang-mi .site-nav .lang-mi,
body.lang-en .site-nav .lang-en,
body.lang-mi .button .lang-mi,
body.lang-en .button .lang-en,
body.lang-mi .product-kicker .lang-mi,
body.lang-en .product-kicker .lang-en,
body.lang-mi .timeline-period .lang-mi,
body.lang-en .timeline-period .lang-en {
    display: inline;
}

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

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

.site-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.site-header {
    position: sticky;
    top: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

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

.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(20, 87, 79, 0.08);
    padding: 4px;
}

.brand-text {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-language-toggles {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.language-toggle input {
    width: 12px;
    height: 12px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

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

.site-nav a {
    position: relative;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted);
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    transform: scaleX(0);
    transform-origin: left;
    background: currentColor;
    transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

.nav-cta {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--text);
    color: #f8f1e4 !important;
}

.nav-cta::after {
    display: none;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #f8f1e4;
    transition: transform 180ms ease, opacity 180ms ease;
}

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

main {
    padding-top: 40px;
}

section[id] {
    scroll-margin-top: 140px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
    padding: 42px;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(20, 87, 79, 0.96), rgba(13, 64, 57, 0.9)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    color: #fff8ee;
    box-shadow: var(--shadow);
}

.hero-copy-block {
    align-self: center;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero .eyebrow {
    color: rgba(255, 248, 238, 0.76);
}

.hero h1,
.section-heading h2 {
    margin: 0;
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.hero h1 {
    max-width: 10ch;
    font-size: clamp(3.3rem, 9vw, 7.6rem);
}

.scroll-heading {
    --heading-shift: 0px;
    transform: translate3d(0, var(--heading-shift), 0);
    transform-origin: left top;
    will-change: transform;
    transition: transform 120ms linear, font-size 120ms linear;
}

.hero-copy {
    max-width: 680px;
    margin: 24px 0 0;
    font-size: clamp(1.02rem, 2.4vw, 1.28rem);
    line-height: 1.75;
    color: rgba(255, 248, 238, 0.92);
}

.hero-speed {
    margin: 18px 0 0;
    font-weight: 700;
    color: rgba(255, 248, 238, 0.82);
}

.hero-panel,
.section-body,
.product-card,
.answer-card,
.spotlight-panel,
.contact-panel,
.application-panel,
.timeline-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    gap: 18px;
    align-content: center;
    padding: 28px;
    background: rgba(255, 250, 240, 0.12);
    color: #fff8ee;
}

.hero-panel img {
    width: min(240px, 100%);
    margin: 0 auto;
}

.hero-panel p {
    margin: 0;
    line-height: 1.8;
    color: rgba(255, 248, 238, 0.86);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

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

.button-primary {
    background: #f6ecdb;
    color: var(--accent-strong);
}

.button-secondary {
    color: #fff8ee;
    border-color: rgba(255, 248, 238, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.section {
    padding: 36px 0 0;
}

.section + .section {
    margin-top: 28px;
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.section-heading h2 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 5vw, 4.3rem);
}

#about .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#services .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#products .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#order .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#marae .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#history .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#why .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

#contact .section-heading h2 {
    max-width: none;
    white-space: nowrap;
}

.section-body,
.contact-panel,
.spotlight-panel,
.application-panel,
.timeline-card,
.answer-card,
.product-card {
    padding: 28px;
}

.two-column,
.feature-layout,
.contact-layout,
.timeline,
.answer-list,
.product-grid {
    display: grid;
    gap: 18px;
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
}

.feature-layout,
.contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-body p,
.product-card p,
.answer-card p,
.spotlight-panel p,
.contact-panel p,
.timeline-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.product-kicker,
.timeline-period {
    margin: 0 0 12px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm) !important;
}

.product-card {
    display: grid;
    gap: 12px;
}

.product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent) !important;
}

.product-availability {
    font-size: 0.92rem;
    font-weight: 700;
}

.product-card h3,
.answer-card h3,
.timeline-card h3 {
    margin: 0;
    font-size: 1.4rem;
}

.answer-card {
    display: grid;
    gap: 12px;
}

.answer-card h3 {
    font-size: 1.08rem;
    line-height: 1.45;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
}

.product-link {
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 800;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.product-dialog {
    width: min(760px, calc(100% - 32px));
    padding: 0;
    border: 0;
    background: transparent;
}

.product-dialog::backdrop {
    background: rgba(23, 17, 11, 0.42);
}

.product-dialog__panel {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 251, 243, 0.98);
    box-shadow: var(--shadow);
}

.product-dialog__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--text);
    color: #fffaf0;
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.product-dialog__kicker,
.product-dialog__price,
.product-dialog__availability,
.product-dialog__description {
    margin: 0;
}

.product-dialog__kicker {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm);
}

.product-dialog__title {
    margin: 0;
    font-size: 2rem;
}

.product-dialog__price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.product-dialog__availability {
    font-weight: 700;
}

.product-dialog__description {
    line-height: 1.85;
    color: var(--muted);
}

.product-dialog__link {
    margin-top: 6px;
}

.role-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.role-list li,
.contact-points > span {
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid rgba(23, 17, 11, 0.08);
    font-weight: 700;
}

.contact-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

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

.form-field {
    display: grid;
    gap: 8px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label,
.form-note {
    font-weight: 700;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(23, 17, 11, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid rgba(20, 87, 79, 0.18);
    border-color: rgba(20, 87, 79, 0.4);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.form-note {
    margin: 0;
    color: var(--accent);
}

.contact-form textarea::placeholder {
    color: #8b7f6e;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 36px;
    padding-top: 18px;
    color: var(--muted);
    font-size: 0.92rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section.is-order-section-hidden {
    display: none;
}

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

.order-layout.is-order-hidden {
    display: none;
}

.form-status {
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 20px;
    font-weight: 700;
}

.form-status-success {
    background: rgba(20, 87, 79, 0.12);
    color: var(--accent-strong);
    border: 1px solid rgba(20, 87, 79, 0.18);
}

.form-status-error {
    background: rgba(145, 43, 43, 0.1);
    color: #7a1d1d;
    border: 1px solid rgba(145, 43, 43, 0.16);
}

.order-form select {
    width: 100%;
    border: 1px solid rgba(23, 17, 11, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

.order-form .button-secondary {
    background: var(--panel-strong);
    color: var(--accent-strong);
    border-color: rgba(20, 87, 79, 0.18);
}

.order-form .button-secondary:hover {
    background: #f3eadb;
}

.order-lines {
    display: grid;
    gap: 14px;
}

.order-line {
    padding: 18px;
    border: 1px solid rgba(23, 17, 11, 0.08);
    border-radius: 22px;
    background: var(--panel-strong);
}

.order-line-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 18px 20px;
    align-items: end;
}

.form-field-quantity {
    max-width: 160px;
}

.order-line-remove-wrap {
    display: flex;
    align-items: center;
    min-height: 52px;
}

.product-dialog__order {
    width: fit-content;
    margin-top: 6px;
}

@media (max-width: 900px) {
    .hero,
    .two-column,
    .feature-layout,
    .contact-layout,
    .order-layout,
    .timeline,
    .answer-list,
    .product-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .site-nav {
        position: fixed;
        top: 86px;
        right: 16px;
        left: 16px;
        display: grid;
        gap: 10px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(255, 250, 240, 0.96);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    .menu-open .site-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a::after {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
    }

    .brand-language-toggles {
        width: 100%;
        margin-top: -4px;
    }

    .scroll-heading {
        transform: none;
        will-change: auto;
        transition: none;
    }

    .form-field-product {
        grid-column: auto;
    }

    .form-field-quantity {
        max-width: none;
    }

    .order-line-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 20px, 1120px);
    }

    .site-header {
        padding: 12px 14px;
    }

    .hero,
    .section-body,
    .product-card,
    .answer-card,
    .spotlight-panel,
    .contact-panel,
    .application-panel,
    .timeline-card {
        padding: 22px;
    }

    .hero h1,
    .section-heading h2 {
        max-width: none;
    }

    #about .section-heading h2 {
        white-space: normal;
    }

    #services .section-heading h2 {
        white-space: normal;
    }

    #products .section-heading h2 {
        white-space: normal;
    }

    #order .section-heading h2 {
        white-space: normal;
    }

    #marae .section-heading h2 {
        white-space: normal;
    }

    #history .section-heading h2 {
        white-space: normal;
    }

    #why .section-heading h2 {
        white-space: normal;
    }

    #contact .section-heading h2 {
        white-space: normal;
    }

    .site-footer {
        flex-direction: column;
    }

    .product-dialog__panel {
        padding: 22px;
    }

    .order-line {
        padding: 16px;
    }
}
