/*
    ===========================================
    HiohSec — Stylesheet
    ===========================================

    HOW CSS WORKS (quick version):
    - You select HTML elements and apply styles to them.
    - "." means a class (e.g., .navbar styles <nav class="navbar">)
    - "#" means an id (e.g., #about styles <section id="about">)
    - Styles cascade — later rules override earlier ones.

    CSS VARIABLES (the :root block below):
    - Think of these as constants. Define colors once, use everywhere.
    - If you want to change the brand color, change it in ONE place.
*/

:root {
    /* Brand colors — neon green + black to match the HiohSec logo */
    --color-primary: #39ff14;       /* Neon green — matches logo */
    --color-primary-dark: #2ecc0f;  /* Slightly darker green for hover states */
    --color-bg: #000000;            /* Pure black */
    --color-bg-alt: #0a0f0a;       /* Near-black with a hint of green */
    --color-text: #c8d6c8;          /* Light gray-green text */
    --color-text-muted: #5a6e5a;    /* Muted green-gray */
    --color-heading: #ffffff;       /* White headings */
    --color-border: #1a2e1a;        /* Dark green-tinted borders */
    --color-card: #0a0f0a;          /* Card backgrounds */

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing — consistent spacing makes everything look clean */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
}

/*
    RESET & BASE
    Browsers have default styles that vary. This normalizes everything
    so the site looks the same on Chrome, Firefox, Safari, Edge.
*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Makes width calculations include padding/border */
}

html {
    scroll-behavior: smooth;     /* Smooth scrolling when clicking nav links */
    scroll-padding-top: 80px;   /* Offset so sections aren't hidden behind the navbar */
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;           /* Line spacing — 1.6 is very readable */
    -webkit-font-smoothing: antialiased;
}

/*
    CONTAINER
    Centers content and limits max width so text doesn't
    stretch across ultra-wide screens. Used inside every section.
*/
.container {
    max-width: 1100px;
    margin: 0 auto;          /* auto left/right margin = centered */
    padding: 0 var(--space-md);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;          /* Stays at the top when you scroll */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;           /* On top of everything else */
    background: rgba(0, 0, 0, 0.95);   /* Black semi-transparent bg */
    backdrop-filter: blur(10px);          /* Blurred glass effect */
    border-bottom: 1px solid var(--color-border);
}

.nav-content {
    display: flex;            /* Flexbox: items sit side by side */
    align-items: center;
    justify-content: space-between;  /* Logo left, links right */
    height: 70px;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-heading);
    text-decoration: none;
}

.nav-logo img {
    height: 65px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;        /* Removes bullet points */
    gap: var(--space-md);    /* Space between links */
    align-items: center;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;  /* Smooth color change on hover */
}

.nav-links a:hover {
    color: var(--color-heading);
}

/* The "Get in Touch" button in the nav */
.nav-cta {
    background: var(--color-primary);
    color: #000000 !important;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    transition: background 0.2s !important;
}

.nav-cta:hover {
    background: var(--color-primary-dark) !important;
}

/* Mobile menu button — hidden on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger → X animation when menu is open */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 10rem 0 var(--space-xl);  /* Extra top padding to clear fixed nav */
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);  /* Responsive font size: min 2rem, max 3.2rem */
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-md);
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;         /* Wraps to new line on small screens */
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #000000;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);  /* Subtle lift on hover */
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text-muted);
    transform: translateY(-1px);
}

.btn-lg {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

/* =========================================
   SECTIONS
   ========================================= */
.section {
    padding: var(--space-xl) 0;
}

/* Alternating background for visual rhythm */
.section-alt {
    background: var(--color-bg-alt);
}

.section h2 {
    font-size: 2rem;
    color: var(--color-heading);
    margin-bottom: var(--space-xs);
    text-align: center;
}

.section-sub {
    color: var(--color-text-muted);
    text-align: center;
    max-width: 550px;
    margin: 0 auto var(--space-lg);
    font-size: 1.05rem;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-text {
    max-width: 700px;
    margin: var(--space-md) auto 0;
}

.about-text p {
    margin-bottom: var(--space-sm);
    font-size: 1.05rem;
}

.credentials {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.credential {
    background: var(--color-bg-alt);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.credential-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.credential-value {
    color: var(--color-heading);
    font-weight: 500;
}

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

/*
    CSS GRID:
    This creates a responsive grid. "repeat(auto-fit, minmax(300px, 1fr))"
    means: make as many columns as fit, each at least 300px wide.
    On a wide screen = 3 columns. On a phone = 1 column. Automatic.
*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.service-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-md);
    transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.service-card h3 {
    color: var(--color-heading);
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.service-card p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

.service-list {
    list-style: none;
}

.service-list li {
    color: var(--color-text);
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

/* Adds a checkmark before each list item */
.service-list li::before {
    content: "✓ ";
    color: var(--color-primary);
    font-weight: 700;
}

/* =========================================
   WHY GRID
   ========================================= */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.why-item {
    text-align: center;
    padding: var(--space-md);
}

.why-item h3 {
    color: var(--color-heading);
    margin-bottom: var(--space-xs);
    font-size: 1.1rem;
}

.why-item p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-section {
    text-align: center;
}

.contact-section .btn {
    margin-top: var(--space-sm);
}

.social-links {
    margin-top: var(--space-md);
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--color-primary);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: var(--space-md) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* =========================================
   PAGE HERO (for sub-pages like About, Services)
   ========================================= */
.page-hero {
    padding: 8rem 0 var(--space-lg);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: var(--space-xs);
}

/* Active nav link */
.nav-links a.active {
    color: var(--color-primary);
}

/* =========================================
   STORY PAGE (about.html)
   ========================================= */
.story-content {
    max-width: 750px;
    margin: 0 auto;
}

.story-block {
    margin-bottom: var(--space-md);
    max-width: 700px;
    margin: 0 auto var(--space-md);
    padding: 0 var(--space-sm);
}

.story-block p {
    font-size: 1.05rem;
    margin-bottom: var(--space-sm);
    line-height: 1.8;
    text-align: center;
}

.story-block h2 {
    text-align: left;
    margin-bottom: var(--space-md);
}

.story-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

.story-location {
    text-align: center;
}

.story-image {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.story-caption {
    max-width: 550px;
    margin: 0 auto;
}

.story-pin {
    font-size: 1.5rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.story-caption h3 {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.story-caption p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

/* =========================================
   HOW IT WORKS (services.html)
   ========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.step {
    text-align: center;
    padding: var(--space-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #000000;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.step h3 {
    color: var(--color-heading);
    margin-bottom: var(--space-xs);
}

.step p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

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

/*
    @media queries let you change styles based on screen size.
    768px is a common breakpoint for tablets.
    Below that = phones.
*/
@media (max-width: 768px) {
    /* Show the hamburger menu button */
    .mobile-menu-btn {
        display: flex;
    }

    .navbar {
        margin-top: 0;
    }

    .container.nav-content {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%; /* place directly below the navbar (responsive to navbar height) */
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--space-sm) 0;
        z-index: 999;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        text-align: center;
        padding: 1.2rem 0;
    }
    .nav-links a {
        display: inline-block;
        padding: 0.5rem 1.2rem;
        margin: 0.2rem 0;
    }
    .nav-cta {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        width: 90%;
        box-sizing: border-box;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .nav-logo {
        padding-left: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .nav-logo img {
        height: 50px;
        margin-bottom: 0.5rem;
    }
    /* Center story paragraphs on small screens for consistent layout */
    .story-block p {
        text-align: center;
    }
    /* Ensure hamburger sits above dropdown and other content */
    .mobile-menu-btn {
        z-index: 1100;
    }
}