/*
Theme Name: Raio Verde
Theme URI: 
Author: Sanzza
Author URI: 
Description: A bespoke photographer theme for Raio Verde.
Version: 1.0.0
Text Domain: raio-verde
*/

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Noto+Serif+Display:wght@300;400&family=Google+Sans+Flex&display=swap');

:root {
    /* Colors */
    --color-black: #111;
    --color-dark-bg: #222;
    --color-very-dark-bg: #1a1a1a;
    --color-white: #ffffff;
    --color-text-body: #333;
    --color-text-muted: #444;
    --color-light-grey: #f4f4f4;

    /* Typography */
    --font-primary: 'Google Sans Flex', sans-serif;
    --font-secondary: 'Noto Serif Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --layout-max-width: 1400px;
}

html {
    font-size: 16px;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* Basic Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    background-color: var(--color-white);
    line-height: 1.6;
}

.site {
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    font-weight: 300;
}

/* Add specialized typography classes here as requested */
.font-google-sans {
    font-family: var(--font-primary);
}

/* --------------------------------------------------------------------------
   Header & Navigation
-------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-white);
    transition: background-color 0.3s ease, padding 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
}

/* Hide header initially ONLY on the home page */
body.home .site-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.site-header.is-scrolled {
    background-color: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem 4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Show header when scrolled on the home page */
body.home .site-header.is-scrolled {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.site-branding a {
    color: inherit;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    position: relative;
    display: inline-flex;
}

.site-branding img.custom-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.site-branding a .logo-line {
    position: relative;
}

.site-branding a .logo-line::before {
    content: '';
    position: absolute;
    top: -8px;
    /* distance above the text */
    left: 0;
    right: 0.3em;
    /* account for letter-spacing */
    height: 1px;
    background-color: var(--color-white);
}

.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 0;
    margin-left: 4vw;
    /* Space between links and hamburger */
    z-index: 200;
    /* Ensure it stays above the mobile overlay */
}

.menu-toggle .line {
    background-color: var(--color-white);
    height: 1px;
    display: block;
    transition: width 0.3s ease;
}

.menu-toggle .line-1 {
    width: 14px;
}

.menu-toggle .line-2 {
    width: 20px;
}

.menu-toggle .line-3 {
    width: 10px;
}

.menu-toggle:hover .line {
    width: 20px;
}

.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    /* Align links to the right */
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 4.5vw;
    /* Responsive gap to match large layout spacing */
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: inherit;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: lowercase;
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.main-navigation a:hover::before,
.main-navigation li.current-menu-item>a::before,
.main-navigation li.current-menu-ancestor>a::before {
    width: 24px;
}

/* --------------------------------------------------------------------------
   Hero Section
-------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-color: var(--color-dark-bg);
    /* Fallback color */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Prevents scrolling past multiple sections at once */
}

/* Add a dark overlay to make text readable */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Adjust opacity as needed */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding: 0 2rem;
}

.hero-title {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 56px;
    /* Exactly 56px as specified */
    line-height: 1;
    /* 100% line height */
    letter-spacing: 0;
    /* 0% spacing */
    margin: 0;
    text-transform: lowercase;
}

.hero-title em {
    font-family: var(--font-secondary);
    font-weight: 400;
    /* Noto Serif is weight 400 */
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Utilities (DRY)
-------------------------------------------------------------------------- */
.bg-dark {
    background-color: var(--color-very-dark-bg);
    color: var(--color-white);
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger portfolio items so they don't fade in at the exact same time */
.portfolio-item:nth-child(even).reveal-up {
    transition-delay: 0.15s;
}

/* --------------------------------------------------------------------------
   Statement Section
-------------------------------------------------------------------------- */
.statement-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Make it a full screen section like the hero */
    padding: 4rem;
}

.statement-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.statement-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 2rem 0;
    font-size: clamp(2rem, 4vw, 56px);
    line-height: 1.2;
    text-transform: lowercase;
}

.statement-primary {
    font-family: var(--font-primary);
    font-weight: 300;
}

.statement-secondary {
    font-family: var(--font-secondary);
    font-weight: 400;
    font-style: italic;
}

.action-link {
    align-self: flex-end;
    font-family: var(--font-body);
    font-size: 14px;
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
    transition: border-color 0.3s ease;
    position: relative;
}

.action-link:hover,
.action-link-trigger:hover .action-link {
    border-color: var(--color-white);
}

.action-link .icon {
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translate(-10px, -50%);
    opacity: 0;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.action-link:hover .icon,
.action-link-trigger:hover .action-link .icon {
    opacity: 1;
    transform: translate(0, -50%);
}

.action-link .text-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.action-link:hover .text-wrapper,
.action-link-trigger:hover .action-link .text-wrapper {
    transform: translateX(10px);
}

.action-link .text-original {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.action-link .text-wrapper::before {
    content: attr(data-text);
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.action-link:hover .text-original,
.action-link-trigger:hover .action-link .text-original {
    transform: translateY(100%);
}

.action-link:hover .text-wrapper::before,
.action-link-trigger:hover .action-link .text-wrapper::before {
    transform: translateY(100%);
}

/* --------------------------------------------------------------------------
   Portfolio Gallery Section
-------------------------------------------------------------------------- */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    display: block;
    height: 100vh;
    /* Immersive full-screen height */
    text-decoration: none;
}

/* Every 5th item spans full width to create the masonry pattern */
.portfolio-item:nth-child(5n) {
    grid-column: span 2;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Gradient overlay to ensure text is always readable regardless of image */
.portfolio-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, var(--color-dark-bg) 0%, var(--color-white) 100%);
    mix-blend-mode: multiply;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 2;
    color: var(--color-white);
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Customize the action-link for the portfolio gallery */
.portfolio-overlay .action-link {
    border-bottom: none;
    font-size: 12px;
}

.portfolio-item:hover .portfolio-overlay .action-link {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   Services & CTA Section
-------------------------------------------------------------------------- */
.services-cta-section {
    min-height: 100vh;
    background-color: var(--color-light-grey);
    /* Light grey from mockup */
    color: var(--color-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 4rem;
}

.services-cta-wrapper {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.cta-top {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cta-row {
    display: flex;
    align-items: center;
}

.cta-row-1 {
    justify-content: flex-start;
    gap: 4rem;
    padding-left: 10%;
    /* Stagger left */
}

.cta-row-2 {
    justify-content: flex-end;
    gap: 4rem;
    padding-right: 10%;
    /* Stagger right */
}

.cta-headline {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 7vw, 7.5rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: 0;
}

/* Action Links inside CTA */
.services-cta-section .action-link {
    color: var(--color-black);
    border-bottom: 1px solid rgba(17, 17, 17, 0.3);
}

.services-cta-section .action-link:hover,
.services-cta-section .action-link-trigger:hover .action-link {
    border-color: var(--color-black);
}

/* 3-Column Services Grid */
.cta-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    padding: 0 10%;
}

.service-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-title {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.service-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   About Us Section
-------------------------------------------------------------------------- */
.about-us-section {
    min-height: 100vh;
    background-color: var(--color-white);
    /* White background */
    color: var(--color-black);
    display: flex;
    align-items: center;
    padding: 6rem 4rem;
    overflow-x: hidden;
    /* Crucial for bleeding the image to the right */
}

.about-us-wrapper {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2rem;
    align-items: center;
}

.about-us-text {
    grid-column: 3 / 6;
    /* Spans columns 3, 4, 5 */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-right: 2rem;
}

.about-title {
    font-family: var(--font-secondary);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 400;
    margin: 0;
    line-height: 1;
}

.about-desc {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 90%;
}

.about-link {
    margin-top: 1rem;
    align-self: flex-start;
}

.about-us-image {
    grid-column: 6 / 9;
    /* Starts on col 6 */
    width: calc(100% + max(4rem, (100vw - var(--layout-max-width)) / 2 + 4rem));
    /* Exact mathematical distance to the right edge of the screen */
    height: 100%;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.about-us-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* --------------------------------------------------------------------------
   Footer Section
-------------------------------------------------------------------------- */
.site-footer {
    height: 450px;
    background-color: var(--color-white);
    color: var(--color-black);
    display: flex;
    flex-direction: column;
}

.footer-wrapper {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
    height: 100%;
    padding: 4rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Big Links Middle */
.footer-big-links {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.footer-link {
    font-family: var(--font-primary);
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    color: var(--color-black);
    text-decoration: none;
    letter-spacing: 0;
    text-transform: lowercase;
    transition: opacity 0.3s ease;
}

.footer-link:nth-child(1) {
    text-align: left;
}

.footer-link:nth-child(2) {
    text-align: center;
}

.footer-link:nth-child(3) {
    text-align: right;
}

.footer-link:hover {
    opacity: 0.6;
}

/* Bottom Grid Info */
.footer-bottom-info {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
    align-items: flex-end;
}

.footer-col {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--color-black);
    line-height: 1.4;
}

.footer-col a {
    color: var(--color-black);
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-col-email {
    grid-column: 1 / 2;
}

.footer-col-social {
    grid-column: 2 / 3;
}

.footer-col-location {
    grid-column: 3 / 6;
}

.footer-col-copyright {
    grid-column: 6 / 9;
    text-align: right;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--color-black);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        clip-path: circle(0% at 100% 0%);
        transition: opacity 0.6s ease, visibility 0.6s ease, clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .main-navigation.is-open {
        opacity: 1;
        visibility: visible;
        clip-path: circle(150% at 100% 0%);
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .main-navigation a {
        font-size: clamp(3rem, 10vw, 5rem);
        color: var(--color-white);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .main-navigation.is-open a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger link animations */
    .main-navigation.is-open li:nth-child(1) a {
        transition-delay: 0.3s;
    }

    .main-navigation.is-open li:nth-child(2) a {
        transition-delay: 0.4s;
    }

    .main-navigation.is-open li:nth-child(3) a {
        transition-delay: 0.5s;
    }

    .main-navigation.is-open li:nth-child(4) a {
        transition-delay: 0.6s;
    }

    .main-navigation.is-open li:nth-child(5) a {
        transition-delay: 0.7s;
    }

    /* Animate Hamburger to X */
    .menu-toggle.is-open .line-1 {
        transform: translateY(7px) rotate(45deg);
        width: 24px;
    }

    .menu-toggle.is-open .line-2 {
        opacity: 0;
    }

    .menu-toggle.is-open .line-3 {
        transform: translateY(-7px) rotate(-45deg);
        width: 24px;
    }

    .cta-row-1,
    .cta-row-2 {
        padding: 0;
        gap: 2rem;
    }

    .cta-services-grid {
        padding: 0;
        gap: 2rem;
    }

    .about-us-text {
        grid-column: 2 / 5;
    }

    .about-us-image {
        grid-column: 5 / 9;
    }
}

@media (max-width: 768px) {

    .about-us-section,
    .services-cta-section {
        padding: 4rem 2rem;
        min-height: auto;
        /* Allow natural flow on mobile */
    }

    .about-us-wrapper {
        display: flex;
        flex-direction: column-reverse;
    }

    .about-us-image {
        width: 100%;
        min-height: 400px;
    }

    .about-us-text {
        padding-right: 0;
    }

    .cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-row-2 {
        align-items: flex-end;
        text-align: right;
    }

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

    .footer-big-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }

    .footer-link:nth-child(1),
    .footer-link:nth-child(2),
    .footer-link:nth-child(3) {
        text-align: center;
    }

    .footer-bottom-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-col-email,
    .footer-col-social,
    .footer-col-location,
    .footer-col-copyright {
        grid-column: 1 / -1;
        text-align: center;
    }

    .portfolio-gallery {
        grid-template-columns: 1fr;
        /* Stack everything on mobile */
    }

    .portfolio-item,
    .portfolio-item:nth-child(5n) {
        grid-column: span 1;
        aspect-ratio: 1 / 1;
        /* Square on mobile */
    }
}

body.menu-is-open {
    overflow: hidden !important;
}