/* ==========================================
   1. RESET & BASE STYLES
   ========================================== */


/* IMPORTS */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');
@import url("https://use.typekit.net/fsl0gml.css");

/* ==========================================================================
   1. GLOBAL DESIGN TOKENS (Your Site Control Panel)
   ========================================================================== */
:root {
    /* DEFAULT (LIGHT MODE) COLORS */
    --color-primary: #ffffff;
    --color-secondary: #000000;
    --color-accent: blue;
    --color-other: #727272;
    --shadow-std: rgba(0, 0, 0, 0.1);

    --red-bg: rgb(255, 242, 242);
    --green-bg: rgb(242, 255, 242);
    --blue-bg: rgb(242, 242, 255);

    /* Typography Hierarchy */
    --font-heading: 'Google Sans Flex', serif;
    --font-body: 'Google Sans Flex', sans-serif;

    /* Layout Sizing & Transitions */
    --border-radius-sm: 4px;
    --transition-smooth: transform 0.5s ease;
    
    /* Simplified alpha-ready gradient */
    --body-background-gradient: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #000000;
        --color-secondary: #ffffff;
        --color-accent: rgb(0, 255, 0);

        --red-bg: rgb(30, 10, 10);
        --green-bg: rgb(10, 30, 10);
        --blue-bg: rgb(15, 15, 30);
    }
}

/* FONTS */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 500;
    letter-spacing: 2px;
    line-height: 1.2;
    text-shadow: 2px 5px 5px var(--shadow-std);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}
p.lead, .text-lg {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    letter-spacing: 1.5px;
}

strong {
    font-weight: 500;
}

.text-md {
    font-size: 1rem;
}

p.caption, .text-sm {
    font-size: 0.85rem;
    color: var(--color-other);
}

@media(max-width: 600px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.7rem;
        margin-bottom: 1.2rem;
    }

    h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    p {
        font-family: var(--font-body);
        font-weight: 300;
        line-height: 1.7;
        color: var(--color-secondary);
        margin-bottom: 1.5rem;
    }
}

/* BUTTONS */

.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-secondary);
    padding: 0.8rem 2rem;
    border: 2px solid var(--color-accent);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 0.8rem 2rem;
    border: 2px solid var(--color-secondary);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 3px 3px var(--shadow-std);
}

.btn-tertiary {
    display:flex;
    color: var(--color-secondary);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-btn-primary {
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-secondary);
}

.nav-btn-secondary {
    color: var(--color-other);
    text-decoration: none;
    margin: 0 1rem;
    font: var(--font-body);
    transition: color 0.3s ease;
}

.text-btn {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 400;
}

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

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100svh; /* Locks height to small viewport so address bar won't trigger zooms */
    position: relative;
    color: var(--color-primary);
}

/* 🎯 Creates a locked, non-glitching background layer for mobile */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    z-index: -1; /* Keeps the photo safely behind all your text and sections */
    will-change: transform;
    transform: translateZ(0);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.ranking-factors {
    list-style: none; /* Removes default black dots */
    padding-left: 1rem;   /* Removes default indent */
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.ranking-factors li {
    margin-bottom: 0.75rem; /* Space between each factor */
    line-height: 1.5;       /* Improves readability */
    color: var(--color-secondary);
}

.hero-section {
    background-image:linear-gradient(rgba(234, 234, 234, 0.8), rgba(234, 234, 234, 0.8)), url(../images/static/dt-chandler.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 4rem;
    padding-top: 6rem;
    justify-items: center;
    align-items: center;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .hero-section {
        background-image:linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url(../images/static/dt-chandler.jpg);
    }
}

.hero-section h1 {
    padding: 2rem;
}

.linear-gradient-section {
    background: linear-gradient(
        80deg,
        var(--red-bg) 28%,
        var(--green-bg) 38%,
        var(--green-bg) 63%,
        var(--blue-bg) 73%,
        var(--blue-bg)
        );
    padding: 1rem;
    align-items: center;
    justify-items: center;
}

.gray-section-single {
    background: linear-gradient(
        80deg, 
        rgb(234, 234, 234),
        var(--color-primary),
        rgb(234, 234, 234)
        );
    padding: 1rem;
    align-items: center;
    justify-items: center;
}

.gray-section-double {
    background: linear-gradient(
        80deg, 
        rgb(234, 234, 234),
        var(--color-primary),
        rgb(234, 234, 234)
        );
    padding: 4rem;
    align-items: center;
    justify-content: space-evenly;
    justify-items: space-evenly;
    display: flex;
    flex: 1;
}

.red-section-single {
    background: linear-gradient(
        80deg, 
        var(--red-bg),
        var(--color-primary),
        var(--red-bg)
        );
    padding: 1rem;
    align-items: center;
    justify-items: center;
}

.red-section-double {
    background: linear-gradient(
        80deg, 
        var(--red-bg),
        var(--color-primary),
        var(--red-bg)
        );
    padding: 4rem;
    align-items: center;
    justify-content: space-evenly;
    justify-items: space-evenly;
    display: flex;
    flex: 1;
}

.red-section-double a.text-btn {
    color: red;
}

.green-section-single {
    background: linear-gradient(
        80deg, 
        var(--green-bg),
        var(--color-primary),
        var(--green-bg)
        );
    padding: 1rem;
    align-items: center;
    justify-items: center;
}

.green-section-double {
    background: linear-gradient(
        80deg, 
        var(--green-bg),
        var(--color-primary),
        var(--green-bg)
        );
    padding: 4rem;
    align-items: center;
    justify-content: space-evenly;
    justify-items: space-evenly;
    display: flex;
    flex: 1;
}

.green-section-double a.text-btn {
    color: rgb(0, 223, 0);
}

.blue-section-single {
    background: linear-gradient(
        80deg, 
        var(--blue-bg),
        var(--color-primary),
        var(--blue-bg)
        );
    padding: 1rem;
    align-items: center;
    justify-items: center;
    justify-content: center;
}

.blue-section-double {
    background: linear-gradient(
        80deg, 
        var(--blue-bg),
        var(--color-primary),
        var(--blue-bg)
        );
    padding: 4rem;
    align-items: center;
    justify-content: space-evenly;
    justify-items: space-evenly;
    display: flex;
    flex: 1;
}

.blue-section-double a.text-btn {
    color: blue;
}

@media (prefers-color-scheme: dark) {
    .gray-section-single, .gray-section-double {
        background: linear-gradient(
            80deg, 
            #000000,
            #1d1d1d,
            #000000
        );
    }

    .red-section-single, .red-section-double {
        background: linear-gradient(
            80deg,
            #000000,
            var(--red-bg),
            #000000
        )
    }

    .green-section-single, .green-section-double {
        background: linear-gradient(
            80deg,
            #000000,
            var(--green-bg),
            #000000
        )
    }

    .blue-section-single, .blue-section-double {
        background: linear-gradient(
            80deg,
            #000000,
            var(--blue-bg),
            #000000
        )
    }
}

.radial-gradient-section {
    background: radial-gradient(
        var(--red-bg) 28%,
        var(--green-bg) 38%,
        var(--green-bg) 63%,
        var(--blue-bg) 73%,
        var(--blue-bg));
    padding: 15rem;
    align-items: center;
    justify-items: center;
}

.white-divider {
    background: var(--color-primary);
    padding: 1rem;
    box-shadow: 0px 5px 20px var(--shadow-std);
    position: relative;
    margin: -1px;
    z-index: 1;
}

.white-box {
    background: var(--color-primary);
    padding: 0.5rem;
    border-radius: 5px;
    box-shadow: 0px 5px 20px var(--shadow-std);
    z-index: 1;
    justify-items: center;
    align-content: center;
    text-align: center;
}

.white-box img {
    max-height: 75vh;
    width: auto;
    padding: 0rem;
    border-radius: 5px;
}

.white-box-square {
    background: var(--color-primary);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem;
    box-shadow: 0px 5px 20px var(--shadow-std);
    max-width: 75vw;
}

.white-box-square-centered {
    background: var(--color-primary);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem;
    box-shadow: 0px 5px 20px var(--shadow-std);
    max-width: 75vw;
    justify-content: center;
    text-align: center;
}

.white-box h3 {
    padding: 3rem;
}


.linear-gradient-box {
    background: linear-gradient(
        80deg,
        red,
        green,
        blue);
    padding: 1rem;
    display: flex;
    border-radius: 10px;
    margin: 0rem;
    box-shadow: 0px 5px 20px var(--shadow-std);
    max-width: 75vw;
    justify-content: center;
    text-align: center;
}

.linear-gradient-box img {
    height: 75vh;
    width: auto;
    padding: 0rem;
    border-radius: 10px;
}

@media(max-width: 768px) {
    .white-box img, .linear-gradient-box img{
        height: 25vh;
    }

    .white-box-square img {
        display: flex;
        max-height: 50vw;
        width: auto;
        position: cover;
    }

    .gray-section-double, .red-section-double,
    .green-section-double, .blue-section-double {
        flex-direction: column;
        padding: 0.5rem;
    }

    .white-box-square {
        margin: 1rem;
    }
}

@media(max-width: 600px) {
    .white-box-square {
        margin: 0rem;
        max-width: 95vw;
    }
}


/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
header {
    display: flex;
    flex-direction: row;
    height: 35px;
    width: 100%;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 0px 20px var(--shadow-std);
}

header svg {
    height: 25px;
    margin-top: 0px;
    margin-right: 50px;
}

@media(max-width: 768px) {
    header {
        justify-content: space-between;
        height: 50px;
    }
}

.nav-menu {
    display: flex;
    flex-direction: row;
    width: 100%;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 3rem;
}

nav a {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--color-secondary);
}

/* Style the toggle button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-other);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Icon Visibility Logic */
/* By default (Light Mode): show the moon (click to go dark) */
.sun-icon { display: none; }
.moon-icon { display: inline-block; }

/* When Dark Mode is active: show the sun (click to go light) */
[data-theme="dark"] .sun-icon { display: inline-block; }
[data-theme="dark"] .moon-icon { display: none; }

/* ==========================================
   3. MAIN SECTION
   ========================================== */

/* Stack the individual form elements vertically */
.form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Consistent gaps between every input block */
    font-family: var(--font-body);
    max-width: 500px;
    text-align: left;
}
w
/* Stacks label on top of the input */
.form-group {
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    color: var(--color-secondary);
    gap: 0.5rem; /* Space between the text label and the box */
}

/* Label styling */
.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-secondary);
}

.honeypot {
    display: none !important;
}

/* Core styling for text fields, dates, and textareas */
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="date"],
.form input[type="time"],
.form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-secondary);
    border: 1px solid var(--color-other);
    border-radius: 4px;
    background: var(--color-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Allows textarea to be resized vertically by the user, but not horizontally */
.form textarea {
    resize: vertical;
}

/* 🎯 INTERACTIVE FOCUS STATE */
/* Gives a clean, visual pop when a user clicks into a field */
.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px var(--color-primary-fade, rgba(0, 0, 0, 0.05));
}

/* Layout for the Date and Time fields to sit side-by-side */
.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split evenly into two columns */
    gap: 1.5rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    /* OPTION A: Invert the icon color (turns a dark icon white, or vice versa) */
    filter: invert(1);
    
    /* OPTION B: Make it slightly translucent so it's not jarringly bright */
    opacity: 0.7;
}

/* Optional hover state to make it interactive */
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Keep the success block completely hidden out of view when the page first loads */
.success-message {
    display: none;
    text-align: center;
    padding: 3rem 1.5rem;
}

/* =======================================
                TABLES
=========================================*/

/* Responsive container for smaller mobile screens */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    text-align: left;
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Header Row Styling */
.custom-table thead tr {
    border-bottom: 2.5px solid var(--color-secondary); /* Green border highlight */
}

.custom-table th {
    padding: 12px 16px;
    letter-spacing: 0.05em;
}

/* Data Cells Styling */
.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #333333; /* Subtle row separator */
    vertical-align: top;
    line-height: 1.5;
}

/* Zebra Striping for readability */
.custom-table tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Hover State */
.custom-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

/* Mobile Scroll Wrap (Optional: Wrap <table> in <div class="table-container">) */
.table-container {
    width: 100%;
    overflow-x: auto;
    font-family: var(--font-body);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile adjustments)
   ========================================================================== */
@media (max-width: 480px) {
    /* Stack the side-by-side date and time fields into a single column on phones */
    .form-group-row {
        grid-template-columns: 1fr;
    }

    /* Force button to span full-width on small screens for easy thumb-tapping */
    .btn-submit {
        width: 100%;
        text-align: center;
    }
}


/* ==========================================
   9. GLOBAL FOOTER
   ========================================== */
footer {
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 2rem 2rem;
    margin-top: auto; /* Pushes footer to bottom on short pages */
    font-size: 0.85rem;
}

.footer-container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand,
.footer-links,
.footer-socials {
    flex: 1; /* Forces all three sections to occupy equal space */
}

.footer-links {
    padding-top: 2rem;
    text-align: center;
}

.footer-socials {
    padding-top: 2rem;
    text-align: right;
}

.footer-socials svg {
    width: 28px;
    height: 28px;
}

.footer-brand p {
    color: var(--color-other);
    padding-top: 1rem;
}

.footer-brand svg {
    max-height: 80px;
}

.footer-links a,
.footer-socials a {
    color: var(--color-other);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 2rem;

    }
    
    .footer-links{
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-links a{
        margin: 0;
    }
}

/* ==========================================================================
   MOBILE NAVIGATION (Screens under 768px wide)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Show the hamburger button bars */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 1.5rem;
        height: 1rem;
        background: var(--color-primary);
        border: none;
        cursor: pointer;
        z-index: 100;
        margin-right: 1.5rem;
    }

    .menu-toggle .bar {
        height: 1px;
        width: 100%;
        background-color: var(--color-secondary);
        transition: all 0.3s ease;
    }

    /* 2. Turn the nav list into a full-screen vertical dropdown overlay */
    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-primary);
        color: #ffffff;
        z-index: 90;
        
        /* The Secret Sauce: Push the menu out of sight off-screen by default */
        transform: translateX(100%) translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
    }

    /* 3. The Active State: Slide the menu down into view when active */
    .nav-menu.active {
        transform: translateX(0) translateY(0);
    }

    .nav-btn-primary {
        font-size: 2rem;
    }

    .logo {
        margin-left: 1.5rem;
    }
}

/* Base setting: Hide the toggle button on desktop views */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    .nav-menu {
        display: flex; /* Keep your desktop side-by-side row behavior intact */
    }
}