/* ============================================
   Triple Adventure Estate B.V. — Blueprint design
   ============================================ */

:root {
    --bg: #081420;
    --bg-raised: #0b1a2a;
    --ink: #dcebf7;
    --ink-dim: #8fb0c9;
    --line: #3d7ea6;
    --line-soft: rgba(96, 165, 210, 0.16);
    --line-faint: rgba(96, 165, 210, 0.07);
    --accent: #6ecbff;
    --accent-warm: #ffb454;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
    --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ---------- Blueprint grid backdrop ---------- */
.grid-layer {
    position: fixed;
    inset: -80px;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--line-faint) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-faint) 1px, transparent 1px),
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
    will-change: transform;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 100;
    padding: 10px 18px;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 0.8rem;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Scroll progress "meetlat" ---------- */
.progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    z-index: 60;
    background: rgba(96, 165, 210, 0.12);
}
.progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(110, 203, 255, 0.6);
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 3px; left: 0; right: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(8, 20, 32, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    color: var(--ink);
    text-decoration: none;
    text-transform: uppercase;
}
.logo b { color: var(--accent); font-weight: 600; }
.header-meta {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-dim);
    letter-spacing: 0.08em;
    display: none;
}
.header-contact {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--line);
    padding: 8px 18px;
    transition: background 0.2s, color 0.2s;
}
.header-contact:hover,
.header-contact:focus-visible { background: var(--accent); color: var(--bg); border-color: var(--accent); }

@media (min-width: 720px) {
    .header-meta { display: block; }
}

/* ---------- Shared section chrome ---------- */
main { position: relative; z-index: 1; }

.section {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 96px 24px;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.section-label::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--accent);
}
.section-label .num { color: var(--ink-dim); }

h1, h2 { font-weight: 600; letter-spacing: -0.02em; }

h2 {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    line-height: 1.12;
    margin-bottom: 24px;
    max-width: 18ch;
}

.lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--ink-dim);
    max-width: 56ch;
}
.lead strong { color: var(--ink); font-weight: 500; }

/* Ghost sheet numbers behind sections */
.ghost-num {
    position: absolute;
    top: 34px;
    right: 12px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(6rem, 16vw, 13rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(96, 165, 210, 0.10);
    pointer-events: none;
    user-select: none;
}

/* Corner ticks on sections (technical drawing registration marks) */
.ticked::before,
.ticked::after {
    content: "+";
    position: absolute;
    font-family: var(--mono);
    color: var(--line);
    font-size: 0.9rem;
    opacity: 0.6;
}
.ticked::before { top: 18px; left: 8px; }
.ticked::after { bottom: 18px; right: 8px; }

/* ---------- Reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--d, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }

/* Self-drawing SVG strokes: dasharray/offset set by JS */
.draw path,
.draw line,
.draw polyline,
.draw circle,
.draw rect {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}
.draw .warm { stroke: var(--accent-warm); }
.draw .dim { stroke: var(--line); }

/* Dashed route + ambient crane hook (excluded from the self-draw effect) */
.draw .route {
    stroke: var(--accent-warm);
    stroke-dasharray: 6 8;
    opacity: 0.65;
    animation: routeflow 26s linear infinite;
}
@keyframes routeflow { to { stroke-dashoffset: -680; } }
.hook-g { animation: hoist 8s ease-in-out infinite alternate; }
@keyframes hoist { from { transform: translateY(0); } to { transform: translateY(-24px); } }

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 140px;
    padding-bottom: 0;
}
.hero-coords {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--ink-dim);
    letter-spacing: 0.14em;
    margin-bottom: 22px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-coords .blink { color: var(--accent); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
    font-size: clamp(2.6rem, 8vw, 5.6rem);
    line-height: 1.02;
    text-transform: uppercase;
}
.hero h1 .outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
}
.hero-sub {
    margin-top: 26px;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: var(--ink-dim);
    max-width: 46ch;
}
.hero-cta-row {
    margin-top: 38px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}
.cta-button {
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    padding: 15px 30px;
    text-decoration: none;
    border: 1px solid var(--accent);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.cta-button:hover,
.cta-button:focus-visible {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 24px rgba(110, 203, 255, 0.25);
}
.cta-ghost {
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s;
}
.cta-ghost:hover, .cta-ghost:focus-visible { color: var(--accent); border-color: var(--accent); }

/* Hero skyline drawing */
.hero-skyline {
    width: 100%;
    max-width: var(--maxw);
    margin: 56px auto 0;
    display: block;
    overflow: visible;
}

/* ---------- Dimension line ornament ---------- */
.dimension {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--line);
    letter-spacing: 0.14em;
    user-select: none;
}
.dimension::before,
.dimension::after {
    content: "";
    flex: 1;
    height: 9px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
    opacity: 0.55;
}

/* ---------- Spec list (values) ---------- */
.spec-list {
    list-style: none;
    margin-top: 12px;
    border-top: 1px solid var(--line-soft);
}
.spec-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 26px 4px;
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.25s, padding-left 0.25s;
}
.spec-item:hover { background: rgba(110, 203, 255, 0.04); padding-left: 14px; }
.spec-num {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.1em;
}
.spec-title {
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    font-weight: 500;
    margin-bottom: 4px;
}
.spec-desc { color: var(--ink-dim); font-size: 0.98rem; max-width: 60ch; }

/* ---------- Wat we doen: three drawn cards ---------- */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 44px;
}
@media (min-width: 780px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
    border: 1px solid var(--line-soft);
    padding: 28px 24px 26px;
    position: relative;
    background: rgba(11, 26, 42, 0.5);
    transition: border-color 0.25s, transform 0.25s;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width 0.45s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-4px); }
.card:hover::before { width: 100%; }
.card-foot {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed var(--line-soft);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--line);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.card-foot span:first-child { white-space: nowrap; }
.card svg { width: 72px; height: 72px; margin-bottom: 18px; overflow: visible; }
.card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--ink-dim); font-size: 0.95rem; }
.card .card-tag {
    position: absolute;
    top: 12px; right: 14px;
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--line);
    letter-spacing: 0.12em;
}

/* ---------- Horizon ---------- */
.section-horizon { padding-bottom: 40px; }
.horizon-svg {
    width: 100%;
    display: block;
    margin-top: 40px;
    overflow: visible;
}
.horizon-text {
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    color: var(--ink);
    max-width: 44ch;
    font-weight: 400;
}
.horizon-text em {
    font-style: normal;
    color: var(--accent-warm);
}

/* ---------- Contact ---------- */
.section-contact { text-align: left; }
.contact-mail {
    display: inline-block;
    font-family: var(--sans);
    font-size: clamp(1.6rem, 5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 6px;
    transition: color 0.2s;
    word-break: break-all;
}
.contact-mail:hover, .contact-mail:focus-visible { color: var(--accent); }
.contact-sub { margin-top: 22px; color: var(--ink-dim); font-size: 1rem; max-width: 50ch; }
.stamp {
    display: inline-block;
    margin-top: 40px;
    padding: 10px 20px;
    border: 2px solid rgba(255, 180, 84, 0.5);
    color: rgba(255, 180, 84, 0.85);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transform: rotate(-4deg);
}

/* ---------- Footer: technical drawing title block ---------- */
.footer {
    position: relative;
    z-index: 1;
    max-width: var(--maxw);
    margin: 40px auto 48px;
    padding: 0 24px;
}
.titleblock {
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(96, 165, 210, 0.28);
}
@media (min-width: 780px) { .titleblock { grid-template-columns: repeat(6, 1fr); } }
.tb-cell {
    padding: 12px 16px;
    min-width: 0;
    background: var(--bg);
}
.tb-cell.tb-wide { grid-column: 1 / -1; }
.tb-label {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--line);
    margin-bottom: 3px;
}
.tb-value { color: var(--ink); overflow-wrap: anywhere; }
.tb-value a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.tb-value a:hover { color: var(--accent); border-color: var(--accent); }
.footer-copy {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--line);
    letter-spacing: 0.12em;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Vertical margin label ---------- */
.side-label {
    position: fixed;
    right: -74px;
    top: 50%;
    transform: rotate(90deg);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.34em;
    color: rgba(96, 165, 210, 0.4);
    z-index: 5;
    pointer-events: none;
    display: none;
}
@media (min-width: 1100px) { .side-label { display: block; } }

/* ---------- Pointer coordinate readout ---------- */
.coord-readout {
    position: fixed;
    right: 16px;
    bottom: 14px;
    z-index: 40;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    color: var(--line);
    pointer-events: none;
    display: none;
}
@media (min-width: 900px) and (hover: hover) {
    .coord-readout { display: block; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .draw path, .draw line, .draw polyline, .draw circle, .draw rect {
        stroke-dasharray: none !important;
        stroke-dashoffset: 0 !important;
        transition: none !important;
    }
    .hero-coords .blink { animation: none; }
    .hook-g, .draw .route { animation: none; }
    .grid-layer { transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
    .grid-layer, .progress, .coord-readout, .header-contact { display: none; }
    body { background: #fff; color: #000; }
}
