:root {
    --bg: #F7F3EC;
    --surface: #FFFDF8;
    --ink: #18241F;
    --green: #173B2F;
    --wood: #A06B3B;
    --line: #DDD4C8;
    --muted: #5F665F;
    --shadow: 0 24px 70px rgba(24, 36, 31, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(rgba(247, 243, 236, 0.72), rgba(247, 243, 236, 0.72)),
        url("/assets/img/wood-bg.png"),
        var(--bg);
    background-attachment: fixed;
    background-size: auto, 900px auto, auto;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 16px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid rgba(160, 107, 59, 0.18);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 10px 34px rgba(24, 36, 31, 0.08);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 205px;
    color: var(--ink);
}

.brand-logo {
    display: block;
    position: relative;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 12px 26px rgba(23, 59, 47, 0.18);
    object-fit: contain;
}

.brand-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #D5BC96;
    -webkit-mask: url('/assets/img/falabor-mark-small.webp') center / contain no-repeat;
    mask: url('/assets/img/falabor-mark-small.webp') center / contain no-repeat;
}

.brand-fallback {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: #FFFDF8;
    font-weight: 850;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-tagline {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 0;
}

.main-nav a {
    position: relative;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 850;
    padding: 12px 17px;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.main-nav a + a {
    margin-left: 18px;
}

.main-nav a + a::before {
    position: absolute;
    top: 50%;
    left: -10px;
    width: 1px;
    height: 32px;
    background: rgba(160, 107, 59, 0.28);
    content: "";
    transform: translateY(-50%);
}

.main-nav a:hover,
.main-nav a.is-active {
    background: rgba(160, 107, 59, 0.16);
    box-shadow: inset 0 0 0 1px rgba(160, 107, 59, 0.16);
    color: var(--green);
}

.main-nav a:hover {
    transform: translateY(-1px);
}

.header-phone {
    justify-self: end;
    color: var(--green);
    font-size: 1.02rem;
    font-weight: 900;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--green);
}

.section-grid,
.section,
.value-strip,
.cta-band,
.contact-cta,
.page-hero,
.site-footer {
    width: min(1180px, calc(100% - 36px));
    margin-inline: auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    align-items: center;
    gap: clamp(32px, 5vw, 70px);
    min-height: calc(100vh - 82px);
    padding: 58px 0 78px;
}

.hero > *,
.section-grid > *,
.contact-layout > * {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--wood);
    font-size: 0.83rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 760px;
    margin-bottom: 22px;
    color: var(--green);
    font-size: clamp(2.35rem, 3.35vw, 3.45rem);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

h2 {
    color: var(--green);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.03;
    letter-spacing: 0;
}

h3 {
    color: var(--green);
    font-size: 1.3rem;
    line-height: 1.2;
}

.hero-lead,
.page-hero p,
.about-band p,
.cta-band p {
    color: var(--muted);
    font-size: clamp(1.06rem, 2vw, 1.23rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 850;
    padding: 13px 22px;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
    background: var(--green);
    box-shadow: 0 14px 36px rgba(23, 59, 47, 0.22);
    color: #FFFDF8;
}

.button-secondary,
.ghost-button {
    border-color: var(--line);
    background: var(--surface);
    color: var(--green);
}

.trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.trust-pills span,
.tag-list small {
    border: 1px solid rgba(160, 107, 59, 0.24);
    border-radius: 6px;
    background: rgba(255, 253, 248, 0.72);
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 11px;
}

.workshop-visual {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(221, 212, 200, 0.95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.workshop-visual p {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 18px;
    left: 18px;
    margin: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
    color: var(--green);
    font-weight: 850;
    padding: 16px;
}

.hero-brand-fallback {
    position: absolute;
    inset: 18px;
    display: grid;
    place-items: center;
    background: var(--green);
}

.hero-brand-fallback img {
    width: 70%;
    height: auto;
}

.hero-uploaded-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 590px;
    object-fit: cover;
}

.hero-logo-watermark {
    position: absolute;
    left: 50%;
    top: 48%;
    z-index: 0;
    width: min(72%, 430px);
    max-height: 430px;
    object-fit: contain;
    opacity: 0.045;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-5deg);
}

.hero-gallery-glow {
    position: absolute;
    inset: 18px;
    z-index: 0;
    overflow: hidden;
    border-radius: calc(var(--radius) - 4px);
    opacity: 1;
    pointer-events: none;
}

.hero-gallery-glow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1400ms ease, transform 6000ms ease;
}

.hero-gallery-glow img.is-active {
    opacity: 1;
    transform: scale(1);
}

.value-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--green);
    color: #FFFDF8;
}

.value-strip article {
    padding: 26px;
}

.value-strip article + article {
    border-left: 1px solid rgba(255, 253, 248, 0.18);
}

.value-strip strong,
.value-strip span {
    display: block;
}

.value-strip span {
    margin-top: 8px;
    color: rgba(255, 253, 248, 0.74);
}

.section {
    padding: 72px 0 0;
}

.page-hero + .section {
    padding-top: 42px;
}

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

.row-heading {
    display: flex;
    max-width: none;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.text-link {
    color: var(--wood);
    font-weight: 850;
}

.service-grid,
.reference-grid,
.step-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card,
.reference-card,
.step-card,
.contact-info,
.contact-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.88);
    box-shadow: 0 14px 42px rgba(24, 36, 31, 0.07);
}

.service-card,
.step-card {
    padding: 28px;
}

.service-card {
    min-height: 246px;
}

.card-number,
.step-card strong {
    color: var(--wood);
    font-weight: 900;
}

.service-card p,
.reference-card p,
.step-card p {
    color: var(--muted);
}

.about-band {
    display: grid;
    grid-template-columns: 0.72fr 1fr;
    gap: 52px;
    align-items: center;
    padding-top: 106px;
}

.about-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 360px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--green);
    box-shadow: var(--shadow);
    padding: 32px;
}

.about-brand img {
    display: block;
    width: min(80%, 300px);
    height: auto;
}

.about-brand span {
    color: var(--surface);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.about-band h2 {
    font-size: 2.5rem;
    line-height: 1.12;
}

.about-portrait {
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    background: var(--green);
    box-shadow: 0 14px 36px rgba(20, 48, 38, 0.12);
}

.about-portrait > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.about-portrait figcaption {
    display: grid;
    gap: 5px;
    padding: 22px 26px;
    border-top: 2px solid #c6a476;
    color: #fff;
}

.about-portrait figcaption strong {
    font-size: 1.125rem;
}

.about-portrait figcaption span {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #e2e9e4;
}

.reference-card {
    overflow: hidden;
    padding: 16px;
}

.reference-card .image-placeholder {
    min-height: 205px;
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(23, 59, 47, 0.12), rgba(160, 107, 59, 0.28)),
        repeating-linear-gradient(90deg, #E9DFD1 0 28px, #D6C4B2 28px 30px);
}

.reference-main-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
}

.reference-card span {
    display: inline-block;
    margin-top: 18px;
    color: var(--wood);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
}

.reference-card h2,
.reference-card h3 {
    margin: 8px 0 10px;
    font-size: clamp(1.55rem, 2.25vw, 2.28rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: normal;
}

.reference-listing .reference-card {
    display: flex;
    flex-direction: column;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: auto 0 18px;
}

.cta-band,
.contact-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 96px;
    border-radius: var(--radius);
}

.cta-band {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: clamp(28px, 5vw, 52px);
}

.cta-band div {
    max-width: 760px;
}

.contact-cta {
    margin-bottom: 80px;
    background: var(--green);
    color: #FFFDF8;
    padding: clamp(28px, 5vw, 56px);
}

.contact-cta h2 {
    margin-bottom: 0;
    color: #FFFDF8;
}

.page-hero {
    max-width: 980px;
    padding: 92px 0 18px;
}

.page-hero h1 {
    font-size: clamp(2.35rem, 3.55vw, 3.65rem);
}

.calculator-hero,
.contact-hero {
    max-width: 1040px;
}

.contact-hero {
    padding-bottom: 0;
}

.step-card {
    min-height: 210px;
}

.step-card h2 {
    margin: 18px 0 14px;
    font-size: clamp(1.65rem, 2.45vw, 2.45rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.step-card strong {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(160, 107, 59, 0.24);
    border-radius: 50%;
    background: rgba(160, 107, 59, 0.08);
}

.calculator-wizard {
    max-width: 1040px;
}

.calculator-wizard [hidden] {
    display: none;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.wizard-progress button {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.35;
    padding: 12px;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease;
}

.wizard-progress button span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(160, 107, 59, 0.1);
    color: var(--wood);
    font-size: 0.76rem;
}

.wizard-progress button.is-active {
    border-color: var(--green);
    background: #EDF3EF;
    color: var(--green);
}

.wizard-progress button.is-active span {
    background: var(--green);
    color: #FFFDF8;
}

.wizard-progress button.is-complete {
    color: var(--green);
}

.wizard-progress button:hover {
    border-color: var(--green);
}

.wizard-progress button:focus-visible,
.calculator-wizard .button:focus-visible {
    outline: 3px solid #82A18D;
    outline-offset: 3px;
}

.wizard-progress-bar {
    overflow: hidden;
    height: 8px;
    border-radius: 6px;
    background: rgba(160, 107, 59, 0.12);
}

.wizard-progress-bar span {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transition: width 220ms ease;
}

.autosave-state,
.wizard-help {
    color: var(--muted);
}

.autosave-state {
    margin: 12px 0 18px;
    font-size: 0.92rem;
    font-weight: 800;
}

.wizard-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--shadow);
    padding: clamp(24px, 4vw, 42px);
}

.wizard-step h2 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: 1.75rem;
    line-height: 1.3;
}

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

.choice-card,
.material-choice,
.calculator-element-card,
.fitting-row,
.estimate-box > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.88);
}

.choice-card,
.material-choice {
    display: grid;
    align-items: center;
    min-width: 0;
    gap: 14px;
    cursor: pointer;
    padding: 18px;
    background: var(--surface);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-card {
    grid-template-columns: 20px minmax(0, 1fr);
    min-height: 76px;
}

.choice-card:hover,
.material-choice:hover {
    border-color: #82A18D;
    background: #F2F6F3;
}

.choice-card:has(input:checked),
.material-choice:has(input:checked) {
    border-color: var(--green);
    background: #EDF3EF;
    box-shadow: inset 0 0 0 1px var(--green);
}

.choice-card:has(input:focus-visible),
.material-choice:has(input:focus-visible) {
    outline: 3px solid #82A18D;
    outline-offset: 3px;
}

.choice-card input,
.material-choice input {
    width: 20px;
    height: 20px;
    margin: 0;
    justify-self: start;
    accent-color: var(--green);
    cursor: pointer;
}

.choice-card input:focus-visible,
.material-choice input:focus-visible {
    outline: none;
}

.choice-card span,
.material-choice strong {
    min-width: 0;
    color: var(--green);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.material-choice {
    grid-template-columns: minmax(0, 1fr) 20px;
    align-content: start;
}

.material-choice input {
    grid-column: 2;
    grid-row: 1;
}

.material-choice strong {
    grid-column: 1;
    grid-row: 1;
}

.material-choice img,
.material-choice .material-swatch,
.material-choice small {
    grid-column: 1 / -1;
}

.material-choice small {
    line-height: 1.5;
}

.material-choice img,
.material-swatch {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(23, 59, 47, 0.1), rgba(160, 107, 59, 0.22)),
        repeating-linear-gradient(90deg, #E9DFD1 0 28px, #D6C4B2 28px 30px);
}

.material-choice small,
.fitting-row small,
.estimate-box span {
    color: var(--muted);
}

.element-list,
.fitting-list,
.estimate-box {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.calculator-element-card {
    padding: 18px;
}

.calculator-element-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--green);
}

.calculator-field-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calculator-field-grid label,
.fitting-row {
    display: grid;
    gap: 8px;
    color: var(--green);
    font-weight: 850;
}
.fitting-product { display: flex; align-items: center; gap: 16px; min-width: 0; }
.fitting-product > span { min-width: 0; overflow-wrap: anywhere; }
.fitting-product-image { width: 80px; height: 80px; flex: 0 0 80px; object-fit: contain; border-radius: 4px; background: #fff; }

.calculator-field-grid label span {
    color: var(--muted);
    font-size: 0.78rem;
}

.calculator-field-grid input,
.fitting-row input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #FFFDF8;
    color: var(--ink);
    padding: 12px;
}

.fitting-row {
    grid-template-columns: 1fr 140px;
    align-items: center;
    padding: 16px;
}

.estimate-box {
    grid-template-columns: repeat(2, 1fr);
}

.estimate-box > div {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.estimate-box strong {
    color: var(--green);
    font-size: 1.22rem;
}

.estimate-box .estimate-total {
    grid-column: 1 / -1;
    border-color: rgba(23, 59, 47, 0.28);
    background: var(--green);
}

.estimate-total span,
.estimate-total strong {
    color: #FFFDF8;
}

.estimate-total strong {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.wizard-actions {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(120px, auto);
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.wizard-actions [data-wizard-prev] {
    grid-column: 1;
}

.wizard-actions [data-wizard-next] {
    grid-column: 2;
}

.calculator-wizard .button {
    min-height: 48px;
    font-weight: 750;
    padding: 11px 22px;
}

.calculator-wizard .button-primary {
    box-shadow: 0 4px 12px rgba(23, 59, 47, 0.15);
}

.calculator-wizard .button:hover {
    transform: none;
    border-color: var(--green);
}

.calculator-wizard .button-primary:hover {
    background: #24513F;
}

.calculator-wizard .button-secondary:hover {
    background: #EDF3EF;
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.75fr 1fr;
    gap: 22px;
    align-items: start;
    padding-top: 42px;
    padding-bottom: 86px;
}

.contact-info,
.contact-form {
    padding: clamp(24px, 4vw, 38px);
}

.contact-lines a,
.revealed-email {
    display: block;
    margin-top: 16px;
    color: var(--green);
    font-size: 1.2rem;
    font-weight: 900;
}

.contact-lines a span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
    text-transform: uppercase;
}

.email-reveal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

.email-toggle {
    min-height: 44px;
    padding: 10px 16px;
}

.revealed-email {
    margin-top: 0;
}

.revealed-email[hidden] {
    display: none;
}

.info-note {
    margin-top: 32px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.info-note strong,
.info-note span {
    display: block;
}

.info-note span {
    color: var(--muted);
    margin-top: 7px;
}

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

.contact-form label {
    color: var(--green);
    font-weight: 850;
}

.wide-field,
.contact-form button {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #FFFDF8;
    color: var(--ink);
    padding: 14px 15px;
    outline: none;
    transition: border 180ms ease, box-shadow 180ms ease;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: rgba(160, 107, 59, 0.76);
    box-shadow: 0 0 0 4px rgba(160, 107, 59, 0.12);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 34px 0 48px;
}

.site-footer strong {
    color: var(--green);
}

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

.footer-facebook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    transition: background-color 160ms ease, border-color 160ms ease;
}

.footer-facebook:hover {
    background: #e5eee8;
    border-color: var(--green);
}

.footer-facebook:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

.footer-facebook img {
    display: block;
    width: 24px;
    height: 24px;
}

.rich-content {
    color: var(--muted);
    font-size: 1.05rem;
}

.rich-content h2,
.rich-content h3,
.rich-content h4 {
    color: var(--green);
    line-height: 1.18;
}

.rich-content a {
    color: var(--wood);
    font-weight: 850;
    text-decoration: underline;
}

.reference-detail {
    max-width: 980px;
}

.reference-detail-main {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.reference-description {
    margin-top: 34px;
}

.gallery-block {
    display: grid;
    gap: 28px;
    align-items: start;
    margin-top: 42px;
    border-top: 1px solid var(--line);
    padding-top: 42px;
}

.gallery-block img {
    width: 100%;
    height: auto;
    max-height: 680px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--surface);
    box-shadow: 0 14px 42px rgba(24, 36, 31, 0.08);
}

.gallery-left,
.gallery-right {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
}

.gallery-right img {
    order: 2;
}

.gallery-top,
.gallery-bottom {
    grid-template-columns: 1fr;
}

.gallery-bottom img {
    order: 2;
}

.legal-content {
    max-width: 920px;
    padding-bottom: 86px;
}

.admin-body {
    background: #F7F3EC;
}

.admin-login-body {
    background: #173B2F;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.admin-login-shell {
    width: min(100%, 440px);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
}

.admin-login-shell h1 {
    font-size: 1.75rem;
    margin: 28px 0 24px;
    letter-spacing: 0;
}

.admin-login-form input {
    min-width: 0;
    min-height: 48px;
    font-size: 1rem;
}

.admin-login-form input:focus-visible,
.admin-login-shell a:focus-visible,
.admin-body button:focus-visible {
    outline: 3px solid #a06b3b;
    outline-offset: 3px;
}

.admin-login-form .button {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
}

.admin-login-error {
    color: #8d2020;
    background: #fff0ef;
    border-left: 3px solid #a73030;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.admin-login-back {
    display: inline-block;
    margin-top: 24px;
    font-size: 0.9rem;
    text-decoration: underline;
}

.admin-logout {
    margin: 0;
    flex-shrink: 0;
}

.admin-logout .button {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.9rem;
}

.admin-header {
    flex-wrap: wrap;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: 0 10px 34px rgba(24, 36, 31, 0.08);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-nav a {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
    font-weight: 850;
    padding: 9px 12px;
}

.admin-nav a.is-active {
    background: rgba(160, 107, 59, 0.16);
}

.admin-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 54px 0 90px;
}

.admin-page-heading {
    max-width: 820px;
    margin-bottom: 28px;
}

.admin-page-heading h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.admin-notice {
    margin-bottom: 18px;
    border: 1px solid rgba(23, 59, 47, 0.18);
    border-radius: 8px;
    background: rgba(23, 59, 47, 0.08);
    color: var(--green);
    font-weight: 850;
    padding: 13px 16px;
}

.admin-notice-inline {
    margin: 0 0 16px;
}

.admin-notice-warning {
    border-color: rgba(160, 107, 59, 0.28);
    background: rgba(160, 107, 59, 0.1);
    color: var(--wood);
}

.admin-form {
    display: grid;
    gap: 22px;
}

.admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 14px 42px rgba(24, 36, 31, 0.07);
    padding: clamp(22px, 4vw, 34px);
}

.admin-card h2 {
    font-size: 1.55rem;
    margin-bottom: 20px;
}

.admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-card-head h2 {
    margin-bottom: 8px;
}

.admin-form label {
    display: grid;
    gap: 8px;
    color: var(--green);
    font-weight: 850;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.editor-source,
.editor-surface {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #FFFDF8;
    color: var(--ink);
    padding: 13px 14px;
}

.admin-two,
.admin-three,
.admin-four {
    display: grid;
    gap: 16px;
}

.admin-two {
    grid-template-columns: repeat(2, 1fr);
}

.admin-three {
    grid-template-columns: repeat(3, 1fr);
}

.admin-four {
    grid-template-columns: repeat(4, 1fr);
}

.calculator-admin-group {
    display: grid;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding: 20px 0;
}

.calculator-admin-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

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

.calculator-field-row {
    align-items: end;
}

.admin-tabs {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.admin-tab-list {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 8px;
}

.admin-tab-list button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.82);
    color: var(--green);
    cursor: pointer;
    font-weight: 850;
    padding: 12px 14px;
    text-align: left;
}

.admin-tab-list button.is-active {
    border-color: rgba(160, 107, 59, 0.34);
    background: rgba(160, 107, 59, 0.15);
}

.admin-tab-panel {
    display: none;
    min-width: 0;
}

.admin-tab-panel.is-active {
    display: grid;
    gap: 20px;
}

.admin-switch-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-toggle,
.admin-delete-check {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.84);
    padding: 10px 12px;
}

.admin-toggle input,
.admin-delete-check input {
    width: auto;
}

.admin-toggle span {
    color: var(--green);
}

.admin-delete-check {
    border-color: rgba(160, 107, 59, 0.28);
    background: rgba(160, 107, 59, 0.08);
}

.admin-delete-check span {
    color: var(--wood);
}

.material-permission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.material-permission {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.82);
    padding: 12px;
}

.material-permission input {
    width: auto;
    margin-top: 4px;
}

.material-permission span {
    display: grid;
    gap: 3px;
}

.material-permission strong {
    color: var(--green);
}

.material-permission small {
    color: var(--muted);
}

.admin-preview {
    display: block;
    max-width: 260px;
    max-height: 220px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg);
}

.wide-preview {
    max-width: 520px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.editor-toolbar button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--green);
    cursor: pointer;
    font-weight: 850;
    padding: 8px 10px;
}

.editor-surface {
    min-height: 180px;
}

.compact-editor .editor-surface {
    min-height: 120px;
}

.editor-source {
    min-height: 180px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.admin-reference-list article {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 16px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.admin-reference-list img,
.admin-image-empty {
    width: 120px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
}

.admin-image-empty {
    display: grid;
    place-items: center;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.admin-reference-list span,
.admin-help {
    color: var(--muted);
}

.gallery-admin-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

.gallery-admin-item img {
    width: 180px;
    max-height: 240px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg);
}

.gallery-admin-content {
    display: grid;
    gap: 12px;
}

.gallery-delete-option {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    border: 1px solid rgba(160, 107, 59, 0.28);
    border-radius: 8px;
    background: rgba(160, 107, 59, 0.08);
    color: var(--wood);
    padding: 10px 12px;
}

.gallery-delete-option input {
    width: auto;
}

.gallery-empty,
.gallery-upload-panel {
    border: 1px dashed rgba(160, 107, 59, 0.32);
    border-radius: 8px;
    background: rgba(250, 244, 235, 0.58);
    padding: 16px;
}

.gallery-empty {
    color: var(--muted);
    font-weight: 800;
}

.gallery-upload-panel {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.gallery-upload-panel .button {
    justify-self: start;
}

.selected-file-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    font-weight: 750;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: var(--green);
    font-weight: 800;
}

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

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

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto auto;
    }

    .brand {
        min-width: 0;
    }

    .menu-toggle {
        display: block;
        justify-self: end;
    }

    .main-nav {
        display: none;
        grid-column: 1 / -1;
        justify-content: stretch;
        flex-direction: column;
        border-top: 1px solid var(--line);
        padding-top: 12px;
    }

    .main-nav a + a {
        margin-left: 0;
        border-top: 1px solid rgba(160, 107, 59, 0.18);
    }

    .main-nav a + a::before {
        content: none;
    }

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

    .header-phone {
        display: none;
    }

    .hero,
    .about-band,
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        min-height: auto;
    }

    .workshop-visual {
        min-height: 520px;
    }

    .value-strip,
    .service-grid,
    .reference-grid,
    .step-layout,
    .choice-grid,
    .material-grid,
    .estimate-box {
        grid-template-columns: 1fr 1fr;
    }

    .wizard-progress {
        grid-template-columns: 1fr;
    }

    .calculator-field-grid,
    .admin-four {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-two,
    .admin-three,
    .admin-tabs,
    .gallery-left,
    .gallery-right,
    .gallery-admin-item {
        grid-template-columns: 1fr;
    }

    .admin-tab-list {
        position: static;
        grid-template-columns: repeat(2, 1fr);
    }

    .material-permission-grid {
        grid-template-columns: 1fr;
    }

    .gallery-right img,
    .gallery-bottom img {
        order: 0;
    }

    .admin-reference-list article {
        grid-template-columns: 100px 1fr;
    }

    .admin-reference-list article .button,
    .admin-reference-list article .text-link {
        grid-column: 1 / -1;
    }

    .value-strip article:nth-child(3) {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid rgba(255, 253, 248, 0.18);
    }
}

@media (max-width: 680px) {
    .section-grid,
    .section,
    .value-strip,
    .cta-band,
    .contact-cta,
    .page-hero,
    .site-footer {
        width: min(100% - 28px, 1180px);
    }

    h1 {
        font-size: clamp(2.15rem, 9vw, 3rem);
    }

    .hero {
        padding-top: 34px;
    }

    .hero-actions,
    .cta-band,
    .contact-cta,
    .site-footer,
    .row-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .workshop-visual {
        min-height: 470px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand-fallback {
        width: 42px;
        height: 42px;
    }

    .brand-tagline {
        display: none;
    }

    .about-brand {
        min-height: 320px;
        aspect-ratio: auto;
    }

    .about-band h2 {
        font-size: 2rem;
    }

    .value-strip,
    .service-grid,
    .reference-grid,
    .step-layout,
    .choice-grid,
    .material-grid,
    .calculator-field-grid,
    .estimate-box,
    .admin-four,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .fitting-row {
        grid-template-columns: 1fr;
    }

    .wizard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .wizard-actions .button {
        min-width: 0;
        width: 100%;
    }

    .wizard-step h2 {
        font-size: 1.5rem;
    }

    .admin-shell {
        width: min(100% - 28px, 1180px);
        padding-top: 36px;
    }

    .admin-nav {
        width: 100%;
    }

    .admin-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .admin-card-head,
    .admin-switch-row {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-tab-list {
        grid-template-columns: 1fr;
    }

    .value-strip article + article,
    .value-strip article:nth-child(3) {
        border-left: 0;
        border-top: 1px solid rgba(255, 253, 248, 0.18);
    }

    .section {
        padding-top: 52px;
    }

    .page-hero {
        padding-top: 62px;
    }

    .page-hero + .section {
        padding-top: 34px;
    }

    .contact-layout {
        padding-top: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
