/* ==========================================================================
   J.T. Griffiths & Co.
   Est. 1912 — Mattress Tickings & Applied Sewn Solutions
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;

    /* Warm tones */
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-800: #292524;

    /* Gold accent — heritage, quality */
    --gold: #b8860b;
    --gold-light: #d4a843;
    --gold-muted: #c9a96e;

    /* White */
    --white: #ffffff;

    /* Typography */
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing — tighter */
    --section-padding: 4rem 0;
    --container-width: 1140px;
    --container-padding: 0 2rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--slate-700);
    background-color: var(--white);
}

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

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-light);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--slate-800);
    line-height: 1.25;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ---------- Layout ---------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.section--slate {
    background-color: var(--slate-800);
    color: var(--slate-200);
}

.section--slate h2,
.section--slate h3,
.section--slate h4 {
    color: var(--white);
}

.section--stone {
    background-color: var(--stone-50);
}

.section--gold-rule {
    border-top: 3px solid var(--gold-muted);
}

/* ---------- Header / Navigation ---------- */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--stone-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-800);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-logo span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--slate-400);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--slate-900);
}

.site-nav a.nav-cta {
    background-color: var(--slate-800);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.site-nav a.nav-cta:hover {
    background-color: var(--slate-700);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--slate-800);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
    padding: 5rem 0;
    background-color: var(--slate-800);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-muted), var(--gold-light), var(--gold-muted));
}

/* Hero with background image overlay (subpages) */
.hero--overlay {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero--overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    z-index: 0;
}

.hero--overlay > .container {
    position: relative;
    z-index: 1;
}

.hero--overlay h1 {
    white-space: nowrap;
}

/* ---------- Homepage Hero — Full Viewport ---------- */
.hero--home {
    min-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero--home-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.7) 40%,
        rgba(15, 23, 42, 0.88) 100%
    );
    z-index: 1;
}

.hero--home-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.hero--home-content h1 {
    font-size: 4rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero--home-content p {
    margin: 0 auto;
}

.hero--home-content .hero-buttons {
    justify-content: center;
}

/* Staggered fade-in animation */
.hero-fade {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-fade--1 { animation-delay: 0.2s; }
.hero-fade--2 { animation-delay: 0.5s; }
.hero-fade--3 { animation-delay: 0.8s; }
.hero-fade--4 { animation-delay: 1.1s; }

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Frosted glass stats bar */
.hero--home-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.4);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.hero-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.25rem 0;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 3rem;
}

.hero-stat strong {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-muted);
    line-height: 1.2;
}

.hero-stat strong sup {
    font-size: 0.7rem;
    vertical-align: super;
}

.hero-stat span {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.15rem;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
}


/* ---------- Legacy hero elements (subpages + shared) ---------- */
.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    max-width: 700px;
}

.hero .established {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: 1.5rem;
    display: block;
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--slate-300);
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn--primary {
    background-color: var(--gold);
    color: var(--white);
}

.btn--primary:hover {
    background-color: var(--gold-light);
    color: var(--white);
}

.btn--outline {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--slate-400);
}

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

.btn--gold-outline {
    background-color: transparent;
    color: var(--gold-muted);
    border: 1px solid var(--gold-muted);
}

.btn--gold-outline:hover {
    background-color: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn--outline-dark {
    background-color: transparent;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
}

.btn--outline-dark:hover {
    border-color: var(--slate-800);
    color: var(--slate-800);
}

/* ---------- Stats Section — BOLD & PROUD ---------- */
.section--stats {
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
    padding: 4.5rem 0;
    border-bottom: 3px solid var(--gold-muted);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem 1rem;
}

.stat-item h3 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--gold-muted);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-item h3 sup {
    font-size: 1.5rem;
    vertical-align: super;
}

.stat-plus {
    font-size: 2.5rem;
    color: var(--gold-light);
}

.stat-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--slate-400);
    line-height: 1.5;
    max-width: 220px;
    margin: 0 auto;
}

/* ---------- Feature Grid (What We Do) ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.feature-image {
    height: 200px;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-image img {
    transform: scale(1.03);
}

.feature-content {
    padding: 1.5rem;
}

.feature-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--slate-600);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- Why Work With Us (Reasons Grid) ---------- */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.reason-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--gold-muted);
    transition: box-shadow 0.3s ease;
}

.reason-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.reason-icon {
    color: var(--gold);
    margin-bottom: 1rem;
}

.reason-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.reason-card p {
    font-size: 0.9rem;
    color: var(--slate-600);
    line-height: 1.65;
}

/* ---------- Partners / Who We Work With ---------- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.partner-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.partner-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.partner-item span {
    font-size: 0.95rem;
    color: var(--slate-300);
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- Two-Column Layout ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.two-col--text h2 {
    margin-bottom: 1rem;
}

.two-col--text p {
    font-size: 1.02rem;
}

/* Image cards */
.img-card {
    border-radius: 4px;
    overflow: hidden;
    height: 350px;
}

.img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- CTA Section ---------- */
.section--cta {
    border-top: 3px solid var(--gold-muted);
    background: var(--stone-50);
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--slate-900);
    color: var(--slate-400);
    padding: 5rem 0 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--slate-400);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.site-footer p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.site-footer h4 {
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer ul li {
    margin-bottom: 0.75rem;
}

.site-footer ul a {
    color: var(--slate-400);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.site-footer ul a:hover {
    color: var(--white);
}

/* Footer contact details — more prominent */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--gold-muted);
}

.footer-contact-item a,
.footer-contact-item span {
    color: var(--slate-300);
    font-size: 0.95rem;
}

.footer-contact-item a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--slate-800);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--slate-600);
}

/* ---------- Partnership Models ---------- */
.partnership-models {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.partnership-card {
    background: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.partnership-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.partnership-card--header {
    background: var(--slate-800);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.partnership-card--header h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin: 0;
}

.partnership-tag {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-muted);
    border: 1px solid var(--gold-muted);
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    white-space: nowrap;
}

.partnership-card--body {
    padding: 2rem;
}

.partnership-card--body p {
    font-size: 1rem;
    color: var(--slate-600);
    margin-bottom: 1.25rem;
}

.partnership-card--body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.partnership-card--body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    color: var(--slate-600);
    line-height: 1.6;
}

.partnership-card--body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 8px;
    height: 8px;
    background-color: var(--gold-muted);
    border-radius: 50%;
}

/* ---------- Regions Grid ---------- */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.region-card {
    background: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: 6px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.region-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.region-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.region-card p {
    font-size: 0.88rem;
    color: var(--slate-500);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.region-status {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 3px;
}

.region-status--active {
    background-color: rgba(184, 134, 11, 0.1);
    color: var(--gold);
    border: 1px solid rgba(184, 134, 11, 0.25);
}

.region-status--open {
    background-color: var(--slate-100);
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

/* ---------- Partner Benefits Grid ---------- */
.partner-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.partner-benefit {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.partner-benefit h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.partner-benefit p {
    font-size: 0.9rem;
    color: var(--slate-400);
    line-height: 1.65;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero { padding: 4rem 0; }
    .hero--home-content h1 { font-size: 3rem; }
    .hero-stat { padding: 0 2rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .reasons-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; gap: 2rem; }
    .partners-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .regions-grid { grid-template-columns: repeat(2, 1fr); }
    .partner-benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 0;
    }

    .hero--overlay h1 {
        white-space: normal;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--stone-200);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero h1 { font-size: 2.1rem; }
    .hero { padding: 3rem 0; }
    .hero--home { min-height: 100svh; background-attachment: scroll; }
    .hero--home-content { padding-top: 6rem; padding-bottom: 5rem; }
    .hero--home-content h1 { font-size: 2.2rem; }
    .hero--home-content p { font-size: 0.95rem; }
    .hero-scroll-hint { bottom: 75px; }
    .hero-stat { padding: 0 1.25rem; }
    .hero-stat strong { font-size: 1.3rem; }
    .hero-stat span { font-size: 0.6rem; }
    .hero-stat-divider { height: 24px; }
    .features-grid { grid-template-columns: 1fr; }
    .reasons-grid { grid-template-columns: 1fr; }
    .partners-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { text-align: center; }
    .partnership-models { grid-template-columns: 1fr; }
    .regions-grid { grid-template-columns: 1fr; }
    .partner-benefits-grid { grid-template-columns: 1fr; }
    .partnership-card--header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
