/* =========================================================================
   INSTITUTE OF DIGITAL RISK (IDR) - MAIN STYLESHEET
   Description: Core styles, layout structure, and design system variables.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. CSS Variables (Custom Properties)
   Used for consistent theming across the application.
   ------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --color-primary: #FF5A00;
    /* Main brand orange */
    --color-primary-dark: #cc4800;
    /* Darker orange for hover states */

    /* Background Colors */
    --color-bg: #AEC9E5;
    /* Main body background (Faint attractive blue) */
    --color-bg-light: #FFFFFF;
    /* Pure white for cards & overlay sections */
    --color-bg-dark: #E6EBF5;
    /* Secondary faint blue for alternating sections */

    /* Typography Colors */
    --color-text: #111111;
    /* Primary text color (dark) */
    --color-text-muted: #4B5563;
    /* Secondary/muted text color */
    --color-text-dark: #000000;
    /* Pure black for accents */

    /* Border Colors */
    --color-border: #D1D5DB;
    /* Input borders, dividers */
    --color-border-light: #E5E7EB;
    /* Card borders, faint dividers */

    /* Font Families */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transition Timings */
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* -------------------------------------------------------------------------
   2. Reset and Base Styles
   ------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for sticky header */
    font-size: 22px;
    /* Base scale */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-muted);
    line-height: 1.6;
    background-color: var(--color-bg);
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--color-text);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------------------------
   3. Utility Classes
   Reusable layout and typography helpers.
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.text-orange {
    color: var(--color-primary);
}

.text-white {
    color: #FFFFFF;
}

.text-light {
    color: var(--color-text-muted);
}

.bg-dark {
    background-color: var(--color-bg-dark);
}

.w-100 {
    width: 100%;
}

/* -------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.3);
}

.btn-secondary {
    background-color: var(--color-text);
    color: #FFF;
}

.btn-secondary:hover {
    background-color: var(--color-text-muted);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: #FFF;
    border-color: var(--color-text);
}

/* -------------------------------------------------------------------------
   5. Navigation Bar
   ------------------------------------------------------------------------- */
.navbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(244, 247, 251, 0.85);
    /* Frosty transparency */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1rem 0;
    transition: box-shadow var(--transition-smooth), padding var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--color-border-light);
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 48px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    color: var(--color-text);
}

/* Underline animation on hover */
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-smooth);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

/* Mobile Hamburger Menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    position: relative;
    transition: background-color var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: inherit;
    background-color: inherit;
    left: 0;
    transition: transform var(--transition-smooth), top var(--transition-smooth);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* -------------------------------------------------------------------------
   6. Hero Section
   ------------------------------------------------------------------------- */
.hero {
    padding: 100px 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #FFFFFF 0%, var(--color-bg) 60%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: black;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.geometric-shape {
    width: 80%;
    max-width: 400px;
    aspect-ratio: 1;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.geometric-shape img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

/* -------------------------------------------------------------------------
   7. General Section Styles
   ------------------------------------------------------------------------- */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* -------------------------------------------------------------------------
   8. About Section
   ------------------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background-color: rgba(94, 0, 69, 0.05);
    /* Light tint background */
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.stat-card p {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
}

/* -------------------------------------------------------------------------
   9. Services / Pillars Section
   ------------------------------------------------------------------------- */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.pillar-card {
    background-color: var(--color-bg-light);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--color-primary);
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

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

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

.pillar-card p {
    color: var(--color-text-muted);
}

/* Pipeline Map */
.pipeline {
    background-color: var(--color-bg-light);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.pipeline-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.75rem;
}

.pipeline-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Central connecting line for timeline steps */
.pipeline-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: var(--color-border);
    z-index: 1;
}

.pipeline-step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-dot {
    width: 24px;
    height: 24px;
    background-color: var(--color-primary);
    border: 4px solid var(--color-bg-light);
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.pipeline-step h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

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

/* -------------------------------------------------------------------------
   10. Community Section
   ------------------------------------------------------------------------- */
.community {
    background-color: var(--color-bg-dark);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.community-content {
    max-width: 800px;
    margin: 0 auto;
}

.community-desc {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* -------------------------------------------------------------------------
   11. Contact Section
   ------------------------------------------------------------------------- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.contact-form-wrapper {
    background-color: var(--color-bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-bg-light);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}

/* -------------------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------------------- */
footer {
    background-color: var(--color-text);
    color: #FFFFFF;
    padding: 3rem 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-copyright {
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
   13. Responsive Breakpoints
   ------------------------------------------------------------------------- */
/* Medium Devices (Tablets) */
@media (max-width: 992px) {

    .hero-container,
    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero {
        padding: 60px 0;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Devices (Mobile) */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-light);
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-links.active {
        display: flex;
    }

    /* Transform pipeline into vertical list */
    .pipeline-timeline {
        flex-direction: column;
        gap: 2rem;
    }

    .pipeline-timeline::before {
        top: 0;
        bottom: 0;
        left: 11px;
        right: auto;
        width: 2px;
        height: 100%;
    }

    .pipeline-step {
        display: flex;
        text-align: left;
        align-items: center;
        gap: 1.5rem;
    }

    .step-dot {
        margin: 0;
    }

    .about-stats {
        flex-direction: column;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
    }
}
