/* ============================================
   MIKE & CO TAILOR — Style System
   Inspired by TailorMade London: white, clean,
   generous whitespace, typography-driven luxury
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* --- CSS Variables --- */
:root {
    --white: #ffffff;
    --off-white: #f9f8f6;
    --black: #111111;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --accent: #8b7355;
    --accent-light: #b8a088;
    --border: #e8e6e1;
    --border-light: #f0eee9;
    --overlay: rgba(0, 0, 0, 0.35);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Raleway', 'Helvetica Neue', sans-serif;

    --container: 1200px;
    --container-narrow: 800px;
    --section-pad: 120px;
    --section-pad-mobile: 70px;
    --header-height: 100px;

    --transition: 0.3s ease;
    --transition-slow: 0.6s ease;
}


/* --- Typography --- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--black);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }


/* --- Layout --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

.container--narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--section-pad) 0;
}

.section--alt {
    background: var(--off-white);
}

.section__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 16px;
}

.section__heading {
    margin-bottom: 24px;
}

.section__subtext {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.9;
}

.section__subtext--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.text-center { text-align: center; }


/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 16px 40px;
    transition: var(--transition);
    cursor: pointer;
}

.btn--primary {
    background: var(--black);
    color: var(--white);
}

.header__cta.btn--primary {
    background: #8b1a1a;
    color: #fff;
}

.btn--primary:hover {
    background: #333;
}

.btn--outline {
    border: 1px solid var(--black);
    color: var(--black);
    background: transparent;
}

.btn--outline:hover {
    background: var(--black);
    color: var(--white);
}

.btn--white {
    background: var(--white);
    color: var(--black);
}

.btn--white:hover {
    background: var(--off-white);
}


/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: #f3f4f6;
    transition: box-shadow var(--transition);
    display: flex;
    align-items: center;
}

.header.scrolled {
    box-shadow: 0 1px 0 var(--border);
}

.header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
    overflow: hidden;
}

.header__logo-icon {
    height: 85px;
    width: auto;
    object-fit: contain;
}

.header__logo-text {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.header__nav a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}

.header__nav a:hover,
.header__nav a.active {
    color: var(--black);
}

.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width var(--transition);
}

.header__nav a:hover::after,
.header__nav a.active::after {
    width: 100%;
}

.header__cta {
    margin-left: 12px;
}

.header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.header__toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--black);
    transition: var(--transition);
}

/* Mobile menu open state */
.header__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}
.header__toggle.open span:nth-child(2) {
    opacity: 0;
}
.header__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}


/* --- Mobile Nav Overlay --- */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    transition: opacity var(--transition);
}

.mobile-nav.open {
    display: flex;
    opacity: 1;
}

.mobile-nav a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--black);
    transition: color var(--transition);
}

.mobile-nav a:hover {
    color: var(--accent);
}


/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Hide fallback image when video is present and playing */
.hero__video + .hero__image {
    z-index: -1;
}

.hero__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay);
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 40px;
}

.hero__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}


/* --- Intro Section --- */
.intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro__image {
    overflow: hidden;
}

.intro__image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

/* --- Intro Slideshow --- */
.intro-slideshow {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.intro-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.intro-slide.active {
    opacity: 1;
}

.intro__text .section__heading {
    margin-bottom: 20px;
}


/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.service-card {
    text-align: center;
    padding: 40px 20px;
}

.service-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    opacity: 0.7;
}

.service-card__icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--black);
    stroke-width: 1;
    fill: none;
}

.service-card h3 {
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}


/* --- Process Section --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 60px;
    counter-reset: process;
}

.process-step {
    text-align: center;
    counter-increment: process;
    position: relative;
    padding: 0 16px;
}

.process-step::before {
    content: counter(process, decimal-leading-zero);
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--border);
    margin-bottom: 20px;
    line-height: 1;
}

.process-step h3 {
    margin-bottom: 12px;
}

.process-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Connecting line between steps */
.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -20px;
    width: 40px;
    height: 1px;
    background: var(--border);
}


/* --- Portfolio Preview --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 60px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.04);
}

.portfolio-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: background var(--transition);
}

.portfolio-item:hover .portfolio-item__overlay {
    background: rgba(0, 0, 0, 0.25);
}

.portfolio-item__caption {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.portfolio-item:hover .portfolio-item__caption {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-link {
    text-align: center;
    margin-top: 50px;
}


/* --- Testimonials --- */
.testimonials {
    text-align: center;
}

.testimonial-carousel {
    position: relative;
    max-width: 700px;
    margin: 50px auto 0;
    min-height: 200px;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.testimonial-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.testimonial-slide blockquote {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 24px;
}

.testimonial-slide cite {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.testimonial-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background var(--transition);
    padding: 0;
}

.testimonial-dots button.active {
    background: var(--black);
}


/* --- CTA Banner --- */
.cta-banner {
    text-align: center;
    padding: var(--section-pad) 0;
    background: var(--black);
    color: var(--white);
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: 16px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    margin-bottom: 36px;
}


/* --- Gallery Page --- */
.page-header {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 60px;
    text-align: center;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.gallery-filters button {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 24px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: var(--transition);
}

.gallery-filters button:hover {
    color: var(--black);
}

.gallery-filters button.active {
    color: var(--black);
    border-color: var(--black);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* Wide gallery items span 2 columns */
.gallery-item--wide {
    grid-column: span 2;
}

.gallery-item--wide img {
    aspect-ratio: 3/2;
}


/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: var(--white);
    font-size: 2rem;
    font-weight: 200;
    line-height: 1;
    z-index: 2001;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 200;
    opacity: 0.5;
    transition: opacity var(--transition);
    padding: 20px;
    z-index: 2001;
}

.lightbox__nav:hover {
    opacity: 1;
}

.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }


/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-form .form-group {
    margin-bottom: 24px;
}

.contact-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px 0;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    outline: none;
    transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--black);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.contact-form .btn {
    margin-top: 8px;
}

.contact-info h3 {
    margin-bottom: 24px;
}

.contact-detail {
    margin-bottom: 32px;
}

.contact-detail__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.contact-detail p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-detail a {
    transition: color var(--transition);
}

.contact-detail a:hover {
    color: var(--accent);
}

.contact-map {
    margin-top: 50px;
}

.contact-map iframe {
    width: 100%;
    height: 350px;
    border: none;
    filter: grayscale(100%);
    transition: filter var(--transition-slow);
}

.contact-map iframe:hover {
    filter: grayscale(0%);
}


/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-light);
    background: #f3f4f6;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer__brand {
    margin-bottom: 16px;
}

.footer__logo-img {
    width: 280px;
    height: auto;
    object-fit: contain;
}

/* --- Needle Divider --- */
.needle-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.needle-divider img {
    height: 60px;
    width: auto;
    opacity: 0.8;
}

.footer__tagline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 24px;
    max-width: 280px;
}

.footer__social {
    display: flex;
    gap: 20px;
}

.footer__social a {
    color: var(--text-light);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer__social a:hover {
    color: var(--black);
}

.footer h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul a {
    font-size: 0.92rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer ul a:hover {
    color: var(--black);
}

.footer__bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}


/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive --- */
@media (max-width: 1024px) {
    :root {
        --section-pad: 90px;
    }

    .services-grid,
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-step:not(:last-child)::after {
        display: none;
    }

    .intro {
        gap: 50px;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: var(--section-pad-mobile);
        --header-height: 64px;
    }

    .container,
    .container--narrow {
        padding: 0 24px;
    }

    /* Header mobile */
    .header__nav { display: none; }
    .header__cta { display: none; }
    .header__toggle { display: flex; }

    .header__logo-icon {
        height: 34px;
    }

    .header__logo-text {
        height: 24px;
    }

    /* Hero mobile */
    .hero { min-height: 500px; }
    .hero__subtitle { font-size: 0.95rem; }
    .hero__cta { flex-direction: column; align-items: center; }

    /* Intro */
    .intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .intro__image img {
        height: 350px;
    }

    /* Grids */
    .services-grid,
    .process-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portfolio-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item--wide {
        grid-column: span 1;
    }

    .gallery-item--wide img {
        aspect-ratio: 3/4;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    /* Testimonials */
    .testimonial-slide blockquote {
        font-size: 1.15rem;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .portfolio-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero__label {
        font-size: 0.65rem;
    }

    .gallery-filters {
        gap: 4px;
    }

    .gallery-filters button {
        padding: 8px 16px;
        font-size: 0.7rem;
    }

    .service-card {
        padding: 24px 12px;
    }
}
