/* ============================================
   commitgen — landing page
   BLUEPRINT / TECHNICAL DRAWING aesthetic
   ============================================ */

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

:root {
    --bg: #0c2747;              /* deep blueprint blue */
    --bg-deep: #0a2040;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-elev: rgba(255, 255, 255, 0.05);
    --text: #f5f8fa;            /* grid-paper white */
    --text-dim: #8aa6c4;        /* dim blueprint-cream */
    --text-muted: #567290;
    --cream: #f0e4b0;           /* graph-paper cream — accent */
    --cream-soft: rgba(240, 228, 176, 0.18);
    --red: #e85d5d;             /* schematic-red */
    --grn: #9cd3a0;
    --line: rgba(240, 228, 176, 0.22);
    --line-strong: rgba(240, 228, 176, 0.42);
    --line-red: rgba(232, 93, 93, 0.5);

    --radius: 2px; /* blueprint: sharp, not rounded */
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* GRID PAPER BACKGROUND — inline svg, fine 24px grid + bolder 120px grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23f0e4b0' stroke-width='0.5' opacity='0.18'><path d='M24 0V120M48 0V120M72 0V120M96 0V120M0 24H120M0 48H120M0 72H120M0 96H120'/></g><g fill='none' stroke='%23f0e4b0' stroke-width='0.9' opacity='0.32'><path d='M0 0H120M0 120H120M0 0V120M120 0V120'/></g></svg>");
    background-size: 120px 120px;
    background-position: 0 0;
    opacity: 0.9;
}

/* subtle vignette + diagonal blue wash on top of grid */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(240, 228, 176, 0.05), transparent 65%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(232, 93, 93, 0.04), transparent),
        linear-gradient(180deg, transparent 0%, rgba(10, 32, 64, 0.4) 100%);
}

a {
    color: var(--cream);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--red);
}

::selection {
    background: var(--cream);
    color: var(--bg);
}

code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    color: var(--cream);
    background: transparent;
    padding: 0.05em 0.35em;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.75rem 2rem;
}

/* ============================================
   nav
   ============================================ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 2.5rem;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.nav-logo:hover {
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 400;
    text-transform: lowercase;
}

.nav-link:hover {
    color: var(--cream);
}

.nav-cta {
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5em 1.1em;
    border-radius: var(--radius);
    background: var(--cream);
    border: 1px solid var(--cream);
    text-transform: lowercase;
    transition: all 0.2s var(--ease);
}

.nav-cta:hover {
    color: var(--bg);
    background: var(--red);
    border-color: var(--red);
}

/* ============================================
   hero
   ============================================ */
.hero {
    padding: 1rem 0 4rem;
}

.hero-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.hero-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 0.35em 1em;
    border-radius: var(--radius);
    background: transparent;
    border: 1px dashed var(--line-strong);
    margin-bottom: 1.75rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5.2vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero-title .grad {
    color: var(--cream);
    border-bottom: 1px dashed var(--line-red);
    padding-bottom: 2px;
}

.hero-sub {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--text-dim);
    max-width: 680px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.hero-cta-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.6em;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.25s var(--ease);
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.btn-primary {
    color: var(--bg);
    background: var(--cream);
    border: 1px solid var(--cream);
}

.btn-primary:hover {
    color: var(--bg);
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--text);
    background: transparent;
    border: 1px dashed var(--line-strong);
}

.btn-ghost:hover {
    color: var(--cream);
    border-color: var(--cream);
    border-style: solid;
}

/* ============================================
   hero schematic — blueprint ASCII
   ============================================ */
.hero-schematic {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 0 1rem;
}

.schematic {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
    text-align: left;
    white-space: pre;
    overflow-x: auto;
    padding: 1.5rem 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(10, 32, 64, 0.35);
}

.bp-dim { color: var(--text-dim); }
.bp-cream { color: var(--cream); font-weight: 500; }
.bp-hi { color: var(--cream); font-weight: 600; }
.bp-accent { color: var(--red); font-weight: 600; }
.bp-mute { color: var(--text-muted); }
.bp-grn { color: var(--grn); }
.bp-red { color: var(--red); }

/* callouts — architectural drawing labels */
.callout {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cream);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.callout-num {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cream);
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cream);
    background: var(--bg);
}

.callout-line {
    display: inline-block;
    width: 58px;
    height: 1px;
    background-image: linear-gradient(to right, var(--cream) 50%, transparent 50%);
    background-size: 6px 1px;
}

.callout-left {
    top: 3rem;
    left: 0;
}

.callout-right {
    top: 5.5rem;
    right: 0;
}

/* ============================================
   section headers
   ============================================ */
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--line);
    position: relative;
}

.section-num {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cream);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.3em 0.8em;
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    margin-top: -2.9rem;
    position: relative;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.section-head p {
    color: var(--text-dim);
    font-size: 0.98rem;
    max-width: 520px;
    margin: 0 auto;
}

/* ============================================
   demo section — blueprint document style
   ============================================ */
.demo-section {
    padding: 3rem 0;
}

.doc-block {
    position: relative;
    max-width: 820px;
    margin: 0 auto 2rem;
    padding: 1.5rem 1.25rem 1.75rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(10, 32, 64, 0.4);
}

.doc-bracket {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--cream);
    line-height: 1;
    pointer-events: none;
}

.doc-bracket.tl { top: -0.5rem; left: -0.5rem; }
.doc-bracket.tr { top: -0.5rem; right: -0.5rem; }
.doc-bracket.bl { bottom: -0.5rem; left: -0.5rem; }
.doc-bracket.br { bottom: -0.5rem; right: -0.5rem; }

.doc-rev {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.listing {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text);
    white-space: pre;
    overflow-x: auto;
    padding-top: 1.25rem;
}

.ln {
    display: inline-block;
    width: 2.25rem;
    color: var(--text-muted);
    user-select: none;
    border-right: 1px dashed var(--line);
    padding-right: 0.5rem;
    margin-right: 0.75rem;
    text-align: right;
}

/* ============================================
   features grid — numbered blueprint cards
   ============================================ */
.features-section {
    padding: 3rem 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
}

.feature {
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
    background: rgba(10, 32, 64, 0.35);
    border-top: 1px dashed var(--line-strong);
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-left: 1px solid transparent;
    border-radius: 0;
    transition: all 0.3s var(--ease);
}

.feature::before {
    /* tiny graph tick in the corner */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--cream);
    border-left: 1px solid var(--cream);
    transform: translate(-1px, -1px);
}

.feature::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--cream);
    border-right: 1px solid var(--cream);
    transform: translate(1px, -1px);
}

.feature:hover {
    background: rgba(240, 228, 176, 0.04);
}

.feature-num {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 500;
    color: var(--cream);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 0.85rem;
    font-feature-settings: 'tnum';
}

.feature h3 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.6rem;
    text-transform: lowercase;
}

.feature p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ============================================
   how it works — three-stage diagram
   ============================================ */
.howitworks {
    padding: 3rem 0;
}

.stages {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: stretch;
}

.stage {
    position: relative;
    display: flex;
    flex-direction: column;
}

.stage-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cream);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    text-align: left;
}

.stage-num::before {
    content: '◇ step ';
    color: var(--text-muted);
}

.stage-box {
    flex: 1;
    padding: 1.25rem 1.25rem 1.35rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(10, 32, 64, 0.4);
    position: relative;
}

.stage-box::before,
.stage-box::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--cream);
}

.stage-box::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--cream);
    border-left: 1px solid var(--cream);
}

.stage-box::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--cream);
    border-right: 1px solid var(--cream);
}

.stage-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 0.6rem;
    text-transform: lowercase;
    letter-spacing: -0.01em;
}

.stage-body {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.stage-arrow {
    position: absolute;
    right: -0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    color: var(--red);
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 2;
    background: var(--bg);
    padding: 0 0.15rem;
}

.stage-arrow-end {
    color: var(--cream);
}

/* ============================================
   install — blueprint cards with corner brackets
   ============================================ */
.install {
    padding: 3rem 0 2rem;
}

.install-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    max-width: 1050px;
    margin: 0 auto;
}

.install-card {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    background: rgba(10, 32, 64, 0.4);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.install-corner {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--cream);
    line-height: 1;
    pointer-events: none;
}

.install-corner.tl { top: -0.55rem; left: -0.55rem; }
.install-corner.tr { top: -0.55rem; right: -0.55rem; }
.install-corner.bl { bottom: -0.55rem; left: -0.55rem; }
.install-corner.br { bottom: -0.55rem; right: -0.55rem; }

.install-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: lowercase;
}

.soon {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--red);
    background: transparent;
    padding: 0.15em 0.55em;
    border: 1px dashed var(--line-red);
    border-radius: var(--radius);
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.install-card pre {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--cream);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    flex: 1;
}

.install-card .note {
    margin-top: 0.9rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.install-card code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================
   footer
   ============================================ */
.footer {
    padding: 3rem 0 1.5rem;
    border-top: 1px dashed var(--line);
    margin-top: 3.5rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
}

.footer-links a:hover {
    color: var(--cream);
}

.footer-rev {
    margin-top: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-align: right;
}

/* ============================================
   mobile
   ============================================ */
@media (max-width: 860px) {
    .stages { grid-template-columns: 1fr; gap: 1.75rem; }
    .stage-arrow {
        right: 50%;
        top: auto;
        bottom: -1.4rem;
        transform: translate(50%, 0) rotate(90deg);
    }
    .callout { display: none; }
}

@media (max-width: 720px) {
    .page { padding: 0.85rem 1rem; }
    .nav { padding: 0.5rem 0 1rem; margin-bottom: 1.25rem; }
    .nav-logo span { display: none; }
    .hero { padding: 1rem 0 2.5rem; }
    .hero-kicker { font-size: 0.66rem; padding: 0.3em 0.8em; }
    .hero-sub { font-size: 0.95rem; }
    .schematic { font-size: 9.5px; padding: 1rem 0.5rem; }
    .listing { font-size: 10.5px; }
    .ln { width: 1.75rem; margin-right: 0.5rem; padding-right: 0.35rem; }
    .features { grid-template-columns: 1fr; }
    .feature { padding: 1.75rem 1.25rem 1.25rem; }
    .feature-num { font-size: 2.25rem; }
    .install-grid { grid-template-columns: 1fr; }
    .footer { padding: 2rem 0 1rem; margin-top: 2rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-rev { text-align: left; }
}
