/* =========================================================================
   punk.science — Brand System v1.0 (D04B)
   Reborn 2026 · Halifax, NS · Canada
   Rule of three: any composition uses at most three of the four colors —
   typically ink + paper + one signal. Acid carries the "build" energy;
   cobalt is reserved for accents/links and never sits beside acid at full
   strength.
   ========================================================================= */

:root {
    /* ---- Color ---------------------------------------------------------- */
    --ink:    #0E0E10;   /* Hardcore Black  · primary  */
    --paper:  #F5F1EA;   /* Nova White      · primary  */
    --acid:   #D6FF3F;   /* Build Acid      · signal   */
    --cobalt: #3A6BFF;   /* Halifax Cobalt  · accent   */

    --ink-rgb: 14, 14, 16;
    --paper-rgb: 245, 241, 234;
    --acid-rgb: 214, 255, 63;

    /* Tints for layering on ink */
    --paper-12: rgba(245, 241, 234, 0.12);
    --paper-30: rgba(245, 241, 234, 0.30);
    --paper-55: rgba(245, 241, 234, 0.55);
    --paper-72: rgba(245, 241, 234, 0.72);

    /* ---- Type ----------------------------------------------------------- */
    --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --display: 'Bricolage Grotesque', var(--mono);
    --serif: 'Instrument Serif', Georgia, serif;

    /* ---- Rhythm --------------------------------------------------------- */
    --maxw: 1080px;
    --gutter: clamp(1.25rem, 5vw, 4rem);
    --section-y: clamp(5rem, 12vh, 9rem);

    /* Build-dot gradation (the mark is the typeface) */
    --dot-1: 1;
    --dot-2: 0.6;
    --dot-3: 0.3;
}

/* =========================================================================
   Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-weight: 400;
    font-size: clamp(0.95rem, 0.85rem + 0.35vw, 1.0625rem);
    line-height: 1.65;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overflow-wrap: break-word;
}

body.is-booting { overflow: hidden; }

a { color: var(--cobalt); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }

::selection { background: var(--acid); color: var(--ink); }

:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

img { max-width: 100%; display: block; }

/* Accessible, crawlable text that isn't visually rendered. */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================================
   Ambient bubble canvas (persistent, behind everything)
   ========================================================================= */
#bubble-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;   /* page stays usable; bubbles still live + auto-pop */
}

/* =========================================================================
   Terminal boot sequence
   ========================================================================= */
#boot {
    /* Progressive enhancement: only the JS-driven experience shows the boot
       overlay. Without JS the content is immediately readable. */
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--ink);
    place-items: center;
    padding: var(--gutter);
    transition: opacity 0.9s ease, visibility 0.9s ease;
}
html.js #boot { display: grid; }
#boot.boot--done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot__log {
    width: min(640px, 100%);
    font-family: var(--mono);
    font-size: clamp(0.8rem, 0.7rem + 0.6vw, 1rem);
    line-height: 1.9;
    color: var(--paper-72);
}
.boot__line { white-space: pre-wrap; }
.boot__line .ok   { color: var(--acid); }
.boot__line .dim  { color: var(--paper-30); }
.boot__line .lead { color: var(--paper); }
.boot__cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.05em;
    margin-left: 0.1em;
    background: var(--acid);
    vertical-align: text-bottom;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.boot__skip {
    position: fixed;
    bottom: var(--gutter);
    right: var(--gutter);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--paper-30);
    background: none;
    border: 1px solid var(--paper-12);
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.boot__skip:hover { color: var(--acid); border-color: var(--acid); }

/* =========================================================================
   The Mark — built in type, never another font than JetBrains Mono
   ========================================================================= */
.mark {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--paper);
    line-height: 1;
    white-space: nowrap;
}
.mark__dots {
    display: inline-flex;
    align-items: center;
    /* gap-word ≈ 0.45 × type size between dots and wordmark */
    margin-right: 0.45em;
}
.mark__dots .dot {
    width: 0.66em;             /* ⅔ of type size ≈ cap-height */
    height: 0.66em;
    border-radius: 50%;
    background: var(--acid);
    /* gap-dots ≈ 0.2 × type size between each dot */
    margin-right: 0.2em;
}
.mark__dots .dot:last-child { margin-right: 0; }
.mark__dots .dot:nth-child(1) { opacity: var(--dot-1); }
.mark__dots .dot:nth-child(2) { opacity: var(--dot-2); }
.mark__dots .dot:nth-child(3) { opacity: var(--dot-3); }

/* Alive: the dots cycle loading → almost-ready → settled */
.mark--alive .dot {
    animation: build-cycle 2.4s ease-in-out infinite;
}
.mark--alive .dot:nth-child(2) { animation-delay: 0.3s; }
.mark--alive .dot:nth-child(3) { animation-delay: 0.6s; }
@keyframes build-cycle {
    0%, 100% { opacity: 0.3; }
    40%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mark--alive .dot { animation: none; }
    .mark__dots .dot:nth-child(1) { opacity: var(--dot-1); }
    .mark__dots .dot:nth-child(2) { opacity: var(--dot-2); }
    .mark__dots .dot:nth-child(3) { opacity: var(--dot-3); }
    html { scroll-behavior: auto; }
}

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 2.5vw, 1.6rem) var(--gutter);
    background: linear-gradient(to bottom, rgba(14,14,16,0.85), rgba(14,14,16,0));
    backdrop-filter: blur(2px);
}
.site-header .mark { font-size: 1.05rem; }
.site-header__meta {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-30);
    text-align: right;
}
@media (max-width: 560px) { .site-header__meta { display: none; } }

/* =========================================================================
   Layout primitives
   ========================================================================= */
main { position: relative; z-index: 10; }

.section {
    position: relative;
    padding: var(--section-y) var(--gutter);
}
.wrap { max-width: var(--maxw); margin-inline: auto; }

.section--paper {
    background: var(--paper);
    color: var(--ink);
}
.section--paper a { color: var(--cobalt); }
.section--paper ::selection { background: var(--ink); color: var(--paper); }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--paper-30);
    margin: 0 0 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.section--paper .eyebrow { color: rgba(14,14,16,0.4); }
.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 1px;
    background: var(--acid);
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--gutter);
    padding-top: clamp(6rem, 14vh, 9rem);
}
.hero__inner { max-width: var(--maxw); margin-inline: auto; width: 100%; min-width: 0; }

.hero__mark { font-size: clamp(1.6rem, 1rem + 4vw, 3rem); margin-bottom: clamp(1.5rem, 5vh, 3rem); }

.hero__headline {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 0.95;
    font-size: clamp(2.8rem, 1.2rem + 9vw, 7.5rem);
    margin: 0;
    color: var(--paper);
}
.hero__headline .accent { color: var(--acid); }

.hero__sub {
    margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
    max-width: min(46ch, 100%);
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    color: var(--paper-72);
    line-height: 1.7;
}
.hero__okline {
    margin-top: 2rem;
    max-width: 100%;
    font-family: var(--mono);
    font-size: clamp(0.78rem, 0.7rem + 0.4vw, 0.95rem);
    color: var(--paper-55);
    overflow-wrap: anywhere;
}
.hero__okline .ok { color: var(--acid); font-weight: 700; }

.scroll-cue {
    margin-top: clamp(2.5rem, 8vh, 5rem);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--paper-30);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.scroll-cue::after {
    content: "";
    width: 1px; height: 2.2rem;
    background: linear-gradient(var(--acid), transparent);
    animation: cue 2s ease-in-out infinite;
    transform-origin: top;
}
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity:0.4;} 50%{transform:scaleY(1); opacity:1;} }

/* =========================================================================
   STATEMENT / manifesto
   ========================================================================= */
.statement { background: var(--paper); color: var(--ink); }
.statement__big {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.04;
    font-size: clamp(1.8rem, 1.1rem + 3.6vw, 3.6rem);
    margin: 0;
    max-width: 18ch;
}
.statement__big .acid-ink {
    /* acid as ink-on-paper highlight, used sparingly */
    background: var(--acid);
    box-shadow: 0.1em 0 0 var(--acid), -0.1em 0 0 var(--acid);
    color: var(--ink);
}
.statement__note {
    margin-top: 2.2rem;
    max-width: min(52ch, 100%);
    font-size: 1.05rem;
    color: rgba(14,14,16,0.7);
}

/* =========================================================================
   WHAT WE DO — two pillars
   ========================================================================= */
.pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-top: clamp(2rem, 5vh, 3.5rem);
}
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
    border: 1px solid var(--paper-12);
    border-radius: 12px;
    padding: clamp(1.6rem, 3vw, 2.6rem);
    background: rgba(245,241,234,0.02);
    transition: border-color 0.4s ease, transform 0.4s ease, background 0.4s ease;
}
.pillar:hover {
    border-color: var(--acid);
    transform: translateY(-4px);
    background: rgba(214,255,63,0.03);
}
.pillar__no {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--acid);
    margin-bottom: 1.4rem;
}
.pillar__title {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem);
    margin: 0 0 1rem;
    color: var(--paper);
}
.pillar__body { color: var(--paper-72); margin: 0 0 1.6rem; }
.pillar__list { list-style: none; margin: 0; padding: 0; }
.pillar__list li {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--paper-55);
    padding: 0.45rem 0;
    border-top: 1px solid var(--paper-12);
    display: flex;
    gap: 0.6rem;
}
.pillar__list li::before { content: "▸"; color: var(--acid); }

/* =========================================================================
   STORY / heritage
   ========================================================================= */
.story { background: var(--paper); color: var(--ink); }
.story__grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    margin-top: clamp(2rem, 5vh, 3rem);
}
@media (max-width: 760px) { .story__grid { grid-template-columns: 1fr; } }

.story__lead {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
    margin: 0;
}
.story__body p { color: rgba(14,14,16,0.78); margin: 0 0 1.3rem; }
.story__body p:last-child { margin-bottom: 0; }

.pullquote {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 1.6rem;
}
.pullquote .credit {
    display: block;
    font-family: var(--mono);
    font-style: normal;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(14,14,16,0.4);
    margin-top: 1rem;
}

.timeline {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    font-family: var(--mono);
    font-size: 0.82rem;
}
.timeline li {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(14,14,16,0.1);
    color: rgba(14,14,16,0.7);
}
.timeline li .yr { color: var(--ink); font-weight: 700; }
.timeline li.now .yr { color: var(--ink); }
.timeline li.now { color: var(--ink); }
.timeline li.now .yr::after {
    content: "";
    display: inline-block;
    width: 0.5em; height: 0.5em;
    margin-left: 0.4em;
    border-radius: 50%;
    background: var(--acid);
    box-shadow: 0 0 0 0 rgba(214,255,63,0.7);
    animation: pulse 2s infinite;
    vertical-align: middle;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(214,255,63,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(214,255,63,0); }
    100% { box-shadow: 0 0 0 0 rgba(214,255,63,0); }
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact { text-align: center; }
.contact__big {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 0.98;
    font-size: clamp(2.4rem, 1.2rem + 6vw, 5.5rem);
    margin: 0 auto 2rem;
    max-width: 16ch;
}
.contact__big a { color: var(--paper); }
.contact__big a:hover { color: var(--acid); text-decoration: none; }
.contact__links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}
.btn {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--paper-30);
    color: var(--paper);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.btn:hover { text-decoration: none; }
.btn--acid {
    background: var(--acid);
    border-color: var(--acid);
    color: var(--ink);
    font-weight: 700;
}
.btn--acid:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(214,255,63,0.25); }
.btn--ghost:hover { border-color: var(--acid); color: var(--acid); }
.contact__loc {
    margin-top: 3rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-30);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--paper-12);
    padding: 2.5rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--ink);
}
.site-footer .mark { font-size: 0.95rem; }
.site-footer__meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-30);
    text-align: right;
}

/* =========================================================================
   Scroll reveal
   ========================================================================= */
/* Reveals only hide when JS is present; no-JS users see everything.
   Note: the visible rule must match the hiding rule's specificity to win. */
html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue::after, .timeline li.now .yr::after { animation: none; }
}
