/* ============================================
   Carpenter's Barber Shop — Stylesheet
   Palette: Midnight Blue + Mint, fresh & airy
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --midnight-950: #050d1a;
    --midnight-900: #0a1628;
    --midnight-800: #0f1f36;
    --midnight-700: #162a4a;
    --midnight-600: #1e3a5f;
    --midnight-500: #254a73;
    --midnight-400: #3d6a94;
    --midnight-300: #6b9bc0;
    --midnight-200: #a3c4de;
    --midnight-100: #d0e4f2;
    --midnight-50:  #eaf4fb;

    --mint-50:  #f0fdf4;
    --mint-100: #dcfce7;
    --mint-200: #bbf7d0;
    --mint-300: #86efac;
    --mint-400: #4ade80;
    --mint-500: #22c55e;
    --mint-600: #16a34a;

    --sand-50:  #fdfcf8;
    --sand-100: #faf8f3;
    --sand-200: #f5f0e8;
    --sand-300: #ede6d8;

    --text-primary:   #0f172a;
    --text-secondary: #334155;
    --text-muted:     #64748b;
    --text-light:     #f8fafc;
    --text-light-muted: #94a3b8;

    --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --shadow-sm:  0 1px 3px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
    --shadow-md:  0 4px 16px rgba(10, 22, 40, 0.08), 0 2px 6px rgba(10, 22, 40, 0.05);
    --shadow-lg:  0 12px 40px rgba(10, 22, 40, 0.12), 0 4px 12px rgba(10, 22, 40, 0.07);
    --shadow-xl:  0 24px 60px rgba(10, 22, 40, 0.15), 0 8px 20px rgba(10, 22, 40, 0.08);

    --transition-fast: 0.2s ease;
    --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--sand-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* --- Accessibility --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--midnight-800);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
}

.skip-link:focus {
    top: 12px;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
    color: var(--midnight-900);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--mint-400);
    color: var(--midnight-900);
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.35);
}

.btn-primary:hover {
    background: var(--mint-300);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.45);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    background: rgba(253, 252, 248, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* --- Logo --- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--midnight-800);
    letter-spacing: -0.02em;
}

.logo-icon {
    color: var(--midnight-600);
}

/* --- Navigation --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--sand-200);
}

.hamburger {
    position: relative;
    width: 20px;
    height: 14px;
    display: block;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--midnight-700);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger::before { top: 0; }
.hamburger span { top: 6px; }
.hamburger::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .hamburger span {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    bottom: 6px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 50px;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--midnight-800);
    background: var(--sand-200);
}

.nav-cta {
    margin-left: 8px;
    padding: 10px 24px;
    font-size: 14px;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--midnight-900);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(5, 13, 26, 0.88) 0%,
        rgba(15, 31, 54, 0.75) 40%,
        rgba(30, 58, 95, 0.6) 70%,
        rgba(37, 74, 115, 0.5) 100%
    );
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(5, 13, 26, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 800px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mint-300);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title em {
    font-style: italic;
    color: var(--mint-300);
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-light-muted);
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light-muted);
    backdrop-filter: blur(8px);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-light-muted);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
    animation: float 2.5s ease-in-out infinite;
}

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

/* --- Section Shared --- */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--midnight-400);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 500;
    color: var(--midnight-900);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--sand-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    border: 1px solid var(--sand-300);
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--mint-200);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--midnight-50) 0%, var(--mint-50) 100%);
    border-radius: var(--radius-md);
    color: var(--midnight-600);
    margin-bottom: 20px;
}

.service-name {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--midnight-800);
    margin-bottom: 10px;
}

.service-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-img-main img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.about-img-secondary {
    position: absolute;
    bottom: -32px;
    right: -24px;
    width: 55%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid white;
}

.about-img-secondary img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.about-accent {
    position: absolute;
    top: -20px;
    right: -16px;
    width: 72px;
    height: 72px;
    background: var(--mint-400);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--midnight-900);
    box-shadow: var(--shadow-md);
}

.about-content {
    padding: 16px 0;
}

.about-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.feature-check {
    color: var(--mint-500);
    flex-shrink: 0;
}

/* --- Gallery --- */
.gallery {
    padding: 100px 0;
    background: var(--sand-50);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 260px);
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 3; }
.gallery-item:nth-child(2) { grid-column: 6 / 9; grid-row: 1 / 2; }
.gallery-item:nth-child(3) { grid-column: 9 / 13; grid-row: 1 / 2; }
.gallery-item:nth-child(4) { grid-column: 6 / 13; grid-row: 2 / 3; }

/* --- Quote Section --- */
.quote-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--midnight-900) 0%, var(--midnight-700) 100%);
    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.quote-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(163, 196, 222, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.quote-card {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.quote-mark {
    color: var(--mint-400);
    margin-bottom: 24px;
    opacity: 0.6;
}

.quote-card blockquote {
    font-family: var(--font-serif);
    font-size: clamp(20px, 3vw, 28px);
    font-style: italic;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.55;
    margin-bottom: 32px;
}

.quote-card footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quote-author {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    font-style: normal;
    color: var(--mint-300);
}

.quote-location {
    font-size: 13px;
    color: var(--text-light-muted);
}

/* --- Visit Section --- */
.visit {
    padding: 100px 0;
    background: white;
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.visit-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    background: var(--sand-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--sand-300);
    transition: all var(--transition-base);
}

.info-card:hover {
    border-color: var(--mint-200);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    color: var(--midnight-600);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.info-card h3 {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.info-card p,
.info-card a {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.info-card a:hover {
    color: var(--midnight-600);
    text-decoration: underline;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    font-size: 15px;
    padding: 4px 0;
}

.hours-closed span:last-child {
    color: var(--text-muted);
}

.visit-map {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 420px;
    border: 1px solid var(--sand-300);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 420px;
}

/* --- Footer --- */
.site-footer {
    background: var(--midnight-900);
    color: var(--text-light);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    color: var(--text-light);
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    color: var(--mint-400);
}

.footer-tagline {
    font-size: 15px;
    color: var(--text-light-muted);
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mint-300);
    margin-bottom: 20px;
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a,
.footer-contact a {
    font-size: 15px;
    color: var(--text-light-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--text-light);
}

.footer-contact li:last-child {
    color: var(--text-light-muted);
    font-size: 15px;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    font-size: 14px;
    color: var(--text-light-muted);
}

/* --- Reveal Animations --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
    .reveal:nth-child(4) { transition-delay: 0.24s; }
    .reveal:nth-child(5) { transition-delay: 0.32s; }
    .reveal:nth-child(6) { transition-delay: 0.40s; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        gap: 48px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .gallery-item:nth-child(1) { grid-column: 1 / 3; grid-row: auto; }
    .gallery-item:nth-child(2) { grid-column: 1 / 2; grid-row: auto; }
    .gallery-item:nth-child(3) { grid-column: 2 / 3; grid-row: auto; }
    .gallery-item:nth-child(4) { grid-column: 1 / 3; grid-row: auto; }

    .gallery-item img {
        height: 280px;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(253, 252, 248, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 24px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--sand-300);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    .nav-link:hover {
        background: var(--sand-200);
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 8px;
        justify-content: center;
    }

    .hero-content {
        padding: 140px 20px 100px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

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

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

    .about-images {
        max-width: 480px;
        margin: 0 auto;
    }

    .about-img-main img {
        height: 360px;
    }

    .about-img-secondary {
        width: 60%;
        right: -12px;
        bottom: -20px;
    }

    .about-img-secondary img {
        height: 200px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

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

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(4) {
        grid-column: 1 / -1;
    }

    .gallery-item img {
        height: 240px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-badges {
        flex-direction: column;
        gap: 8px;
    }

    .section-title {
        font-size: 26px;
    }
}
