
/* =========================
   CORE DESIGN TOKENS
========================= */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
    --bg: #07080a;
    --bg-deep: #050608;
    --bg-elevated: rgba(255, 255, 255, 0.035);
    --panel: rgba(255,255,255,0.04);
    --panel-strong: rgba(255,255,255,0.06);

    --border: rgba(255,255,255,0.12);
    --border-strong: rgba(255,255,255,0.2);
    --border-soft: rgba(255,255,255,0.08);

    --text: rgba(255,255,255,0.95);
    --muted: rgba(255,255,255,0.68);
    --faint: rgba(255,255,255,0.48);

    --accent: #f2f4f8;
    --accent-soft: rgba(255,255,255,0.08);
    --accent-line: rgba(255,255,255,0.16);

    --radius: 16px;
    --radius-soft: 12px;
    --radius-xs: 10px;

    --shadow-lg: 0 28px 80px rgba(0,0,0,0.42);
    --shadow-md: 0 18px 50px rgba(0,0,0,0.26);
    --shadow-sm: 0 8px 24px rgba(0,0,0,0.18);

    --max-width: 1240px;
    --content-width: 72ch;

    --space-1: 0.375rem;
    --space-2: 0.75rem;
    --space-3: 1.125rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 4.5rem;

    --transition-fast: 160ms ease;
    --transition: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-slow: 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================
   RESET
========================= */

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

html, body {
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,0.06), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(255,255,255,0.05), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    color: var(--text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================
   TYPOGRAPHY SYSTEM
========================= */

h1, h2, h3 {
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    letter-spacing: -0.5px;
    font-weight: 600;
    color: var(--text);
    text-wrap: balance;
}

h1 {
    letter-spacing: -1px;
    line-height: 0.98;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

/* =========================
   LINKS (ENGINEERED STYLE)
========================= */

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

a:hover {
    opacity: 0.85;
}

/* subtle underline system */
a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1px;
    background: var(--border-soft);
    transition: var(--transition);
}

a:hover::after {
    width: 100%;
}

/* =========================
   MAIN LAYOUT SYSTEM
========================= */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) 20px 0;
}

/* =========================
   SECTION SYSTEM (IMPROVED RHYTHM)
========================= */

section {
    margin-bottom: clamp(4rem, 8vw, 6rem);
}

/* stronger section hierarchy option */
.section-block {
    padding-top: 60px;
    border-top: 1px solid var(--border-soft);
}

/* =========================
   HERO (REFINED IDENTITY)
========================= */

.hero {
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.hero h1 {
    font-size: clamp(3.2rem, 7vw, 5.8rem);
    margin-bottom: var(--space-3);
    letter-spacing: -0.05em;
    max-width: 10.5ch;
}

.hero p {
    max-width: 62ch;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
}

/* subtle engineering marker line */
.hero h1::after {
    content: "";
    display: block;
    width: 96px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.08));
    margin: 22px 0 0;
    border-radius: 999px;
}

.hero-content {
    width: 100%;
}

.hero-content > * {
    position: relative;
    z-index: 1;
}

.hero::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(255,255,255,0.05), transparent 20%),
        radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 58%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    pointer-events: none;
}

/* =========================
   CARDS (ENGINEERED SURFACE SYSTEM)
========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
        rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);

    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
}

/* top micro highlight (industrial feel) */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

/* =========================
   BUTTON (ENGINEERED UI)
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 0.8rem 1.15rem;

    border-radius: var(--radius-soft);
    border: 1px solid var(--border);

    background: rgba(255,255,255,0.02);
    color: var(--text);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;

    transition: var(--transition);

    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* =========================
   CTA SECTION
========================= */

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

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(255,255,255,0.9);
    outline-offset: 4px;
}

/* =========================
   UTILITIES
========================= */

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

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

/* =========================
   MOTION SYSTEM (GLOBAL FEEL)
========================= */

:root {
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* global smooth transitions */
* {
    transition-timing-function: var(--ease-out);
}

/* reduce “jumpy hover feel” */
a, button, .card, .btn {
    transition: transform 0.25s var(--ease-out),
                opacity 0.25s var(--ease-out),
                border-color 0.25s var(--ease-out),
                background 0.25s var(--ease-out);
}

@media (max-width: 768px) {
    main {
        padding-inline: 16px;
    }

    .hero {
        min-height: auto;
        padding-top: 4.5rem;
        padding-bottom: 4rem;
    }

    .hero h1 {
        max-width: none;
        font-size: clamp(2.7rem, 12vw, 3.8rem);
    }

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

/* =========================
   SPACING SYSTEM (VISUAL RHYTHM CORE)
========================= */

:root {
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 40px;
    --space-6: 64px;
    --space-7: 96px;
}

/* =========================
   GLOBAL SECTION RHYTHM RULE
========================= */

section {
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
}

/* prevent double spacing with first section */
section:first-child {
    padding-top: var(--space-6);
}

/* =========================
   VISUAL SEPARATION SYSTEM
========================= */

.section-divider {
    margin-top: var(--space-6);
    border-top: 1px solid var(--border-soft);
}

/* =========================
   TEXT HIERARCHY TIGHTENING
========================= */

h1 {
    font-size: clamp(3rem, 6vw, 4.8rem);
    letter-spacing: -1px;
    font-weight: 600;
    line-height: 1.05;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
}

p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 70ch;
}

/* =========================
   SPATOLA VISUAL SIGNATURE LAYER
========================= */

/* stronger surface definition */
:root {
    --surface-glow: rgba(255,255,255,0.04);
}

/* =========================
   GLOBAL SURFACE LANGUAGE
========================= */

.card,
.btn,
.lang-menu {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.03),
        rgba(255,255,255,0.01)
    );
}

/* =========================
   BORDER LANGUAGE (ENGINEERING STYLE)
========================= */

.card,
.btn,
.lang-menu,
nav {
    border: 1px solid rgba(255,255,255,0.08);
}

/* =========================
   HOVER PHILOSOPHY (CONTROLLED MOVEMENT)
========================= */

.card:hover,
.btn:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* =========================
   HERO VISUAL AUTHORITY
========================= */

.hero h1 {
    position: relative;
}

/* subtle “engineering axis line” */
.hero h1::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;

    width: 90px;
    height: 1px;

    background: rgba(255,255,255,0.12);
}

/* =========================
   SCROLL EXPERIENCE LAYER
========================= */

/* smoother perceived motion */
html {
    scroll-behavior: smooth;
}

/* better scroll rhythm */
section {
    scroll-margin-top: 100px;
}

/* soft fade-in baseline for sections */
section {
    opacity: 0;
    transform: translateY(10px);
    animation: sectionIn 0.6s ease forwards;
}

/* stagger effect (natural flow) */
section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.10s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.20s; }
section:nth-child(5) { animation-delay: 0.25s; }

@keyframes sectionIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   FINAL SPACING POLISH LAYER
========================= */

/* unify vertical rhythm */
section {
    padding-top: 90px;
    padding-bottom: 90px;
}

/* prevent excessive first section gap */
section:first-child {
    padding-top: 70px;
}

/* tighter heading hierarchy consistency */
h1 {
    line-height: 1.05;
}

h2 {
    line-height: 1.2;
}

h3 {
    line-height: 1.3;
}

/* reduce visual noise in text blocks */
p {
    letter-spacing: 0.1px;
}

.legal-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.legal-box {
    background: #111;
    color: white;
    padding: 30px;
    max-width: 420px;
    border-radius: 10px;
    text-align: center;
}

.legal-box a {
    color: #aaa;
    display: block;
    margin: 5px 0;
}

.legal-box button {
    margin: 10px;
    padding: 10px 15px;
    cursor: pointer;
}
