/* ===========================================
   Guitta Tabet — Architecture Portfolio
   Dark · Cinematic · Architectural
   =========================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:      #111110;
    --bg-dark: #0c0c0a;
    --bg-mid:  #181715;
    --text:    #f0ede6;
    --mid:     #7a776f;
    --accent:  #c8a96e;
    --border:  rgba(240, 237, 230, 0.08);
    --serif:   'Playfair Display', Georgia, serif;
    --sans:    'Raleway', system-ui, -apple-system, sans-serif;
    --nav-h:   80px;
    --max:     1360px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.85s ease, transform 0.85s ease;
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.reveal.visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}
.reveal-d1 { transition-delay: 0.15s; }
.reveal-d2 { transition-delay: 0.30s; }
.reveal-d3 { transition-delay: 0.45s; }

/* ---- Shared ---- */
.section-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 22px;
}

.section-num {
    display: block;
    font-family: var(--serif);
    font-size: clamp(80px, 10vw, 140px);
    font-weight: 300;
    line-height: 1;
    color: rgba(200, 169, 110, 0.10);
    margin-bottom: -20px;
    letter-spacing: -0.02em;
}

.gold-line {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin-bottom: 28px;
}

/* ===========================================
   NAVIGATION
   =========================================== */

#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.5s ease;
}

#site-header.scrolled {
    background: rgba(12, 12, 10, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border);
}

/* When mobile menu opens, drop backdrop-filter so the fixed
   overlay is not trapped inside the header's stacking context */
#site-header.menu-open {
    background: var(--bg-dark);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: transparent;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    padding: 0 56px;
    max-width: var(--max);
    margin: 0 auto;
}

.nav-logo img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 48px;
}

.nav-links a {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.65);
    transition: color 0.3s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.35s ease;
}
.nav-links a:hover        { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 1px;
    background: var(--text);
    transition: all 0.32s ease;
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===========================================
   HERO
   =========================================== */

.hero {
    position: relative;
    height: 100vh;
    min-height: 680px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    animation: heroZoom 10s ease forwards;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
@keyframes heroZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 9, 8, 0.30) 0%,
        rgba(10, 9, 8, 0.25) 30%,
        rgba(10, 9, 8, 0.75) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 80px 100px;
    max-width: 1100px;
    animation: heroFade 1.6s ease 0.3s both;
}
@keyframes heroFade {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}

.hero-eyebrow {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 36px; height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(88px, 14vw, 180px);
    font-weight: 300;
    line-height: 0.88;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 52px;
}
.hero-title em {
    display: block;
    font-style: italic;
    color: var(--accent);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text);
    border: 1px solid rgba(240, 237, 230, 0.25);
    padding: 16px 36px;
    transition: all 0.35s ease;
}
.hero-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    right: 56px;
    bottom: 56px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.hero-scroll span {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.4);
    writing-mode: vertical-rl;
}
.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), rgba(200,169,110,0));
    animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1; }
}

/* ===========================================
   ABOUT
   =========================================== */

.about { background: var(--bg); }

.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

.about-image {
    overflow: hidden;
    position: relative;
}
.about-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}
.about-image:hover img { transform: scale(1.04); }

/* Gold corner accent */
.about-image::after {
    content: '';
    position: absolute;
    bottom: 32px; right: 32px;
    width: 60px; height: 60px;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    pointer-events: none;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 88px 96px;
    background: var(--bg-mid);
}

.about-text h2 {
    font-family: var(--serif);
    font-size: clamp(44px, 4.5vw, 68px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 28px;
}
.about-text h2 em {
    font-style: italic;
    color: var(--accent);
}

.about-text p {
    font-size: 15px;
    font-weight: 300;
    color: var(--mid);
    line-height: 1.95;
    max-width: 440px;
    margin-bottom: 16px;
}

.about-mission-tagline {
    font-family: var(--serif);
    font-size: 21px !important;
    font-style: italic;
    color: var(--accent) !important;
    margin-top: 16px;
}

/* ===========================================
   SERVICES
   =========================================== */

.services {
    background: var(--bg-dark);
    padding: 112px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.services-header {
    text-align: center;
    margin-bottom: 72px;
    padding: 0 40px;
}
.services-header h2 {
    font-family: var(--serif);
    font-size: clamp(40px, 4.5vw, 64px);
    font-weight: 300;
    color: var(--text);
}
.services-header h2 em {
    font-style: italic;
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 56px;
    gap: 0;
}

.service-item {
    padding: 48px;
    border-top: 1px solid var(--border);
    position: relative;
}
.service-item + .service-item {
    border-left: 1px solid var(--border);
}

.service-num {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 300;
    color: var(--accent);
    opacity: 0.4;
    line-height: 1;
    margin-bottom: 20px;
    display: block;
}

.service-item h3 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.service-item p {
    font-size: 14px;
    font-weight: 300;
    color: var(--mid);
    line-height: 1.85;
    max-width: 320px;
}

/* ===========================================
   QUOTE
   =========================================== */

.quote-section {
    background: var(--bg-dark);
    padding: 120px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.quote-section::before {
    content: '"';
    font-family: var(--serif);
    font-size: 400px;
    font-weight: 300;
    color: rgba(200, 169, 110, 0.04);
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.quote-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}
.quote-inner blockquote {
    font-family: var(--serif);
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 300;
    font-style: italic;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 36px;
}
.quote-inner cite {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.quote-inner cite::before,
.quote-inner cite::after {
    content: '';
    display: block;
    width: 28px; height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

/* ===========================================
   PROJECTS GALLERY
   =========================================== */

.projects {
    background: var(--bg);
    padding: 112px 0;
}

.projects-header {
    text-align: center;
    padding: 0 56px;
    margin-bottom: 72px;
}
.projects-header h2 {
    font-family: var(--serif);
    font-size: clamp(44px, 5vw, 72px);
    font-weight: 300;
    color: var(--text);
}
.projects-header h2 em {
    font-style: italic;
    color: var(--accent);
}

/* ---- Project sections ---- */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 96px;
}

.project-section { }

.project-header {
    padding: 0 56px;
    margin-bottom: 32px;
    display: flex;
    align-items: baseline;
    gap: 20px;
}
.project-header h3 {
    font-family: var(--serif);
    font-size: clamp(26px, 3vw, 44px);
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ---- Carousel ---- */
.project-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.65s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.carousel-slide a { display: block; }

.carousel-slide img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Arrow buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(12, 11, 9, 0.55);
    border: 1px solid rgba(200, 169, 110, 0.35);
    color: var(--accent);
    width: 52px; height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    z-index: 2;
}
.carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
}
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* Counter */
.carousel-counter {
    position: absolute;
    bottom: 16px; right: 20px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: rgba(240, 237, 230, 0.75);
    background: rgba(12, 11, 9, 0.5);
    padding: 5px 12px;
}
.carousel-sep { margin: 0 5px; color: var(--accent); }

/* Keep old overlay styles for reference — unused */
.gallery-overlay-inner span {
    display: block;
    width: 44px; height: 44px;
    border: 1px solid rgba(200, 169, 110, 0.8);
    border-radius: 50%;
    position: relative;
}
.gallery-overlay-inner span::before,
.gallery-overlay-inner span::after {
    content: '';
    position: absolute;
    background: var(--accent);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.gallery-overlay-inner span::before { width: 14px; height: 1px; }
.gallery-overlay-inner span::after  { width: 1px; height: 14px; }

.gallery-item:hover .gallery-overlay           { background: rgba(12, 11, 9, 0.55); }
.gallery-item:hover .gallery-overlay-inner     { opacity: 1; transform: none; }
.gallery-item:hover img                        { transform: scale(1.06); }

/* ===========================================
   CONTACT
   =========================================== */

.contact {
    background: var(--bg-mid);
    padding: 112px 0;
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 56px;
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 100px;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--serif);
    font-size: clamp(40px, 4vw, 62px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 36px;
}
.contact-info h2 em {
    font-style: italic;
    color: var(--accent);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
}
.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 300;
    color: var(--mid);
    transition: color 0.3s;
}
.contact-detail:hover { color: var(--accent); }
.contact-detail i {
    font-size: 15px;
    color: var(--accent);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.contact-social {
    display: flex;
    gap: 10px;
}
.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    color: var(--mid);
    font-size: 14px;
    transition: all 0.3s ease;
}
.contact-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Form */
#form-messages {
    margin-bottom: 20px;
    font-size: 13px;
    padding: 13px 18px;
    display: none;
    font-weight: 300;
}
#form-messages.success {
    display: block;
    background: rgba(200, 169, 110, 0.1);
    color: var(--accent);
    border-left: 2px solid var(--accent);
}
#form-messages.error {
    display: block;
    background: rgba(180, 60, 60, 0.1);
    color: #d07070;
    border-left: 2px solid #c05050;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

#contact-form-ajax input,
#contact-form-ajax textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 15px 18px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 300;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    -webkit-appearance: none;
    appearance: none;
}
#contact-form-ajax input::placeholder,
#contact-form-ajax textarea::placeholder { color: rgba(120,117,110,0.7); }
#contact-form-ajax input:focus,
#contact-form-ajax textarea:focus {
    border-color: var(--accent);
    background: rgba(200,169,110,0.04);
}

#contact-form-ajax textarea {
    display: block;
    resize: vertical;
    min-height: 148px;
    margin-top: 12px;
    margin-bottom: 14px;
}

#btn_submit {
    width: 100%;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 18px 40px;
    cursor: pointer;
    transition: background 0.35s ease, color 0.35s ease;
}
#btn_submit:hover {
    background: var(--text);
    color: var(--bg-dark);
}

/* ===========================================
   FOOTER
   =========================================== */

.site-footer {
    background: var(--bg-dark);
    padding: 40px 56px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.5;
}

.footer-social {
    display: flex;
    gap: 22px;
}
.footer-social a {
    font-size: 14px;
    color: rgba(240,237,230,0.3);
    transition: color 0.3s;
}
.footer-social a:hover { color: var(--accent); }

.footer-copy {
    font-size: 11px;
    color: rgba(240,237,230,0.25);
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 1200px) {
    .about-text { padding: 72px 64px; }
    .services-grid { padding: 0 40px; }
    .service-item { padding: 44px 40px; }
}

@media (max-width: 960px) {
    .project-header { padding: 0 40px; }
    .projects-list  { gap: 72px; }

    .about-row { grid-template-columns: 1fr; }
    .about-image { min-height: 400px; }
    .about-text  { padding: 64px 48px; }
    .about-text p { max-width: 100%; }

    .services-grid { grid-template-columns: 1fr; gap: 0; padding: 0 28px; }
    .service-item { padding: 40px 0; border-left: none !important; border-top: 1px solid var(--border); }
    .service-item:first-child { border-top: 1px solid var(--border); }

    .contact-inner { grid-template-columns: 1fr; gap: 60px; }

    .hero-content { padding: 0 48px 80px; }
    .hero-scroll  { right: 40px; bottom: 48px; }
}

@media (max-width: 768px) {
    :root { --nav-h: 68px; }

    .nav-container { padding: 0 24px; }
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0; bottom: 0;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 48px;
        z-index: 999;
        border-top: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        font-size: 12px;
        letter-spacing: 0.2em;
        color: var(--text);
    }

    .hero-content { padding: 0 28px 72px; }
    .hero-scroll { display: none; }

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

    .footer-inner { flex-direction: column; gap: 20px; text-align: center; }

    .contact-inner { padding: 0 28px; }
    .projects-header,
    .services-header  { padding: 0 28px; }
    .project-header   { padding: 0 20px; }
    .projects-list    { gap: 56px; }
    .carousel-btn     { width: 40px; height: 40px; font-size: 11px; }
    .carousel-prev    { left: 12px; }
    .carousel-next    { right: 12px; }

    .quote-section { padding: 96px 32px; }
    .services { padding: 88px 0; }
    .projects { padding: 88px 0; }
    .contact  { padding: 88px 0; }
    .site-footer { padding: 36px 28px; }
}

@media (max-width: 520px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .nav-container { padding: 0 20px; }
    .hero-content  { padding: 0 24px 64px; }
    .about-text    { padding: 52px 24px; }
}
