/* ========= ROOT VARIABLES ========= */
:root {
  --brand: #D96913;              /* Primary brand color (buttons, highlights) */
  --brand-contrast: #ffffff;     /* Text/icon color on brand backgrounds */
  --accent: #E08C4B;             /* Secondary accent (hover, subtle highlights) */
  --radius: 10px;                /* Default border radius for components */
  --shadow: 0 6px 20px rgba(0,0,0,.15); /* Default soft shadow */
}

/* ========= Light theme ========= */
:root[data-theme="light"] {
  --bg: #F2F2F2;                 /* Page background */
  --bg-contrast: #212121;                 /* Page Background Contrast */
  --surface: #E6AE83;            /* Cards, header, nav, panels */
  --text: #0A111F;               /* Primary text on light BG */
  --text-muted: rgba(10,17,31,.65); /* Secondary text on light BG */
  --border: #DD7B2F;             /* Divider/border lines */
  --link: #A65316;               /* Link color on light BG */
  --link-hover: #D96913;         /* Link hover on light BG (brand) */
}

/* ========= Dark theme ========= */
:root[data-theme="dark"] {
  --bg: #050910;                 /* Page background (rich black) */
  --bg-contrast: #0D141F;                 /* Page Background Contrast */
  --surface: #0A111F;            /* Cards, header, nav, panels */  
  --text: #F2F2F2;               /* Primary text on dark BG */
  --text-muted: rgba(242,242,242,.7); /* Secondary text on dark BG */
  --border: rgba(242,242,242,.12);    /* Subtle borders on dark BG */
  --link: #DD7B2F;               /* Link color on dark BG */
  --link-hover: #D96913;         /* Link hover on dark BG (brand) */
}

/* Smooth transition between light and dark mode */
html, body {transition: background-color .45s ease, color .45s ease;}
header, .navbar, .dropdown-menu, .card, .panel {transition: background-color .45s ease, border-color .45s ease, color .45s ease;}
a, .btn, .btn-primary, .btn-outline {transition: color .2s ease, background-color .2s ease, border-color .2s ease;}
svg, .icon {transition: fill .45s ease, stroke .45s ease, color .45s ease;}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Sansation, sans-serif;
}

html {
      scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    background-color: var(--bg);
}

li {
    list-style: none;
}

a {
    text-decoration: none;    
    color: var(--link);
}

a:hover {
    color: var(--link-hover);
}

.btn {
    display: inline-block;
    font-size: 1rem;
    text-align: center;
    background-color: var(--brand);
    padding: 0.75rem 1.5rem;
    margin: auto 0;
    color: #fff;
    border-radius: 9999px;
}

.btn:hover {
    color: #fff;
    background-color: var(--accent);
    cursor: pointer;
}

.btn:active{scale: 0.95;}

.link-underline-animate {
  position: relative;
  display: inline-block;
}

.link-underline-animate::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background-color: var(--link-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease, transform-origin 0s;
}

.link-underline-animate:hover::after,
.link-underline-animate:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.link-underline-animate:not(:hover)::after {
  transform-origin: right;
}


/* HEADER SECTION */
header {    
    color: var(--text);    
    position: fixed;
    top: 0;       
    width: 100%;    
    background-color: var(--surface);   
    font-size: 1rem; 
    z-index: 9999;
}

.navbar {         
    height: 56px;
    max-width: 1300px;    
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;    
    font-weight: 900;
    font-size: 2rem;
    cursor: pointer;
    transition: scale 0.2s ease;
    line-height: .9;
    text-shadow: var(--shadow);
}

.logo a {
    color: #fff;
}

.logo span {
    color: var(--brand);    
}

.logo a:hover {
    color: #fff;
}

.logo:hover {
    scale: 1.05;    
}

.logo:active {
    scale: 0.95;
}

.nav-right {
    display: flex;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    font-weight: bold;     
}

.nav-toggles {
    display: flex;
    gap: 1rem;
}

.dropdown-toggle {
    font-size: 1.5rem;
    display: none;
    color: #fff;
}

.theme-toggle {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: scale 0.2s ease;
    color: #fff;
}

.theme-toggle:hover {
    scale: 1.1;    
}

.theme-toggle:active {
    scale: 0.75;
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    right: 2rem;
    top: 56px;
    width: 300px;
    background-color: rgba(230, 174, 131, 0.4);
    backdrop-filter: blur(15px);    
    border-radius: 10px;
    overflow: hidden;
    height: 0;
    transition: height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown-menu.open {
    height: 140px;
}

.dropdown-menu li {
    cursor: pointer;
    padding: 0.7rem;
    display: flex;    
    justify-content: center;
    align-items: center;    
}

.dropdown-menu li a {
    color: #fff;
    font-weight: 800;    
}

/* RESPONSIVE DESIGN */
@media(max-width: 992px) {   
    .nav-links {
        display: none;
    }

    .dropdown-toggle {
        display: block;
    }

    .dropdown-menu {
        display: block;
    }
}

@media(max-width: 576px) {
    .dropdown-menu {
        left: 2rem;
        width: unset;
    }
}

/* ========= INDEX PAGE ========= */
/* HERO SECTION */
.hero-section {
    height: calc(100vh-58px);    
}

.hero-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;   
    display: block;
}

.hero-content {
    position: absolute;
    top: 30%;            
    left: 15%;           
    color: #fff;         
    z-index: 2;
    width: 400px;
}

.hero-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,   
    rgba(0, 0, 0, 0.4) 40%,  
    rgba(0, 0, 0, 0.0) 100%  
  );
  z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 1000;
    line-height: 1;
    padding-bottom: 16px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-content span {
    color: var(--brand);
}

.hero-content p{
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.fa-chevron-down {
    color: var(--text-muted);
    font-size: 3rem;
    position: absolute;
    z-index: 10;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 1.8s infinite, fadePulse 3s infinite;
    cursor: pointer;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-12px);
  }
  60% {
    transform: translateX(-50%) translateY(-6px);
  }
}

@keyframes fadePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* RESPONSIVE DESIGN */
@media(max-width: 992px) {
    .hero-content {
        top: 50%;
        left: 50%;
        translate: -50% -50%;
    }
}  

@media(max-width: 576px) {
    .hero-content {
        width: 300px;
    }

    .hero-content h1{
        font-size: 2rem;
    }
}


/* FANCY SECTION */
.fancy-section {    
    padding-top: 6rem;
}

.fancy-section img {
    display: block;
    max-width: 1200px;
    width: 100%;
    height: auto;
    border-radius: 64px;
    margin: 0 auto;    
    padding: 0 16px;
}

.fancy-section-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) auto;
    column-gap: clamp(2rem, 6vw, 8rem);
    row-gap: 1rem;    
    padding: 0 1rem;
    text-align: left;    
    margin: 6rem auto 3rem auto;
    max-width: 1200px;    
}

.fancy-section-content h1 {
    max-width: 14ch;
    line-height: .95;
    font-size: 2.5rem;
    color: var(--text);    
    margin: auto 0;
}

.fancy-section-content p {
    color: var(--text);    
}

.fancy-section-content .btn {
    margin-top: 0;
}

/* RESPONSIVE DESIGN */
@media(max-width: 992px) {
    .fancy-section-content {
        grid-template-columns: 1fr;
         row-gap: 2rem;
         text-align: center;         
         margin: 3rem auto 2rem auto;
    }

    .fancy-section-content h1 {
        margin: 0 auto
    }        
}

/* INDEX SERVICES SECTION */
.i-services-section {        
    border: 1px solid var(--bg-contrast);
    background-color: var(--bg-contrast);
}

.i-services-container {    
    display: flex;
    flex-wrap: wrap;    
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 16px;
    position: relative;
    gap: 1rem;
}

.i-service {
    position: relative;
    flex: 1 1 calc(50% - 1rem);
    overflow: hidden;
    border-radius: 2rem;
}

.i-service img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;    
    transition: transform 0.2s ease;    
}

.i-service img:hover {
    transform: scale(1.15);
}

.i-service a {
    position: absolute;
    bottom: 1rem;
    left: 1rem;    
}

/* RESPONSIVE DESIGN */
@media(max-width: 768px) {
    .i-service {
        flex: 1 1 100%; 
    }
}

/* FOOTER */
.footer-section {
    background-color: var(--surface);
    width: 100%;
    padding: 2rem 0;  
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--accent) ;
}

.footer-links {
    display: flex;     
    gap: 3rem;        
}

.footer-section p {
    color: var(--brand);
    font-weight: bold;      
}

/* RESPONSIVE DESIGN */
@media(max-width: 576px) {    
    .footer-section {
        padding: 1rem 0;
    }

    .footer-links {
        gap: 2rem;
    }

    .footer-section p {
        font-size: 0.9rem;
    }
}


/* ========= SERVICES PAGE ========= */
/* SERVICES SECTION */
.services-section {
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.services-header {    
    color: var(--text);
    padding: calc(2.5rem + 56px) 1rem 2.5rem 1rem;
    width: auto;
    max-width: 1400px;
}

.services-header p {    
    max-width: 55%;    
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 2.5rem 1rem;
    gap: 1rem;
}

.service {
    flex: 1 1 calc(50% - 1rem);
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
}

.service img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;          
    object-fit: cover;    
}

.service p {
    padding-bottom: .75rem;
}

.service-description-card {
    position: absolute;
    z-index: 2;
    height: 100%;
    left: 0; right: 0; bottom: 0;
    color: #fff;
    background: rgba(23, 32, 42, 0.75);
    padding: 0.5rem 1.5rem;
    /* Start overlay card so additional info is hidden */
    transform: translateY(70%);
    transition: transform 320ms ease, background 200ms ease;
}

.service:hover .service-description-card, .service:focus-within .service-description-card {
    /* Move overlay card so all info is visible  */
    transform: translateY(0);
    background: rgba(23, 32, 42, 0.9);
}

@media(max-width: 1375px) {
    .service-description-card h1 {
        font-size: 1.5rem;
    }
    .service-description-card p {
        font-size: 0.7rem;
        padding-bottom: 0.35rem;
    }
}

@media(max-width: 992px) {
    .service {
        flex: 100%;
    }
    .services-header {
        width: 100%;
        text-align: center;
    }
    .services-header p {    
        max-width: unset;    
    }
    .service-description-card {
        transform: translateY(87%);
    }
    .service-description-card p {
        font-size: 0.7rem;
        padding-bottom: 0.35rem;
    }
}
@media(max-width: 828px) {
    .service-description-card {
        transform: translateY(80%);
    }
}
@media(max-width: 576px) {
    .service-description-card h1 {        
        font-size: 16px;
    }
    .service-description-card p {
        font-size: 0.5rem;
    }
}
@media(max-width: 445px) {
    .service-description-card {
        transform: translateY(76%);
    }    
}
@media(max-width: 367px) {
    .service-description-card {
        transform: translateY(72%);
    }    
}

/* ========= ABOUT PAGE ========= */
/* ABOUT SECTION */

.about-section {
    display: flex;
    flex-wrap: wrap;
    height: auto;    
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(2.5rem + 56px) 1rem;
}

.about-card {    
    display: flex;
    flex: 0 0 50%;
    flex-direction: column;
    justify-content: center;    
    
    overflow: hidden;
    color: var(--text);    
}

.about-card img {
    width: 100%;
    height: 100%;
    border-radius: 2rem;
}

.about-card h1 {
    font-size: 2.5rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-card p {
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.25rem;
    padding: 0 1rem;
    
}

/* RESPONSIVE DESSIGN */
@media(max-width: 992px) {
    .about-card {
        flex: 1 1 100%;
        padding: 1rem;        
    }

    .about-card:nth-of-type(1), .about-card:nth-of-type(2) {
        order: -2;
    }

    .about-card:nth-of-type(4) {
        order: -1;
    }

}

/* ========= CONTACT PAGE ========= */
/* CONTACT SECTION */
.contact-section {    
    display: flex;
    max-width: 1400px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: calc(2.5rem + 56px) 2rem;
    gap: 2rem;
}

.contact-card {    
    color: var(--text);
    width: 100%;
    height: 100%;
    padding: 2rem;   
    display: flex; 
    flex-direction: column;
    gap: 1rem;
}

.contact-card h2::before {
    display: inline-block;
    content: "";
    background-color: var(--brand);
    width: 4px;
    height: 1rem;
    position: relative;
    left: -2rem;
}

.contact-card:last-of-type h2 { 
    margin: 0;
}

.contact-card:last-of-type h2::before {
    display: none;
}

.contact-card a {
    display: inline-block;  
    position: relative;    
    align-self: flex-start;
}

.contact-card h2, .contact-card a {
    margin-left: 2rem;
}

.contact-form {    
    border-radius: 2rem;
    padding: 1rem 1rem;
    background-color: rgba(246, 186, 122, 0.448);
    display: flex;
    flex-direction: column;
    gap: 1rem;    
}

.contact-form h2 {
    align-self: center;    
    padding: 0;
}

.contact-card label {
    font-weight: bold;
}

.contact-form input, 
.contact-form textarea {
    border: none;
    border-radius: 8px;
    height: 2rem;
    padding: 0 1rem;
    background-color: rgba(246, 186, 122, 0.238);
    color: var(--text);
}

.contact-form textarea {
    height: 8rem;
    resize: none;
    padding-top: 1rem;
}

.contact-card button {
    align-self: center;
    width: auto;
    border: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0066ff; 
  box-shadow: 0 0 12px rgba(0, 102, 255, 0.9); 
  outline: none;
}

.contact-form input:valid,
.contact-form textarea:valid {
  border-color: #00cc44; 
  box-shadow: 0 0 12px rgba(0, 204, 68, 0.9);
  animation: validPulse 5s infinite;
}

.contact-form input:invalid:not(:focus),
.contact-form textarea:invalid:not(:focus) {
  border-color: #ff1a1a; 
  box-shadow: 0 0 12px rgba(255, 27, 27, 0.554);
}

@keyframes validPulse {
  0%   { box-shadow: 0 0 8px rgba(0, 204, 68, 0.6); }
  50%  { box-shadow: 0 0 12px rgba(0, 204, 68, 0.8); }
  100% { box-shadow: 0 0 8px rgba(0, 204, 68, 0.6); }
}

/* RESPONSIVE DESSIGN */
@media(max-width: 992px) {
    .contact-section {
        flex-direction: column;
        align-items: stretch;
    }
    .contact-card {
        width: 100%;
        padding: 0;
    }
}

@media(max-width: 576px) {
    .contact-section {
        padding: calc(2.5rem + 56px) 1rem;
    }
}
