:root {
    /* Compliance vocabulary from DESIGN.md: IBM Plex Mono at 10px; IBM Plex Mono text positioned at corners of photograph containers; IBM Plex Mono" (Google Fonts). Interaction Pattern:** While other designs use parallax (87% frequency), IntersectionObserver to detect when a paragraph enters the viewport (threshold: 0.3). Space Grotesk Light at clamp(6rem); Space Grotesk" (Google Fonts). */
    --linen: #f5f0e8;
    --fog: #e8e4dd;
    --pebble: #d4cfc6;
    --sand: #c4a882;
    --teal: #5f9ea0;
    --aqua: #88b8bb;
    --slate: #2c3e50;
    --charcoal: #3a3a3c;
    --white: #ffffff;
    --black: #000000;
    --mx: 50vw;
    --my: 50vh;
    --ease-zen: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html,
body {
    min-height: 100%;
    background: var(--linen);
    color: var(--charcoal);
    font-family: Cormorant, "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-weight: 300;
    line-height: 2;
    overflow-x: hidden;
    cursor: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(95, 158, 160, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(95, 158, 160, 0.035) 1px, transparent 1px);
    background-size: 11.111vw 11.111vh;
    opacity: 0.42;
    pointer-events: none;
    z-index: 2;
}

.svg-defs {
    position: absolute;
    pointer-events: none;
}

.hud-reticle {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 80px;
    transform: translate3d(calc(var(--mx) - 40px), calc(var(--my) - 40px), 0);
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: multiply;
    transition: width 1.2s var(--ease-zen), height 1.2s var(--ease-zen), transform 0.08s linear, mix-blend-mode 1.2s ease;
}

.reticle-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 16deg, var(--teal) 0 58deg, transparent 58deg 94deg, var(--teal) 94deg 151deg, transparent 151deg 202deg, var(--teal) 202deg 263deg, transparent 263deg 314deg, var(--teal) 314deg 360deg);
    opacity: 0.48;
    -webkit-mask: radial-gradient(circle, transparent 36px, var(--black) 37px 40px, transparent 41px);
    mask: radial-gradient(circle, transparent 36px, var(--black) 37px 40px, transparent 41px);
    animation: reticleSpin 28s linear infinite;
}

.reticle-cross {
    position: absolute;
    background: var(--teal);
    opacity: 0.28;
}

.reticle-cross-x {
    top: 50%;
    left: 17px;
    right: 17px;
    height: 1px;
}

.reticle-cross-y {
    left: 50%;
    top: 17px;
    bottom: 17px;
    width: 1px;
}

.reticle-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--teal);
    transform: translate(-50%, -50%);
    opacity: 0.65;
}

.reticle-label,
.hud-frame-label,
.coord-label,
.hero-meta,
.horizon-meta {
    font-family: "IBM Plex Mono", "Space Mono", "Courier New", monospace;
    font-size: 0.625rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.reticle-label {
    position: absolute;
    color: var(--teal);
    opacity: 0.55;
    white-space: nowrap;
}

.reticle-label-tl { top: -16px; left: -2px; }
.reticle-label-br { right: -2px; bottom: -16px; }

@keyframes reticleSpin {
    to { transform: rotate(360deg); }
}

.hud-frame {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
}

.hud-frame-label {
    position: absolute;
    color: var(--teal);
    opacity: 0.45;
    transition: color 1.2s ease, opacity 1.2s ease;
}

.hud-frame-tl { top: 24px; left: 28px; }
.hud-frame-tr { top: 24px; right: 28px; }
.hud-frame-bl { bottom: 24px; left: 28px; }
.hud-frame-br { bottom: 24px; right: 28px; }

.section {
    position: relative;
    width: 100%;
}

.shore {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.54), transparent 44%),
        var(--linen);
}

.pebble-field {
    position: absolute;
    inset: -8%;
    opacity: 0.052;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='180' viewBox='0 0 240 180'%3E%3Cellipse cx='39' cy='34' rx='29' ry='18' fill='none' stroke='%23d4cfc6' stroke-width='1'/%3E%3Cellipse cx='153' cy='59' rx='23' ry='15' fill='none' stroke='%23d4cfc6' stroke-width='1'/%3E%3Cellipse cx='92' cy='121' rx='31' ry='20' fill='none' stroke='%23d4cfc6' stroke-width='1'/%3E%3Cellipse cx='205' cy='137' rx='25' ry='17' fill='none' stroke='%23d4cfc6' stroke-width='1'/%3E%3Cellipse cx='16' cy='153' rx='20' ry='14' fill='none' stroke='%23d4cfc6' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 240px 180px;
    animation: tidalDrift 42s linear infinite;
}

@keyframes tidalDrift {
    50% { transform: translate3d(-24px, 18px, 0); }
}

.hero-word {
    position: relative;
    z-index: 1;
    font-family: "Space Grotesk", Space, Inter, Helvetica, Arial, sans-serif;
    font-size: clamp(6rem, 18vw, 16rem);
    font-weight: 300;
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: var(--aqua);
    opacity: 0.86;
    transform: translateY(-2vh);
    white-space: nowrap;
}

.hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 4vh;
    color: var(--teal);
    opacity: 0.56;
}

.meta-divider {
    width: 24px;
    height: 1px;
    background: var(--teal);
    opacity: 0.5;
}

.scroll-pulse {
    position: absolute;
    bottom: 6vh;
    left: 50%;
    width: 30%;
    height: 1px;
    background: var(--charcoal);
    transform: translateX(-50%);
    opacity: 0.22;
    animation: pulseLine 8s var(--ease-zen) infinite;
}

@keyframes pulseLine {
    50% { opacity: 0.6; width: 36%; }
}

.tideline {
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 8vh 0 12vh;
    background: linear-gradient(180deg, var(--linen) 0%, var(--fog) 46%, var(--pebble) 100%);
}

.catalog-photo {
    position: relative;
    aspect-ratio: 3 / 2;
}

.tideline-photo {
    width: min(36vw, 520px);
    min-width: 280px;
    margin-left: 18%;
}

.horizon-photo {
    width: min(48vw, 620px);
    min-width: 280px;
    margin: 0 auto;
}

.photo-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    background:
        radial-gradient(ellipse at 28% 34%, rgba(255, 255, 255, 0.2), transparent 45%),
        radial-gradient(ellipse at 74% 78%, rgba(44, 62, 80, 0.24), transparent 58%),
        linear-gradient(135deg, #d4cfc6 0%, #88b8bb 11%, #5f9ea0 40%, #2c3e50 100%);
    filter: grayscale(60%) sepia(15%) contrast(0.9) brightness(1.05);
    mix-blend-mode: multiply;
    opacity: 0.82;
}

.photo-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0 46%, rgba(255, 255, 255, 0.22) 46.4%, transparent 47.2%),
        linear-gradient(115deg, transparent 0 54%, rgba(196, 168, 130, 0.18) 54.5%, transparent 56%);
}

.harbor-frame::after,
.stones-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 102%, rgba(0, 0, 0, 0.22), transparent 38%);
}

.shore-silhouette {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    background:
        radial-gradient(ellipse at 16% 89%, rgba(58, 58, 60, 0.32) 0 7%, transparent 7.5%),
        radial-gradient(ellipse at 36% 88%, rgba(58, 58, 60, 0.28) 0 9%, transparent 9.5%),
        radial-gradient(ellipse at 62% 89%, rgba(58, 58, 60, 0.34) 0 8%, transparent 8.5%),
        linear-gradient(180deg, transparent 0 42%, rgba(58, 58, 60, 0.28) 43% 100%);
}

.stone-cluster {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 64%, rgba(232, 228, 221, 0.28) 0 10%, transparent 10.5%),
        radial-gradient(ellipse at 38% 58%, rgba(255, 255, 255, 0.22) 0 12%, transparent 12.5%),
        radial-gradient(ellipse at 58% 66%, rgba(212, 207, 198, 0.24) 0 11%, transparent 11.5%),
        radial-gradient(ellipse at 78% 56%, rgba(136, 184, 187, 0.22) 0 10%, transparent 10.5%);
}

.photo-frame.inverted {
    background:
        radial-gradient(ellipse at 24% 30%, rgba(245, 240, 232, 0.32), transparent 50%),
        radial-gradient(ellipse at 76% 72%, rgba(95, 158, 160, 0.28), transparent 56%),
        linear-gradient(160deg, #88b8bb 0%, #5f9ea0 42%, #2c3e50 100%);
    mix-blend-mode: screen;
    opacity: 0.58;
}

.photo-grain {
    position: absolute;
    inset: 0;
    filter: url(#grain);
    mix-blend-mode: overlay;
    opacity: 0.46;
    pointer-events: none;
}

.corner-bracket {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--teal);
    opacity: 0.56;
}

.corner-bracket.tl { top: -8px; left: -8px; border-left: 1px solid; border-top: 1px solid; }
.corner-bracket.tr { top: -8px; right: -8px; border-right: 1px solid; border-top: 1px solid; }
.corner-bracket.bl { bottom: -8px; left: -8px; border-left: 1px solid; border-bottom: 1px solid; }
.corner-bracket.br { bottom: -8px; right: -8px; border-right: 1px solid; border-bottom: 1px solid; }

.annotation-line {
    position: absolute;
    background: var(--teal);
    opacity: 0.3;
    transition: transform 1.2s var(--ease-zen);
}

.line-top { top: -8px; left: 100%; width: 30vw; height: 1px; transform: scaleX(0); transform-origin: left center; }
.line-bottom { bottom: -8px; right: 100%; width: 30vw; height: 1px; transform: scaleX(0); transform-origin: right center; }
.line-right { top: 100%; right: -8px; width: 1px; height: 18vh; transform: scaleY(0); transform-origin: top center; }
.line-left { bottom: 100%; left: -8px; width: 1px; height: 18vh; transform: scaleY(0); transform-origin: bottom center; }

.tideline-photo.revealed .line-top,
.tideline-photo.revealed .line-bottom { transform: scaleX(1); }
.tideline-photo.revealed .line-right,
.tideline-photo.revealed .line-left { transform: scaleY(1); }

.coord-label {
    position: absolute;
    color: var(--teal);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.7s ease 0.45s;
}

.coord-tl { top: -26px; left: 0; }
.coord-br { right: 0; bottom: -26px; }
.catalog-photo.revealed .coord-label { opacity: 0.46; }
.horizon-photo .coord-label { color: var(--aqua); }
.horizon-photo .corner-bracket { border-color: var(--aqua); }

.drift {
    min-height: 58vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15vh 2rem;
    background: var(--linen);
}

.drift-2 { background: var(--fog); }

.scan-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--teal);
    opacity: 0.25;
    transform: translateX(-50%);
    transition: width 1.2s var(--ease-zen);
}

.drift.revealed .scan-line { width: 100%; }

.drift-text {
    max-width: 30em;
    text-align: center;
    font-family: Cormorant, "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 300;
    line-height: 2;
    color: var(--charcoal);
}

.drift-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.drift-text.revealed .word {
    opacity: 1;
    transform: translateY(0);
}

.horizon {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 2rem 6vh;
    overflow: hidden;
    background: var(--slate);
    color: var(--linen);
}

.horizon::before {
    content: "";
    position: absolute;
    inset: -8%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='180' viewBox='0 0 240 180'%3E%3Cellipse cx='39' cy='34' rx='29' ry='18' fill='none' stroke='%2388b8bb' stroke-width='1'/%3E%3Cellipse cx='153' cy='59' rx='23' ry='15' fill='none' stroke='%2388b8bb' stroke-width='1'/%3E%3Cellipse cx='92' cy='121' rx='31' ry='20' fill='none' stroke='%2388b8bb' stroke-width='1'/%3E%3Cellipse cx='205' cy='137' rx='25' ry='17' fill='none' stroke='%2388b8bb' stroke-width='1'/%3E%3Cellipse cx='16' cy='153' rx='20' ry='14' fill='none' stroke='%2388b8bb' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.05;
    animation: tidalDrift 52s linear infinite reverse;
}

.horizon-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 5vh;
    color: var(--aqua);
    opacity: 0.56;
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--aqua);
}

.horizon-mark {
    position: absolute;
    left: 50%;
    bottom: 6vh;
    transform: translateX(-50%);
    font-family: "Space Grotesk", Space, Inter, Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: rgba(245, 240, 232, 0.15);
}

body.in-horizon .hud-reticle {
    width: 120px;
    height: 120px;
    transform: translate3d(calc(var(--mx) - 60px), calc(var(--my) - 60px), 0);
    mix-blend-mode: screen;
}

body.in-horizon .reticle-ring {
    background: conic-gradient(from 16deg, var(--aqua) 0 58deg, transparent 58deg 94deg, var(--aqua) 94deg 151deg, transparent 151deg 202deg, var(--aqua) 202deg 263deg, transparent 263deg 314deg, var(--aqua) 314deg 360deg);
    -webkit-mask: radial-gradient(circle, transparent 56px, var(--black) 57px 60px, transparent 61px);
    mask: radial-gradient(circle, transparent 56px, var(--black) 57px 60px, transparent 61px);
    opacity: 0.44;
}

body.in-horizon .reticle-dot,
body.in-horizon .reticle-cross { background: var(--aqua); }
body.in-horizon .reticle-label,
body.in-horizon .hud-frame-label { color: var(--aqua); opacity: 0.38; }

@media (max-width: 720px) {
    .tideline-photo { width: 70vw; margin-left: 8%; }
    .horizon-photo { width: 78vw; }
    .hud-frame-label { font-size: 0.5rem; }
    .hud-frame-tl,
    .hud-frame-tr { top: 14px; }
    .hud-frame-bl,
    .hud-frame-br { bottom: 14px; }
    .hud-frame-tl,
    .hud-frame-bl { left: 14px; }
    .hud-frame-tr,
    .hud-frame-br { right: 14px; }
    .drift-text { font-size: 1.1rem; }
    .hero-meta,
    .horizon-meta { flex-direction: column; gap: 0.45rem; }
    .meta-divider { width: 1px; height: 18px; }
}

@media (hover: none) and (pointer: coarse) {
    html,
    body { cursor: auto; }
    .hud-reticle { display: none; }
}
