/*
 * SwissShelters Design System
 * ===========================
 * Swiss engineering precision applied to life-critical infrastructure
 * Version 1.0 | January 2026
 */

/* ===========================================
   1. CSS CUSTOM PROPERTIES
   =========================================== */
:root {
    /* Colors */
    --color-antique-white: #FFEEDB;
    --color-english-violet: #4C3B4D;
    --color-chili-red: #DA291C;
    --color-chili-red-hover: #B82118;
    --color-mint: #61C9A8;
    --color-mint-hover: #4FA88A;
    --color-rose-quartz: #ADA8B6;
    --color-white: #FFFFFF;
    --color-grid: rgba(76, 59, 77, 0.08);

    /* Spacing (8px base) */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Typography */
    --font-display: "Space Grotesk", "Inter", sans-serif;
    --font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    --font-size-display: 56px;
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-h3: 28px;
    --font-size-h4: 20px;
    --font-size-body: 18px;
    --font-size-small: 16px;
    --font-size-caption: 14px;
    --font-size-eyebrow: 12px;

    --line-height-h1: 1.1;
    --line-height-h2: 1.2;
    --line-height-h3: 1.3;
    --line-height-h4: 1.4;
    --line-height-body: 1.6;
    --line-height-small: 1.5;
    --line-height-caption: 1.4;

    /* Layout */
    --max-width: 1200px;
    --side-margin: 80px;
    --side-margin-mobile: 24px;
    --column-gap: 32px;
}

/* Mobile typography overrides */
@media (max-width: 767px) {
    :root {
        --font-size-h1: 36px;
        --font-size-h2: 28px;
        --font-size-h3: 24px;
        --font-size-h4: 18px;
        --font-size-body: 16px;
        --side-margin: 24px;
    }
}

/* ===========================================
   2. RESET & BASE STYLES
   =========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-body);
    color: var(--color-english-violet);
    background-color: var(--color-antique-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-english-violet);
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-mint);
}

/* ===========================================
   3. TYPOGRAPHY
   =========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-medium);
    color: var(--color-english-violet);
}

h1 {
    font-size: var(--font-size-h1);
    line-height: var(--line-height-h1);
}

h2 {
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
}

h3 {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
}

h4 {
    font-size: var(--font-size-h4);
    line-height: var(--line-height-h4);
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

.text-secondary {
    color: var(--color-rose-quartz);
}

.text-small {
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
}

.text-caption {
    font-size: var(--font-size-caption);
    line-height: var(--line-height-caption);
}

/* ===========================================
   4. LAYOUT
   =========================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-margin);
}

@media (max-width: 767px) {
    .container {
        padding: 0 var(--side-margin-mobile);
    }
}

.section {
    padding: var(--space-2xl) 0;
}

.section--reduced {
    padding: var(--space-xl) 0;
}

@media (max-width: 767px) {
    .section {
        padding: var(--space-lg) 0;
    }

    .section--reduced {
        padding: var(--space-md) 0;
    }
}

/* Grid system */
.grid {
    display: grid;
    gap: var(--column-gap);
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {

    .grid--3,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   5. COMPONENTS: BUTTONS
   =========================================== */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
    background-color: var(--color-chili-red);
    color: var(--color-antique-white);
}

.btn--primary:hover {
    background-color: var(--color-chili-red-hover);
    color: var(--color-antique-white);
}

.btn--secondary {
    background-color: var(--color-mint);
    color: var(--color-english-violet);
}

.btn--secondary:hover {
    background-color: var(--color-mint-hover);
    color: var(--color-english-violet);
}

/* ===========================================
   6. COMPONENTS: FORMS
   =========================================== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-medium);
    color: var(--color-english-violet);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px var(--space-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    color: var(--color-english-violet);
    background-color: var(--color-white);
    border: 2px solid var(--color-rose-quartz);
    border-radius: 0;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-english-violet);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-rose-quartz);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--color-chili-red);
}

.form-error {
    margin-top: var(--space-xs);
    font-size: var(--font-size-caption);
    color: var(--color-chili-red);
}

.form-success {
    padding: var(--space-md);
    background-color: var(--color-mint);
    color: var(--color-english-violet);
    text-align: center;
}

/* ===========================================
   7. COMPONENTS: NAVIGATION
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-antique-white);
    border-bottom: 1px solid var(--color-rose-quartz);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--side-margin);
    max-width: calc(var(--max-width) + var(--side-margin) * 2);
    margin: 0 auto;
}

@media (max-width: 767px) {
    .header__inner {
        padding: var(--space-sm) var(--side-margin-mobile);
    }
}

.header__logo {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav__link {
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    color: var(--color-english-violet);
    transition: color 0.2s ease;
}

.nav__link:hover {
    color: var(--color-chili-red);
}

.nav__link--active {
    color: var(--color-chili-red);
    position: relative;
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-chili-red);
}

/* Mobile navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle__bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-english-violet);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xl);
        background-color: var(--color-antique-white);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav--open {
        opacity: 1;
        visibility: visible;
    }

    .nav__link {
        font-size: var(--font-size-h3);
    }
}

/* Hamburger animation */
.nav-toggle--active .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle--active .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle--active .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===========================================
   8. COMPONENTS: HERO
   =========================================== */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-english-violet);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(30, 30, 40, 0.85) 0%,
            rgba(30, 30, 40, 0.6) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-2xl) var(--side-margin);
    max-width: 900px;
}

@media (max-width: 767px) {
    .hero__content {
        padding: var(--space-lg) var(--side-margin-mobile);
    }
}

.hero__logo {
    height: 50px;
    width: auto;
    margin: 0 auto var(--space-lg);
}

@media (max-width: 767px) {
    .hero__logo {
        height: 36px;
        margin-bottom: var(--space-md);
    }
}

.hero__title {
    color: #FFFFFF;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    color: #FFFFFF;
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* ===========================================
   9. COMPONENTS: CARDS
   =========================================== */
.card {
    position: relative;
    padding: var(--space-lg) var(--space-md);
    background: transparent;
    border: none;
    border-left: 3px solid var(--color-chili-red);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3px;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--color-chili-red), var(--color-english-violet));
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover::before {
    height: 100%;
}

.card:hover {
    transform: translateX(8px);
    background: rgba(76, 59, 77, 0.03);
}

.card__title {
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-h4);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card__text {
    font-size: var(--font-size-small);
    color: rgba(76, 59, 77, 0.75);
    line-height: 1.7;
}

/* ===========================================
   10. COMPONENTS: FOOTER
   =========================================== */
.footer {
    background-color: var(--color-english-violet);
    color: var(--color-antique-white);
    padding: var(--space-xl) 0;
}

.footer__inner {
    text-align: center;
}

.footer__text {
    font-size: var(--font-size-caption);
    opacity: 0.9;
}

/* ===========================================
   11. PAGE-SPECIFIC: INTERIOR PAGES
   =========================================== */
.page-header {
    padding-top: calc(80px + var(--space-3xl));
    padding-bottom: var(--space-2xl);
    background-color: var(--color-antique-white);
}

@media (max-width: 767px) {
    .page-header {
        padding-top: calc(60px + var(--space-xl));
        padding-bottom: var(--space-lg);
    }
}

.page-header__title {
    margin-bottom: var(--space-sm);
}

.page-header__subtitle {
    font-size: var(--font-size-body);
    color: rgba(76, 59, 77, 0.8);
}

/* Content sections */
.content-section {
    margin-bottom: var(--space-2xl);
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section__title {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-rose-quartz);
}

.content-section__subtitle {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

/* ===========================================
   12. UTILITIES
   =========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-2xl {
    margin-bottom: var(--space-2xl);
}

.mt-0 {
    margin-top: 0;
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--color-rose-quartz);
    margin: var(--space-2xl) 0;
}

/* ===========================================
   13. AVANT-GARDE COMPONENTS
   =========================================== */

/* Typographic Wordmark */
.wordmark {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-english-violet);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.wordmark__accent {
    font-weight: var(--font-weight-regular);
    opacity: 0.7;
}

.wordmark--light {
    color: var(--color-white);
}

.wordmark--light .wordmark__accent {
    opacity: 0.85;
}

/* Gridline Pattern Overlay */
.grid-pattern {
    position: relative;
}

.grid-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(90deg,
            var(--color-grid) 0,
            var(--color-grid) 1px,
            transparent 1px,
            transparent 80px),
        repeating-linear-gradient(0deg,
            var(--color-grid) 0,
            var(--color-grid) 1px,
            transparent 1px,
            transparent 80px);
    z-index: 0;
}

.grid-pattern>* {
    position: relative;
    z-index: 1;
}

/* Eyebrow Labels */
.eyebrow {
    display: block;
    font-family: var(--font-family);
    font-size: var(--font-size-eyebrow);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-chili-red);
    margin-bottom: var(--space-sm);
}

/* Section Numbers */
.section-number {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: var(--color-english-violet);
    opacity: 0.08;
    position: absolute;
    top: -20px;
    left: -10px;
    pointer-events: none;
    user-select: none;
}

/* Numbered Cards (Avant-garde) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl) var(--space-lg);
}

@media (max-width: 767px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.card-numbered {
    position: relative;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    background: transparent;
    border: none;
    border-left: 2px solid var(--color-chili-red);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-numbered:nth-child(even) {
    transform: translateY(40px);
}

@media (max-width: 767px) {
    .card-numbered:nth-child(even) {
        transform: translateY(0);
    }
}

.card-numbered::before {
    content: attr(data-number);
    position: absolute;
    top: var(--space-sm);
    left: var(--space-md);
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: var(--color-english-violet);
    opacity: 0.06;
    pointer-events: none;
}

.card-numbered:hover {
    transform: translateX(8px);
    background: rgba(76, 59, 77, 0.02);
    box-shadow: -4px 0 0 var(--color-chili-red);
}

.card-numbered:nth-child(even):hover {
    transform: translateX(8px) translateY(40px);
}

@media (max-width: 767px) {
    .card-numbered:nth-child(even):hover {
        transform: translateX(8px) translateY(0);
    }
}

.card-numbered__title {
    font-family: var(--font-display);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    color: var(--color-english-violet);
    margin-bottom: var(--space-xs);
}

.card-numbered__text {
    font-size: var(--font-size-small);
    color: rgba(76, 59, 77, 0.75);
    line-height: 1.7;
}

/* Pull Quote */
.pull-quote {
    font-family: var(--font-display);
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    color: var(--color-english-violet);
    border-left: 3px solid var(--color-chili-red);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
}

/* Asymmetric Two-Column Layout */
.layout-asymmetric {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 991px) {
    .layout-asymmetric {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.layout-asymmetric__sidebar {
    position: sticky;
    top: 100px;
}

@media (max-width: 991px) {
    .layout-asymmetric__sidebar {
        position: static;
    }
}

/* Service Band (for services page) */
.service-band {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-rose-quartz);
}

@media (max-width: 767px) {
    .service-band {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.service-band__number {
    font-family: var(--font-display);
    font-size: var(--font-size-display);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: rgba(76, 59, 77, 0.12);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
}

.service-band__icon {
    width: 56px;
    height: 56px;
    stroke: rgba(76, 59, 77, 0.35);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-band__title {
    font-family: var(--font-display);
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.service-band__content h4 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-medium);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
}

.service-band__content h4:first-child {
    margin-top: 0;
}

/* Enhanced Page Header with Grid */
.page-header--dramatic {
    position: relative;
    padding-top: calc(80px + var(--space-2xl));
    padding-bottom: var(--space-xl);
    background: linear-gradient(135deg,
            rgba(76, 59, 77, 0.03) 0%,
            rgba(76, 59, 77, 0.08) 100%);
    overflow: hidden;
}

.page-header--dramatic::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg,
            var(--color-grid) 0,
            var(--color-grid) 1px,
            transparent 1px,
            transparent 120px),
        repeating-linear-gradient(0deg,
            var(--color-grid) 0,
            var(--color-grid) 1px,
            transparent 1px,
            transparent 120px);
    opacity: 0.6;
}

.page-header--dramatic .container {
    position: relative;
    z-index: 1;
}

.page-header--dramatic .page-header__title {
    font-family: var(--font-display);
    font-size: var(--font-size-display);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
}

/* ===========================================
   14. PRINT STYLES
   =========================================== */
@media print {

    .header,
    .footer,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .hero {
        min-height: auto;
        padding: 20pt 0;
        background: none;
    }

    .hero::before {
        display: none;
    }

    .hero__title,
    .hero__subtitle {
        color: #000;
    }
}