/* ============================================
   Roman Court AI — Styles
   ============================================ */

/* === Custom Properties === */
:root {
    --color-bg-deep: #070B14;
    --color-bg-primary: #0A0E1A;
    --color-bg-secondary: #0F1628;
    --color-bg-card: rgba(255, 255, 255, 0.04);
    --color-bg-card-hover: rgba(255, 255, 255, 0.08);

    --color-primary: #2A5CAA;
    --color-primary-dark: #1E3A6E;
    --color-primary-light: #3A7BD5;

    --color-accent: #C9A96E;
    --color-accent-light: #D4BC8A;
    --color-accent-dark: #A68B4B;

    --color-text-primary: #EAEAEA;
    --color-text-secondary: #8A94A6;
    --color-text-heading: #FFFFFF;

    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);

    --color-glow-blue: rgba(42, 92, 170, 0.3);
    --color-glow-gold: rgba(201, 169, 110, 0.3);

    --font-heading: 'Cinzel', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    --section-padding-y: 100px;
    --section-padding-x: 24px;
    --container-max-width: 1100px;
    --card-padding: 32px;
    --card-radius: 16px;
    --grid-gap: 28px;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --nav-height: 72px;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-deep);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(30, 58, 110, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(42, 92, 170, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle marble texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.012) 0px,
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px,
            transparent 80px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.008) 0px,
            rgba(255, 255, 255, 0.008) 1px,
            transparent 1px,
            transparent 80px
        );
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* === Layout Containers === */
.nav__container,
.hero__container,
.section__container,
.footer__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
    position: relative;
    z-index: 1;
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav--scrolled {
    background: rgba(7, 11, 20, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav__logo-img {
    height: 40px;
    width: auto;
}

.nav__logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-heading);
    letter-spacing: 0.05em;
}

.nav__menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav__link {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.03em;
    transition: color var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-text-heading);
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav__hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav__hamburger--open .nav__hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__hamburger--open .nav__hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav__hamburger--open .nav__hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

/* Radial glow behind content */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(42, 92, 170, 0.14) 0%, rgba(30, 58, 110, 0.06) 40%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Vignette overlay to darken edges */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(7, 11, 20, 0.6) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Architectural columns background */
.hero__architecture {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.hero__columns-svg {
    width: 100%;
    height: 100%;
    opacity: 1;
}

/* Subtle parallax drift on columns */
@keyframes colDrift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero__col--1, .hero__col--4 {
    animation: colDrift 8s ease-in-out infinite;
}

.hero__col--2, .hero__col--3 {
    animation: colDrift 8s ease-in-out infinite;
    animation-delay: -2s;
}

.hero__container {
    position: relative;
    z-index: 3;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__logo {
    width: 600px;
    height: auto;
    margin-bottom: 0;
    filter: drop-shadow(0 0 80px rgba(42, 92, 170, 0.5));
    opacity: 0.95;
}

.hero__tagline {
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    margin-top: -40px; /* bring tagline closer to hero logo */
    margin-bottom: 4px;
    max-width: 700px;
}

.hero__divider {
    margin: 24px 0;
    line-height: 0;
}

.hero__divider svg {
    width: 200px;
    height: auto;
    opacity: 0.7;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #FFFFFF;
    box-shadow: 0 4px 15px var(--color-glow-blue);
}

.btn--primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px var(--color-glow-blue);
}

.btn--primary:active {
    transform: scale(0.98);
}

/* === Shared Section Styles === */
.section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    position: relative;
}

.section:nth-child(even) {
    background-color: var(--color-bg-secondary);
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--color-text-heading);
    letter-spacing: 0.02em;
}

/* Gold ornamental divider with diamond center */
.section__divider {
    width: 80px;
    height: 2px;
    margin: 20px auto 0;
    background: linear-gradient(90deg, transparent, var(--color-accent) 20%, var(--color-accent) 80%, transparent);
    position: relative;
}

.section__divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--color-accent);
}

/* === About Section === */
.about__content {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.about__text {
    font-size: 1.05rem;
    color: var(--color-text-primary);
    line-height: 1.8;
    margin-bottom: 48px;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about__stat {
    padding: 28px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.about__stat:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-3px);
}

.about__stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.about__stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* === Services Section === */
.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    transition: transform var(--transition-base), background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent) 50%, transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--card-radius);
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.02) 0%, transparent 40%, rgba(255, 255, 255, 0.015) 60%, transparent 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(42, 92, 170, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--color-primary-light);
}

.card__icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.card__text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* === Philosophy Section === */
.philosophy__content {
    max-width: 900px;
    margin: 0 auto;
}

.philosophy__quote {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    position: relative;
}

.philosophy__quote p {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-text-heading);
    font-style: italic;
    line-height: 1.6;
}

.philosophy__quote cite {
    display: block;
    margin-top: 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-accent);
    font-style: normal;
}

.philosophy__quote::before,
.philosophy__quote::after {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.2;
    position: absolute;
    line-height: 1;
}

.philosophy__quote::before {
    content: '\201C';
    top: 0;
    left: 10%;
}

.philosophy__quote::after {
    content: '\201D';
    bottom: 0;
    right: 10%;
}

.philosophy__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--grid-gap);
    text-align: center;
}

.philosophy__pillar {
    padding: 32px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.philosophy__pillar:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-3px);
}

.philosophy__pillar-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.philosophy__pillar-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* === Contact Section === */
.contact__form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.contact__input {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.contact__input::placeholder {
    color: rgba(138, 148, 166, 0.5);
}

.contact__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(42, 92, 170, 0.15);
}

.contact__input--textarea {
    resize: vertical;
    min-height: 140px;
}

.contact__submit {
    align-self: flex-start;
}

/* === Footer === */
.footer {
    padding: 48px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-deep);
    text-align: center;
}

.footer__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer__logo {
    height: 32px;
    width: auto;
}

.footer__name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-heading);
    letter-spacing: 0.03em;
}

.footer__nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 24px;
}

.footer__link {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-accent);
}

.footer__divider {
    width: 60px;
    height: 1px;
    margin: 0 auto 20px;
    background: var(--color-border);
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* === Scroll Animations === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.services__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.services__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.services__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

.philosophy__pillars .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.philosophy__pillars .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

.animate-on-scroll--visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    :root {
        --section-padding-y: 64px;
        --card-padding: 24px;
        --nav-height: 60px;
    }

    /* Nav mobile */
    .nav__hamburger {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 75vw;
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        background: rgba(10, 14, 26, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 100px 32px 32px;
        gap: 0;
        border-left: 1px solid var(--color-border);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: 999;
    }

    .nav__menu--open {
        transform: translateX(0);
    }

    .nav__item {
        border-bottom: 1px solid var(--color-border);
    }

    .nav__link {
        display: block;
        padding: 16px 0;
        font-size: 1.05rem;
    }

    .nav__link::after {
        display: none;
    }

    /* Hero mobile */
    .hero__tagline {
        font-size: 1.3rem;
    }

    .hero__logo {
        width: 420px;
    }

    .hero__divider svg {
        width: 150px;
    }

    .hero__columns-svg {
        opacity: 0.7;
    }

    /* Section headings mobile */
    .section__title {
        font-size: 1.6rem;
    }

    /* About stats mobile */
    .about__stats {
        grid-template-columns: 1fr;
    }

    /* Services mobile */
    .services__grid {
        grid-template-columns: 1fr;
    }

    /* Philosophy mobile */
    .philosophy__quote p {
        font-size: 1.2rem;
    }

    .philosophy__quote::before {
        left: 0;
    }

    .philosophy__quote::after {
        right: 0;
    }

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

    /* Footer mobile */
    .footer__nav {
        flex-direction: column;
        gap: 12px;
    }

    /* Button mobile */
    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero__logo {
        width: 320px;
    }

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

    .hero__columns-svg {
        opacity: 0.5;
    }
}
