:root {
    --color-background: #ffffff;
    --color-text-main: #111111;
    --color-text-muted: #555555;
    --color-accent-red: rgb(242, 104, 73);
    --color-accent-pink: rgb(252, 209, 203);
    /* --color-accent-blue: rgb(90, 133, 225); */
    --color-accent-blue: rgb(32, 79, 207);
    --color-accent-yellow: rgb(234, 152, 54);
    --color-accent-light-blue: rgb(131, 166, 232);

    --font-main: "Fira Code", monospace;
    /* --font-main: "Inter", sans-serif; */

    --spacing-unit: 1rem;
    --container-width: 1200px;
}

/* ===========================
   Theme Definitions
   =========================== */
:root[data-theme="dark"] {
    --color-background: rgb(30, 33, 39);
    --color-foreground: rgb(220, 223, 228);
    --color-muted: rgb(120, 124, 130);
    --color-terminal-blue: rgb(102, 180, 244);
    --color-terminal-red: rgb(240, 113, 120);
    --color-terminal-green: rgb(144, 205, 130);
    --color-terminal-purple: rgb(199, 146, 234);
    --color-terminal-yellow: rgb(255, 203, 107);
}

:root[data-theme="light"] {
    --color-background: rgb(250, 250, 250);
    --color-foreground: rgb(40, 44, 52);
    --color-muted: rgb(120, 124, 130);
    --color-terminal-blue: rgb(42, 102, 168);
    --color-terminal-red: rgb(185, 60, 70);
    --color-terminal-green: rgb(64, 140, 72);
    --color-terminal-purple: rgb(136, 76, 152);
    --color-terminal-yellow: rgb(176, 120, 32);
}

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

body {
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-main);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Utilities */
.display-text {
    font-size: clamp(1.75rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    word-break: break-word;
}

.heading-l {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.heading-m {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.body-l {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text-muted);
    max-width: 30ch;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot--red    { background: var(--color-terminal-red); }
.dot--yellow { background: var(--color-terminal-yellow); }
.dot--green  { background: var(--color-terminal-green); }

.accent-pink {
    color: var(--color-accent-pink);
}

.accent-blue {
    color: var(--color-accent-blue);
}

.accent-red {
    color: var(--color-accent-red);
}

.accent-yellow {
    color: var(--color-accent-yellow);
}

.accent-light-blue {
    color: var(--color-accent-light-blue);
}

/* ===========================
   Terminal Syntax Colors
   =========================== */
.prompt  { color: var(--color-terminal-purple); }
.dir     { color: var(--color-terminal-blue); }
.exec    { color: var(--color-foreground); }
.special { color: var(--color-terminal-purple); }
.success { color: var(--color-terminal-green); }
.warning { color: var(--color-terminal-yellow); }
.error   { color: var(--color-terminal-red); }

/* ===========================
   Utility Classes (optional)
   =========================== */
.text-blue   { color: var(--color-terminal-blue); }
.text-red    { color: var(--color-terminal-red); }
.text-green  { color: var(--color-terminal-green); }
.text-purple { color: var(--color-terminal-purple); }
.text-yellow { color: var(--color-terminal-yellow); }
.text-muted  { color: var(--color-muted); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

/* Header */
header {
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* background: rgba(255, 255, 255, 0.9); */
    backdrop-filter: blur(10px);
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    /* letter-spacing: -0.04em; */
    text-decoration: none;
    color: var(--color-text-muted);
}

.logo span {
    display: inline-block;
    position: relative;
}

/* Character Kerning Tuning */
.logo .char-1 {
    letter-spacing: -0.1em;
}
.logo .char-2 {
    letter-spacing: 0;
}
.logo .char-3 {
    letter-spacing: -0.00em;
}
.logo .char-4 {
    letter-spacing: -0.04em;
}
.logo .char-5 {
    letter-spacing: 0;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: var(--color-text-main);
    margin-left: 2rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    padding-top: calc(6rem + 4rem);
    padding-bottom: 6rem;
    /* Offset for fixed header + spacing */
}

.hero-content {
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    gap: 4rem;
    align-items: start;
    max-width: 1050px;
    padding: 0 4rem;
}

.hero-col {
    display: flex;
    flex-direction: column;
}

.hero-col-left {
    /* Left column with headline */
}

.hero-col-right {
    /* Right column with description and CTA */
    gap: 2rem;
}

.hero-sub {
    font-size: 1.25rem;
    font-weight: 450;
    color: var(--color-text-muted);
    max-width: 55ch;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Floating CLI */
.floating-cli {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    font-family: "Fira Code", monospace;
    font-size: 1.25rem;
    font-weight: 500;
    /* padding: 0.75rem 1.25rem; */
    background: var(--color-background);
    /* border: 1px solid var(--color-muted);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.cli-path {
    color: var(--color-terminal-purple);
    margin-right: 0.5rem;
    text-decoration: none;
}

.cli-path:hover {
    text-decoration: underline;
}

.cli-arrow {
    color: var(--color-terminal-yellow);
    margin: 0 0.5rem;
}

.cli-command {
    color: var(--color-foreground);
}

.cli-cursor {
    color: var(--color-terminal-purple);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cli-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.3s ease;
    vertical-align: super;
    font-size: 0.7em;
    position: relative;
    top: -0.8em;
    opacity: 0;
}

.cli-copy.visible {
    opacity: 1;
}

.cli-copy:hover {
    color: var(--color-terminal-purple);
    background-color: rgba(128, 128, 128, 0.1);
}

.cli-copy .check-icon {
    display: none;
}

.cli-copy.copied .copy-icon {
    display: none;
}

.cli-copy.copied .check-icon {
    display: block;
    color: var(--color-terminal-green);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--color-terminal-purple);
    color: var(--color-background);
    border: none;
}

.btn-primary:hover {
    background-color: var(--color-accent-pink);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--color-accent-blue);
    padding: 1rem 0;
    background: transparent;
    border: none;
    position: relative;
}

.btn-secondary::after {
    content: '→';
    margin-left: 0.5rem;
    transition: margin-left 0.2s ease;
}

.btn-secondary:hover::after {
    margin-left: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    padding-top: 4rem;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 4rem;
    padding-right: 4rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-text-main);
    opacity: 0.1;
    margin-bottom: -1rem;
}

/* ===========================
   Terminal stuff
   =========================== */
.terminal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===========================
   Theme Toggle
   =========================== */
.theme-toggle {
    font-family: 'Fira Code', monospace;
    background: transparent;
    color: var(--color-foreground);
    border: 1px solid var(--color-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--color-terminal-purple);
}

/* ===========================
   Terminal Window
   =========================== */
.terminal {
    background: var(--color-background);
    border: 1px solid var(--color-muted);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.terminal-header {
    background: rgba(128, 128, 128, 0.1);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.terminal-body {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo{
    font-weight: 900;
    font-size: 2rem;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding-top: calc(6rem + 2rem);
        padding-bottom: 4rem;
    }

    .display-text {
        font-size: clamp(1.75rem, 8vw, 4.5rem);
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 2rem;
    }

    .floating-cli {
        font-size: 1rem;
        white-space: nowrap;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}