/* alth.ing — Swiss Typographic System */
/* Palette */
/* Glacier White: #F4F5F7 | Frost: #E8EAED | Silver Wire: #B0B8C1 */
/* Slate: #5A6572 | Graphite: #1A1F26 | Ash: #8A929C */
/* Storm: #3D4550 | Signal Blue: #2C5ECC */

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

html {
    font-size: 16px;
    scroll-behavior: auto;
}

body {
    background-color: #F4F5F7;
    color: #3D4550;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ==============================
   ENTRY ANIMATION LINES
   ============================== */

.entry-line {
    position: fixed;
    left: 0;
    height: 1px;
    background-color: #B0B8C1;
    width: 0;
    z-index: 1000;
    pointer-events: none;
}

#entry-line-top {
    top: 48px;
}

#entry-line-bottom {
    bottom: 48px;
}

.entry-line.animate {
    animation: drawLine 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawLine {
    from { width: 0; }
    to { width: 100vw; }
}

/* ==============================
   GRID OVERLAY (revelation)
   ============================== */

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    padding: 0 48px;
    gap: 24px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 600ms ease;
}

.grid-overlay.visible {
    opacity: 1;
}

.grid-overlay .grid-line {
    border-left: 1px solid rgba(176, 184, 193, 0.08);
    height: 100%;
}

/* ==============================
   TOP BAR
   ============================== */

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #F4F5F7;
    padding: 0 48px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: #1A1F26;
}

.wm-letter {
    display: inline-block;
    opacity: 0;
    transform: scale(0.8);
}

.wm-letter.revealed {
    opacity: 1;
    transform: scale(1);
    transition: opacity 120ms ease, transform 120ms ease;
}

.top-rule {
    height: 1px;
    background-color: #B0B8C1;
    width: 100%;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8A929C;
    text-decoration: none;
    position: relative;
    padding-left: 12px;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: #2C5ECC;
}

.nav-link.active {
    color: #1A1F26;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background-color: #2C5ECC;
}

/* ==============================
   HERO ZONE
   ============================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 48px;
    overflow: hidden;
}

.hero-ghost-letter {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(400px, 50vw, 800px);
    line-height: 1;
    color: #E8EAED;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 66.666%;
    padding-left: calc((100% - 96px) / 12 + 24px);
    opacity: 0;
    transform: translateY(16px);
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms ease, transform 300ms ease;
}

.hero-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #1A1F26;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-descriptor {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.4;
    color: #5A6572;
    max-width: 50ch;
}

/* Diagonal line */
.diagonal-line {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
}

.diagonal-line line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.diagonal-line.animate line {
    animation: drawDiagonal 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawDiagonal {
    to { stroke-dashoffset: 0; }
}

/* ==============================
   SECTION DOTS
   ============================== */

.section-dots {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 40px 0;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #B0B8C1;
}

/* ==============================
   CONTENT SECTIONS
   ============================== */

.content-section {
    padding: 0 48px;
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.content-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-rule {
    height: 1px;
    background-color: #B0B8C1;
    width: 66.666%;
    margin-bottom: 48px;
}

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

.content-span-4 {
    grid-column: span 4;
}

.content-span-6 {
    grid-column: span 6;
}

.content-span-8 {
    grid-column: span 8;
}

/* Typography */
h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #1A1F26;
    margin-bottom: 24px;
}

h3.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1.125rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    color: #5A6572;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mono-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #5A6572;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: #3D4550;
    max-width: 65ch;
    margin-bottom: 16px;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* ==============================
   CARD GRID
   ============================== */

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

.card {
    background-color: #E8EAED;
    padding: 32px;
    transition: transform 200ms ease-out;
}

.card:hover {
    transform: scale(1.02);
}

.card:hover .card-label {
    color: #2C5ECC;
}

.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    color: #5A6572;
    text-transform: uppercase;
    margin-bottom: 8px;
    transition: color 200ms ease-out;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #1A1F26;
    margin-bottom: 16px;
}

/* ==============================
   SWISS CROSS LAYOUT
   ============================== */

.cross-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
    max-width: 900px;
    margin: 48px auto 0;
    align-items: center;
}

.cross-top {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    padding: 32px;
}

.cross-left {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
    padding: 32px;
}

.cross-center {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.cross-right {
    grid-column: 3;
    grid-row: 2;
    text-align: center;
    padding: 32px;
}

.cross-bottom {
    grid-column: 2;
    grid-row: 3;
    text-align: center;
    padding: 32px;
}

.swiss-cross {
    position: relative;
    width: 48px;
    height: 48px;
}

.cross-h,
.cross-v {
    position: absolute;
    background-color: #2C5ECC;
}

.cross-h {
    width: 48px;
    height: 16px;
    top: 16px;
    left: 0;
}

.cross-v {
    width: 16px;
    height: 48px;
    top: 0;
    left: 16px;
}

.cross-block .card-label {
    margin-bottom: 12px;
}

/* ==============================
   FOOTER
   ============================== */

.site-footer {
    padding: 0 48px 48px;
    margin-top: 120px;
}

.footer-rule {
    height: 1px;
    background-color: #B0B8C1;
    width: 100%;
    margin-bottom: 48px;
}

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

.footer-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    color: #5A6572;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #3D4550;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #E8EAED;
}

.footer-bottom .mono-meta {
    font-size: 0.75rem;
    color: #8A929C;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==============================
   LINK HOVER ANIMATION
   ============================== */

a {
    color: #2C5ECC;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #2C5ECC;
    transition: width 200ms ease-out;
}

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

.nav-link::after {
    display: none;
}

/* ==============================
   RESPONSIVE — Tablet (8-col)
   ============================== */

@media (max-width: 1024px) {
    .hero {
        padding: 48px 32px;
    }

    #top-bar {
        padding: 0 32px;
    }

    .content-section {
        padding: 0 32px;
    }

    .site-footer {
        padding: 0 32px 32px;
    }

    .grid-overlay {
        padding: 0 32px;
        grid-template-columns: repeat(9, 1fr);
        gap: 16px;
    }

    .content-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 16px;
    }

    .content-span-4 {
        grid-column: span 3;
    }

    .content-span-6 {
        grid-column: span 5;
    }

    .content-span-8 {
        grid-column: span 8;
    }

    .hero-content {
        max-width: 80%;
        padding-left: 0;
    }

    .card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .cross-layout {
        gap: 16px;
    }
}

/* ==============================
   RESPONSIVE — Mobile (4-col)
   ============================== */

@media (max-width: 640px) {
    .hero {
        padding: 72px 24px 48px;
        align-items: flex-start;
        min-height: auto;
        padding-top: 120px;
    }

    #top-bar {
        padding: 0 24px;
    }

    .top-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 12px 0;
    }

    .main-nav {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        margin-top: 8px;
    }

    .content-section {
        padding: 0 24px;
        margin-bottom: 80px;
    }

    .site-footer {
        padding: 0 24px 24px;
        margin-top: 80px;
    }

    .grid-overlay {
        padding: 0 24px;
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }

    .content-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .content-span-4,
    .content-span-6,
    .content-span-8 {
        grid-column: span 4;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 0;
    }

    .hero-ghost-letter {
        font-size: 300px;
        right: -10%;
    }

    .section-rule {
        width: 100%;
    }

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

    .cross-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
        gap: 0;
    }

    .cross-top {
        grid-column: 1;
        grid-row: 1;
    }

    .cross-left {
        grid-column: 1;
        grid-row: 2;
    }

    .cross-center {
        grid-column: 1;
        grid-row: 3;
        justify-content: flex-start;
        padding: 16px 32px;
    }

    .cross-right {
        grid-column: 1;
        grid-row: 4;
    }

    .cross-bottom {
        grid-column: 1;
        grid-row: 5;
    }

    .cross-block {
        text-align: left;
        padding: 24px 32px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    #entry-line-top {
        top: 24px;
    }

    #entry-line-bottom {
        bottom: 24px;
    }

    .diagonal-line {
        display: none;
    }
}
