/* interplanetary.biz -- Scandinavian sepia modular grid */
/* Palette: #C4956A (amber archive), #8B6914 (warm umber), #F5EDE0 (parchment cream), #EBE0CE (aged linen), #2D2A24 (charcoal ink), #6B5D4F (walnut brown), #D1C4AD (faded rule), #A67C52 (copper trace), #DBC9A8 (soft ochre) */

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

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

body{
    background:#F5EDE0;
    color:#2D2A24;
    font-family:'Inter',sans-serif;
    font-weight:400;
    font-size:clamp(0.875rem,0.875rem + 0.5vw,1.1rem);
    line-height:1.75;
    letter-spacing:0.01em;
    overflow-x:hidden;
}

/* Linen texture */
body::before{
    content:'';
    position:fixed;
    inset:0;
    background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
    background-size:150px;
    opacity:0.04;
    pointer-events:none;
    z-index:0;
}

.cormorant-italic{
    font-family:'Cormorant Garamond',serif;
    font-weight:400;
    font-style:italic;
}

/* Nav shelf */
.nav-shelf{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:100;
    display:flex;
    gap:clamp(1.5rem,3vw,3rem);
    padding:1rem clamp(2rem,4vw,4rem);
    background:rgba(245,237,224,0.9);
    backdrop-filter:blur(4px);
    border-bottom:1px solid #D1C4AD;
}

.nav-item{
    font-family:'Inter',sans-serif;
    font-weight:300;
    font-size:clamp(0.75rem,1vw,0.9rem);
    letter-spacing:0.04em;
    color:#6B5D4F;
    cursor:pointer;
    transition:color 0.3s ease,font-size 0.3s ease;
}

.nav-item:hover{
    color:#C4956A;
}

/* Sections */
.section{
    min-height:100svh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:clamp(4rem,6vw,6rem) clamp(2rem,4vw,4rem);
    position:relative;
    z-index:1;
}

/* Modules */
.module{
    background:#EBE0CE;
    border:1px solid #D1C4AD;
    padding:clamp(1.5rem,3vw,2.5rem);
    transition:border-color 0.3s ease;
}

.module:hover{
    border-color:#C4956A;
}

/* Hero module */
.module-hero{
    text-align:center;
    margin-bottom:2rem;
}

.hero-domain{
    font-family:'Inter',sans-serif;
    font-weight:700;
    font-size:clamp(1rem,1rem + 3vw,5rem);
    color:#2D2A24;
    letter-spacing:-0.01em;
    line-height:1.1;
}

.hero-dateline{
    font-size:clamp(0.9rem,1.2vw,1.3rem);
    color:#6B5D4F;
    margin-top:0.5rem;
    letter-spacing:0.02em;
}

.module-icon{
    display:inline-flex;
    padding:1rem;
    margin:0.5rem;
}

/* Grid */
.grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
    max-width:900px;
    width:100%;
}

.module-entry{
    opacity:0;
    transform:translateY(12px);
    transition:opacity 0.6s ease,transform 0.6s ease;
}

.module-entry.revealed{
    opacity:1;
    transform:translateY(0);
}

.module-wide{
    grid-column:span 2;
}

.entry-date{
    font-size:clamp(0.9rem,1.2vw,1.1rem);
    color:#6B5D4F;
    display:block;
    margin-bottom:0.5rem;
}

.entry-heading{
    font-family:'Inter',sans-serif;
    font-weight:700;
    font-size:clamp(1.2rem,1.2rem + 1vw,2rem);
    color:#2D2A24;
    margin-bottom:0.75rem;
    line-height:1.2;
}

.entry-text{
    color:#2D2A24;
}

/* Circuit */
.section-circuit{
    min-height:auto;
    padding:clamp(3rem,6vw,6rem) clamp(2rem,4vw,4rem);
}

.circuit-svg{
    width:100%;
    max-width:600px;
}

.circuit-path{
    stroke-dasharray:800;
    stroke-dashoffset:800;
    transition:stroke-dashoffset 2.5s ease;
}

.section-circuit.in-view .circuit-path{
    stroke-dashoffset:0;
}

.circuit-caption{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.75rem;
    letter-spacing:0.04em;
    color:#6B5D4F;
    margin-top:1rem;
    text-align:center;
}

/* Archive */
.section-archive{
    background:#EBE0CE;
}

.archive-panel{
    max-width:640px;
    text-align:center;
    opacity:0;
    transform:translateY(16px);
    transition:opacity 0.8s ease,transform 0.8s ease;
}

.archive-panel.revealed{
    opacity:1;
    transform:translateY(0);
}

.archive-heading{
    font-family:'Inter',sans-serif;
    font-weight:700;
    font-size:clamp(1.5rem,1.5rem + 2vw,3.5rem);
    color:#2D2A24;
    margin-bottom:1.5rem;
}

.archive-text{
    color:#2D2A24;
    margin-bottom:1.5rem;
}

.archive-domain{
    font-family:'Cormorant Garamond',serif;
    font-weight:600;
    font-size:clamp(1.2rem,2vw,2rem);
    color:#C4956A;
    letter-spacing:0.02em;
}

/* Responsive */
@media(max-width:768px){
    .grid{
        grid-template-columns:1fr;
    }
    .module-wide{
        grid-column:span 1;
    }
    .nav-shelf{
        gap:1rem;
        padding:0.75rem 1rem;
    }
}

@media(prefers-reduced-motion:reduce){
    .module-entry,.archive-panel{
        opacity:1;transform:none;transition:none;
    }
    .circuit-path{stroke-dashoffset:0;transition:none}
}
