/* HERO CONTAINER */
html,
body {
    height: 100%;
    margin: 0;
    background: #000;
    box-sizing: border-box;
    font-family: 'Canva Sans', sans-serif;
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
    /* Fallback background image in case video doesn't load */
    background-image: url("/assets/hero-fallback.jpg");
    background-size: cover;
    background-position: center;
}

/* VIDEO */
.hero-video {
    position: absolute;
    inset: 0;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    .hero-video {
        /* Ensure video covers on mobile */
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Reduce video quality/size on mobile if needed */
    .hero {
        background-size: cover;
    }
}

/* OVERLAY */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-nav li a {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Garet', sans-serif;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-nav li a.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-nav li a:hover {
    color: #ecaf27;
    /* gold accent on hover */
}

/* HEADER */
.hero-header {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.hero-logo {
    height: 102px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-logo.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-cta {
    background-color: #ecaf27;
    color: #072a54;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
    opacity: 0;
    transform: translateY(-8px);
    font-weight: 300;
}

.hero-cta.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-cta:hover {
    background-color: #d9a81f;
}

/* TEXT (gentle staggered animation) */
.hero-text {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    text-align: center;
    color: white;
    z-index: 2;
    opacity: 0;
    transition: opacity 700ms cubic-bezier(.22, .9, .35, 1), transform 700ms cubic-bezier(.22, .9, .35, 1);
    will-change: opacity, transform;
}

.hero-text.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* if your hero text is inside an H1, characters are applied inside it */
.hero-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px) scale(0.995);
    transition: opacity 520ms cubic-bezier(.22, .9, .35, 1), transform 520ms cubic-bezier(.22, .9, .35, 1);
    will-change: opacity, transform;
}

/* reveal each character (stagger controlled by inline transitionDelay set in JS) */
.hero-text.show .char {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-text h1 {
    font-family: 'Garet', sans-serif;
    font-size: clamp(2rem, 5.5vw, 5rem);
    font-weight: 300;
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

/* CHARACTER STAGGER FOR HERO TEXT */
.hero-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms cubic-bezier(.2, .8, .2, 1), transform 600ms cubic-bezier(.2, .8, .2, 1);
    will-change: transform, opacity;
}

.hero-text.show .char {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-header {
        padding: 0 24px;
    }

    .hero-logo {
        height: 36px;
    }

    .hero-text {
        bottom: 22%;
        padding: 0 16px;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 6vw, 3rem);
    }
}

/* ABOUT SPLIT SECTION */
.about-split {
    background-color: #E6E6E6;
    padding: 80px 0 60px;
}



.about-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: center;
}

/* LEFT: SVG */
.about-visual {
    display: flex;
    align-items: left;
    justify-content: center;
}

.about-svg {
    width: 100%;
    max-height: 620px;
    transform: translate(-60px, 100px) scaleY(-1);
    transform-origin: center;
    transition: transform 0.6s ease;
}

.trace-path {
    fill: none;
    stroke: #ECAC27;
    stroke-width: 40;
    stroke-linecap: round;
    stroke-linejoin: round;

    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;

    animation: trace 6s ease-in-out infinite;
    opacity: 0.9;
}

/* staggered timing */
.delay-1 {
    animation-delay: 0.6s;
}

.delay-2 {
    animation-delay: 1.2s;
}

.delay-3 {
    animation-delay: 1.8s;
}

@keyframes trace {
    0% {
        stroke-dashoffset: 4000;
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }

    60% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -4000;
        opacity: 0.2;
    }
}

/* RIGHT: TEXT */
.about-text {
    color: #072a54;
}

.about-label {
    font-family: "Garet", sans-serif;
    font-size: 3.15rem;
    letter-spacing: 0.15em;
    font-weight: 550;
    opacity: 0.7;
}

.about-text h2 {
    margin: 20px 0 28px;
    font-family: "Garet", sans-serif;
    font-size: 1.91rem;
    font-weight: 300;
    line-height: 1.2;
    transition-delay: 0.35s;
}

.about-text p {
    max-width: 840px;
    font-size: 1.45rem;
    line-height: 1.9;
    font-family: 'Canva Sans', sans-serif;
}

.about-text>* {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Stagger */
.about-text>*:nth-child(1) {
    transition-delay: 0.1s;
}

.about-text>*:nth-child(2) {
    transition-delay: 0.2s;
}

.about-text>*:nth-child(3) {
    transition-delay: 0.3s;
}

.about-split.is-visible .about-text>* {
    opacity: 1;
    transform: translateX(0);
}

.site-header a, 
.about-text a,
.service-content a {
  color: #072a54; 
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
  display: inline-block;
 
}

.site-header a:hover,
.about-text a:hover,
.service-content a:hover {
  color: #ecaf27; 
  animation: moveBackForth 0.6s ease-in-out infinite;
}

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

.site-header a::before,
.about-text a::before {

  margin-left: 0.5rem;
  animation: pulse-right 2s infinite;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .about-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-split {
        padding: 60px 0;
        margin-top: -2rem;
    }

    .about-svg {
        max-height: 360px;
        transform: scaleY(-1);
    }

    .about-text>* {
        transform: translateY(20px);
    }

    .about-text p {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .about-split {
        padding: 40px 0;
        margin-top: -2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-text>* {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trace-path {
        animation: none;
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Mobile Touch Support */
@media (hover: none) and (pointer: coarse) {
    .hero-nav li a:active {
        color: #ecaf27;
    }

    .hero-cta:active {
        background-color: #d9a81f;
    }

    .why-band:active {
        transform: scale(1.02);
    }

    .why-band:active .why-bg {
        transform: scale(1.05);
    }

    .why-band:active .why-accent-line {
        width: 50px;
    }

    .cta-button:active {
        background-color: #d9a81f;
        transform: translateY(-2px);
    }

    .footer-newsletter button:active {
        transform: translateY(-2px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    }

    /* Better tap highlights */
    .why-band,
    .cta-button,
    .hero-cta {
        -webkit-tap-highlight-color: rgba(236, 175, 39, 0.1);
    }
}

/* =========================
   SERVICES ZIG-ZAG SECTION
========================= */

.services-zigzag {
    background-color: #E6E6E6;
    padding: 80px 0;
    margin-top: -140px;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.services-title {
    text-align: center;
    font-family: "Garet", sans-serif;
    font-size: 3.15rem;
    color: #072a54;
    font-weight: 500;
}

/* =========================
   ROW LAYOUT (FIXED)
========================= */

.service-row {
    display: flex;
    align-items: center;
    gap: 80px;
}

.service-row.is-reversed {
    flex-direction: row-reverse;
}

/* =========================
   MEDIA
========================= */

.service-media {
    flex: 1;
}

.service-media img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* =========================
   CONTENT
========================= */

.service-content {
    flex: 1;
    color: #072a54;
}

.service-content h3 {
    font-family: "Garet", sans-serif;
    font-weight: 400;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-content p {
    font-size: 1.45rem;
    line-height: 1.7;
    max-width: 520px;
}

/* =========================
   ANIMATIONS
========================= */

.animate-left,
.animate-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-left {
    transform: translateX(-60px);
}

.animate-right {
    transform: translateX(60px);
}

.animate-visible {
    opacity: 1;
    transform: translateX(0);
}

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

@media (max-width: 900px) {

    .service-row,
    .service-row.is-reversed {
        flex-direction: column;
        gap: 32px;
    }

    .service-content p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .services-zigzag {
        padding: 60px 0;
    }

    .services-title {
        font-size: 2.2rem;
    }

    .service-content h3 {
        font-size: 1.8rem;
    }
}

/* WHY DAVRITEX SECTION */

.why-davritex {
    background-color: #e6e6e6;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    color: #072a54;
    font-family: 'Garet', sans-serif;
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 3rem;
}

/* -------------------------
   Trapezoid Bands
-------------------------- */
.why-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #072a54;
    /* navy rectangle */
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    height: 140px;
    overflow: hidden;
    transition: height 0.4s ease;

    /* TRAPEZOID SHAPE: left straight, right taper */
    clip-path: polygon(0 0,
            85% 0,
            100% 50%,
            85% 100%,
            0 100%);
}

.why-band.reverse {
    /* Trapezoid pointing left */
    clip-path: polygon(15% 0,
            100% 0,
            100% 100%,
            15% 100%,
            0 50%);
    flex-direction: row-reverse;
    /* flip content */
}

.why-band:hover {
    min-height: 220px;
}

.why-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.why-band:hover .why-bg {
    opacity: 0.95;
    /* soft fade in */
}

.why-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(7, 42, 84, 0.9), rgba(7, 42, 84, 0.95));
}


.why-content {
    color: #ffffff;
    max-width: 60%;
    z-index: 2;
    font-size: 1.3rem;
}

.why-accent-line {
    display: block;
    width: 0;
    height: 3px;
    background-color: #ecaf27;
    /* gold */
    margin-bottom: 0.8rem;
    transition: width 1.5s ease;
}

.why-band:hover .why-accent-line {
    width: 90px;
    /* animate line on hover */
}

.why-content h3 {
    font-family: 'Garet', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.why-content p {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.why-band:hover .why-content p {
    opacity: 1;
    transform: translateY(0);
}

.why-image {
    height: 100%;
    max-width: 35%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.why-text a {
  color: #ecaf27; /* Gold color */
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid #ecaf27;
  transition: all 0.3s ease;
}

.why-text a:hover {
  color: #f0d96e; 
  border-bottom-color: #f0d96e;
}

.why-image img {
    width: auto;
    height: 100%;
    border-radius: 15px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.why-band:hover .why-image img {
    opacity: 1;
    transform: translateX(0) scale(1.03);
}

/* -------------------------
   CTA Section
------------------------- */
.cta-footer {
    background-color: #f0f0f0;
    /* light grey background to stand out from footer */
    padding: 2rem 1rem 1rem 1rem;
    display: flex;
    justify-content: center;
}

.cta-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.cta-line {
    height: 4px;
    width: 80px;
    background-color: #072a54;
    /* navy line */
    margin: 0 auto 1.5rem auto;
    border-radius: 2px;
}

.cta-content h3 {
    font-family: 'Garet', sans-serif;
    color: #072a54;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #ecaf27;
    /* gold accent */
    color: #072a54;
    /* navy text */
    font-weight: bold;
    font-family: 'Garet', sans-serif;
    font-weight: 400;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-line {
    transition-delay: 0.1s;
}

.cta-content h3 {
    transition-delay: 0.3s;
}

.cta-button {
    transition-delay: 0.5s;
}


/* ===========================
   Footer
=========================== */
.site-footer {
    background-color: #072a54;
    /* navy */
    color: #ffffff;
    font-family: 'Canva Sans', sans-serif;
}

.site-footer a {
    color: #ecaf27;
    /* gold links */
    text-decoration: none;
}

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

/* Footer Top - 3 Columns */
.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 3rem 2rem;
    gap: 2rem;
}

.footer-top h4 {
    font-family: 'Garet', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 300;
}

.footer-contact p,
.footer-links ul {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.4rem;
}

/* Globe */
.footer-globe {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 240px;
}

.globe-tagline {
    font-size: 1rem;
    color: rgb(255, 255, 255);
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.4;
    max-width: 250px;
    margin-top: 0.2rem;
}

.globe-tagline span {
    color: #ecaf27;
}

#globe-canvas {
    cursor: grab;
    display: block;
    width: 260px;
    height: 260px;
}

#globe-canvas:active {
    cursor: grabbing;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-globe {
        align-items: flex-start;
        gap: 0;
        transform: translateX(-20px);
    }

    #globe-canvas {
        align-self: center;
        width: 230px;
        height: 230px;
    }

    .globe-tagline {
        max-width: 230px;
        margin-top: 0.1rem;
    }
}



/* Hidden state */
.animate-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Visible state */
.animate-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.why-band.animate-fade:nth-child(2) {
    transition-delay: 0.2s;
}

.why-band.animate-fade:nth-child(3) {
    transition-delay: 0.4s;
}

.why-band.animate-fade:nth-child(4) {
    transition-delay: 0.6s;
}


/* RESPONSIVE */

@media (max-width: 768px) {
    .why-content {
        padding: 2rem 1.5rem;
    }

    .why-content h3 {
        font-size: 1.5rem;
    }

    .why-content p {
        font-size: 0.95rem;
    }

    .cta-banner h2 {
        font-size: 1.6rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.7rem 1.8rem;
    }
}

/* Mobile hint */
.why-mobile-hint {
    display: none;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin: 1.5rem 0 1rem;
}

@media (max-width: 768px) {
    .why-mobile-hint {
        display: block;
    }

    .why-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .why-band .why-text {
        display: none;
    }

    .why-band.expanded .why-text {
        display: block;
    }
}

/* Desktop: hide toggle button */
@media (min-width: 769px) {
    .why-toggle {
        display: none;
    }
}