/* Stereogram Studio — site styles (Emergence v1). Load after tokens.css.
   The OPTICAL GEOMETRY block below is a verbatim carry-over from the reviewed snapshot; do not restyle it. */
@charset "UTF-8";
:root{font-family:var(--font-text);color:var(--fg);background:var(--bg);scroll-behavior:smooth;scroll-padding-top:28px;-webkit-text-size-adjust:100%}
*{box-sizing:border-box}body{margin:0;font-size:17px;line-height:1.6;font-weight:300}
button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}
button{color:inherit;cursor:pointer;background:none;border:0;padding:0}a{color:inherit;text-underline-offset:5px}
button:disabled{cursor:default;opacity:.5}img,video{display:block;max-width:100%}h1,h2,h3,p,figure{margin:0}
/* Focus ring: ink on the light page, mint on the dark surfaces (mint on cream is only 1.3:1). */
:root{--focus-ring:var(--ink)}.viewer,.how-section,.site-footer,#focus-dialog{--focus-ring:var(--signal)}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:4px}
.wrap{width:min(100% - 48px,1240px);margin-inline:auto}
.wrap-wide{width:min(100% - 48px,1456px);margin-inline:auto}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
.skip-link{position:fixed;left:20px;top:16px;transform:translateY(-150%);z-index:10;background:var(--ink);color:var(--canvas);padding:14px 20px;border-radius:var(--radius-control);font-weight:500}
.skip-link:focus{transform:none}
.label{font-size:12px;letter-spacing:.16em;text-transform:uppercase;font-weight:500;color:var(--muted)}
.display{font-family:var(--font-display);font-weight:500;letter-spacing:-.01em;line-height:.98}
h2.display{font-size:clamp(30px,4vw,48px);line-height:1.02}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 22px;border-radius:var(--radius-control);font-weight:500;font-size:15px;text-decoration:none;background:var(--ink);color:var(--canvas);transition:transform .18s var(--ease),background .18s}
.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--accent);color:var(--on-accent)}
.btn.ghost{background:transparent;color:var(--fg);border:1.5px solid var(--rule-strong)}
.btn svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* Header */
.site-header{min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:32px;border-bottom:1px solid var(--rule)}
.brand{display:inline-flex;align-items:center;min-height:44px;text-decoration:none}
.brand-wordmark{display:block;width:250px;height:auto;max-width:100%}
.site-header nav{display:flex;gap:28px;font-size:15px;font-weight:500}
.site-header nav a{text-decoration:none;padding:12px 2px;min-width:44px;text-align:center}.site-header nav a:hover{text-decoration:underline}

/* Hero */
.hero{display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:48px;padding:72px 0 64px}
.hero .eyebrow{display:flex;align-items:center;gap:10px}
.hero .eyebrow img{width:22px;height:22px}
.hero h1{font-size:clamp(44px,7vw,104px);margin-top:22px;max-width:11ch}
.hero h1 em{font-style:normal;color:var(--slate);font-weight:300}
.hero .lede{font-size:clamp(18px,2vw,22px);max-width:34ch;margin-top:22px;color:var(--slate)}
.hero .actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}
.hero-mark{justify-self:center;width:min(100%,340px);aspect-ratio:1;display:grid;place-items:center;border-radius:28px;background:var(--void);position:relative;overflow:hidden}
.hero-mark .shift{width:66%;height:auto}
.hero-mark:disabled{opacity:1;cursor:default}
/* The mark loops every 6s: the inner dots emerge (shift and turn mint), rest, then settle back. The mark is also its pause
   button (looping motion beside text needs one); the small icon shows on hover, keyboard focus, and while paused.
   With reduced motion the global rule stops the animation and the mark rests in its emerged state. */
.shift .inner{transform:translateX(8px);animation:mark-shift 6s var(--ease) infinite}
.shift .inner circle{animation:mark-tint 6s infinite}
.hero-mark[aria-pressed="true"] .inner,.hero-mark[aria-pressed="true"] .inner circle{animation-play-state:paused}
@keyframes mark-shift{0%,7%{transform:translateX(0)}20%,85%{transform:translateX(8px)}97%,100%{transform:translateX(0)}}
@keyframes mark-tint{0%,7%{fill:var(--canvas)}20%,85%{fill:var(--signal)}97%,100%{fill:var(--canvas)}}
.hero-mark-state{position:absolute;right:16px;bottom:16px;width:16px;height:16px;fill:none;stroke:var(--haze);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .2s}
.hero-mark-state .play{display:none;fill:var(--haze)}
.hero-mark[aria-pressed="true"] .hero-mark-state .pause{display:none}
.hero-mark[aria-pressed="true"] .hero-mark-state .play{display:inline}
.hero-mark:hover .hero-mark-state,.hero-mark:focus-visible .hero-mark-state,.hero-mark[aria-pressed="true"] .hero-mark-state{opacity:1}

/* Progress chip */
.progress{display:inline-flex;align-items:center;gap:10px;font-size:13px;font-weight:500;color:var(--slate);padding:8px 12px 8px 10px;border:1px solid var(--rule);border-radius:999px;background:color-mix(in srgb,var(--mist) 60%,transparent)}
.progress .bar{width:64px;height:6px;border-radius:3px;background:var(--mist);overflow:hidden}
.progress .bar i{display:block;height:100%;width:0;background:var(--signal);transition:width .5s var(--ease)}
.progress.is-complete{border-color:var(--signal);color:var(--ink)}

/* Gallery */
.gallery{padding-bottom:88px}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;flex-wrap:wrap;padding:56px 0 24px}
.section-heading .label{margin-bottom:8px}
.viewer{border-radius:var(--radius-card);overflow:hidden;background:var(--void);color:var(--canvas)}
.viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid var(--night-line)}
.study-heading{display:flex;gap:14px;align-items:baseline}
.study-heading h3,.study-heading h2{font-family:var(--font-display);font-size:22px;font-weight:500;letter-spacing:-.01em;line-height:1.2}
.study-number{font-size:13px;font-weight:500;color:var(--haze);font-variant-numeric:tabular-nums}
.viewer-title{display:flex;align-items:center;gap:20px;min-width:0}
.step-nav{display:flex;align-items:center;gap:12px}
.step-nav button{font-size:22px;min-width:44px;min-height:44px;border:1px solid #4A5270;border-radius:var(--radius-control)}
.step-nav button:hover{background:var(--night-hover)}
.step-nav>span{font-size:13px;color:var(--haze);font-variant-numeric:tabular-nums;font-weight:500}
.viewer-actions{display:flex;align-items:center;gap:16px}
.mode-switch{display:inline-flex;align-items:center;border:1px solid #4A5270;border-radius:var(--radius-control);padding:2px;gap:2px}
.mode-switch button{font-size:14px;font-weight:500;line-height:1.2;padding:0 16px;border-radius:7px;min-height:44px}
.mode-switch button[aria-pressed="true"]{background:var(--signal);color:var(--void)}
.mode-switch button[aria-pressed="false"]:hover{background:var(--night-hover)}
.icon-button{display:inline-flex;gap:8px;align-items:center;font-size:14px;font-weight:500;min-height:44px;padding:0 6px;border-radius:8px;text-decoration:none}
.icon-button svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.icon-button:hover{color:var(--signal)}
.image-surround{padding:14px 28px 26px;background:var(--deep)}
.viewer-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 22px;padding:16px 24px;font-size:14px}
.guide-toggle{display:inline-flex;align-items:center;gap:9px;min-height:44px;white-space:nowrap;cursor:pointer;font-weight:500}
.guide-toggle input{accent-color:var(--signal);width:17px;height:17px;margin:0}
.guide-toggle:has(input:disabled){opacity:.5;cursor:default}
.size-control{display:flex;align-items:center;gap:12px;min-height:44px;white-space:nowrap;font-weight:500}
.size-control input{width:120px;accent-color:var(--signal);height:44px;margin:0;cursor:pointer}
.size-control output{font-size:13px;width:38px;text-align:right;font-variant-numeric:tabular-nums;color:var(--haze)}
.seen-button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:999px;border:1.5px solid #4A5270;font-size:14px;font-weight:500;transition:background .2s,border-color .2s,color .2s}
.seen-button svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.seen-button:hover{border-color:var(--signal)}
.seen-button[aria-pressed="true"]{background:var(--signal);border-color:var(--signal);color:var(--void)}
.next-nudge{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;background:var(--signal);color:var(--void);font-size:14px;font-weight:500;transition:transform .18s var(--ease)}
.next-nudge:hover{transform:translateX(2px)}
.viewer-caption{padding:0 0 10px;font-size:14px;line-height:1.6;text-align:center;color:var(--haze)}
/* Every caption variant shares one grid cell and only the current one is visible, so a caption keeps one height
   and the image below the viewer tip never shifts when Pattern, Reveal or Guide dots change. Text sits at the
   bottom of the cell, so a shorter tip stays next to the guide dots and any spare height goes above it. */
[data-caption]{display:grid}
[data-caption]>span{grid-area:1/1;align-self:end}
[data-caption]>.is-inactive{visibility:hidden}
.image-error{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 24px 22px;padding:14px 18px;border-radius:var(--radius-control);background:var(--night-hover);color:var(--canvas);font-size:14px;line-height:1.5}
.image-error a{color:var(--signal)}.image-error button{color:var(--signal);font-weight:500;text-decoration:underline;text-underline-offset:4px}
.celebrate{position:relative}
.celebrate::after{content:"";position:absolute;inset:0;border-radius:2px;box-shadow:0 0 0 0 var(--signal);opacity:0;pointer-events:none}
.celebrate.is-celebrating::after{animation:ring 1.1s var(--ease) both}
.image-stage.is-loading .artwork{opacity:.45;transition:opacity .2s}
.image-stage.is-loading::before{content:"Loading…";position:absolute;left:50%;top:50%;z-index:1;transform:translate(-50%,-50%);padding:8px 14px;border-radius:999px;background:rgba(11,13,26,.85);color:var(--canvas);font-size:13px;font-weight:500}
@keyframes ring{0%{box-shadow:0 0 0 0 var(--signal);opacity:.9}100%{box-shadow:0 0 0 18px var(--signal);opacity:0}}

.study-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:28px}
.study-card{position:relative;text-align:left;border:1.5px solid var(--rule);padding:10px;display:block;width:100%;border-radius:var(--radius-card);background:#fff;transition:border-color .18s,transform .18s var(--ease)}
.study-card:hover{border-color:var(--rule-strong);transform:translateY(-2px)}
.study-card.is-selected{border-color:var(--ink)}
.study-thumb{display:block;border-radius:8px;overflow:hidden;background:var(--deep)}
.study-thumb img{width:100%;height:auto;aspect-ratio:5/3;object-fit:cover}
.study-card-info{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 6px 6px}
.study-card-info small{display:block;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--slate);margin-bottom:6px;font-weight:500}
.study-card-info strong{display:block;font-family:var(--font-display);font-size:19px;font-weight:500;letter-spacing:-.01em}
.seen-badge{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;border:1.5px solid var(--rule);color:var(--slate);flex:none}
.seen-badge svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.study-card.is-seen .seen-badge{background:var(--signal);border-color:var(--signal);color:var(--void)}
.gallery-note{font-size:14px;color:var(--slate);margin-top:22px}
.no-script{padding:20px;font-size:14px;line-height:1.7;border:1px solid var(--rule);margin-top:24px;border-radius:var(--radius-control)}

/* How to see */
.how-section{background:var(--void);color:var(--canvas);padding:88px 0}
.how-section .label{color:var(--haze)}
.how-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:72px}
.how-intro h2{margin-top:14px}
.how-intro p{color:var(--haze);margin-top:20px;max-width:40ch}
.comfort-note{padding-left:16px;border-left:2px solid var(--signal);font-size:15px}
.viewing-steps{list-style:none;padding:0;margin:0;counter-reset:step}
.viewing-steps li{display:grid;grid-template-columns:52px 1fr;gap:20px;padding:26px 0;border-bottom:1px solid var(--night-line)}
.viewing-steps li:first-child{padding-top:4px}.viewing-steps li:last-child{border:0}
.step-number{font-family:var(--font-display);font-size:14px;color:var(--signal);padding-top:6px}
.viewing-steps h3{font-family:var(--font-display);font-size:20px;font-weight:500;line-height:1.3}
.viewing-steps p{font-size:16px;color:var(--haze);margin-top:8px;max-width:48ch}

/* About */
.about-section{display:grid;grid-template-columns:1fr 1.1fr;gap:72px;padding:88px 0;border-top:1px solid var(--rule)}
.about-intro h2{margin-top:14px}
.about-intro p{color:var(--slate);margin-top:20px;max-width:40ch}
.questions details{border-bottom:1px solid var(--rule)}
.questions summary{font-size:17px;font-weight:500;list-style:none;padding:22px 2px;cursor:pointer;display:flex;gap:20px;justify-content:space-between;align-items:center;line-height:1.4}
.questions summary::-webkit-details-marker{display:none}
.questions summary>span{position:relative;flex:none;width:28px;height:28px;border-radius:50%;background:var(--ink);font-size:0;transition:transform .2s var(--ease)}
.questions summary>span::before,.questions summary>span::after{content:"";position:absolute;left:50%;top:50%;width:12px;height:2px;border-radius:1px;background:var(--signal);transform:translate(-50%,-50%)}
.questions summary>span::after{transform:translate(-50%,-50%) rotate(90deg)}
.questions details[open] summary>span{transform:rotate(45deg)}
.questions details p{font-size:16px;line-height:1.7;color:var(--slate);padding:0 36px 24px 2px}
.privacy-note{font-size:14px;color:var(--slate);margin-top:24px;padding:16px 18px;border-radius:var(--radius-control);background:var(--mist)}

/* Footer */
.site-footer{background:var(--void);color:var(--canvas);padding:56px 0 40px}
.site-footer .wrap{display:grid;grid-template-columns:1fr auto;gap:24px 48px;align-items:end}
.site-footer a[data-brand-link]{display:inline-flex;align-items:center;min-height:44px}
.site-footer img{width:220px;height:auto}
.site-footer .tag{font-family:var(--font-display);font-size:22px;margin-top:22px}
.site-footer small{display:block;font-size:13px;color:var(--haze);margin-top:10px}
.site-footer nav{display:flex;gap:22px;font-size:14px;font-weight:500}
.site-footer nav a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;text-decoration:none;color:var(--haze)}.site-footer nav a:hover{color:var(--canvas)}

/* ===== OPTICAL GEOMETRY (verbatim from the reviewed snapshot; see CLAUDE.md) ===== */
/* 2026-10-12: the cap was a fixed 1056px. The picture (with its dots) now fits the screen height, up to 1400px wide:
   about the largest size where the 9.79% repeat stays comfortable for parallel viewing (~137px, ~3.5cm on a monitor). */
.image-stage{width:var(--view-size);max-width:min(1400px,calc((100vh - 61px)*5/3));margin-inline:auto}
@supports (height:100svh){.image-stage{max-width:min(1400px,calc((100svh - 61px)*5/3))}}
.guide-track{height:29px;position:relative}
.guide-track i{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--canvas);top:10px;transform:translateX(-50%)}
.guide-track i:first-child{left:45.1041667%}.guide-track i:last-child{left:54.8958333%}
.guide-track.is-hidden{visibility:hidden}
.artwork{width:100%;height:auto;aspect-ratio:5/3;object-fit:contain;background:#0B0D1A;border-radius:0}
.focus-canvas .image-stage{width:var(--view-size);max-width:none}
.focus-fit{width:100%;max-width:1400px}
/* ===== end geometry ===== */

/* Focus view (lightbox) */
body.focus-open{overflow:hidden}
#focus-dialog{width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:var(--void);color:var(--canvas);overflow:auto}
#focus-dialog[open]{display:block}#focus-dialog::backdrop{background:var(--void)}
.focus-shell{display:flex;flex-direction:column;height:100%;background:var(--void)}
.focus-shell:fullscreen{overflow:auto}
.focus-shell::backdrop{background:var(--void)}
.focus-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:8px 20px;flex:none}
.focus-header h2{font-size:22px}
.focus-tip{display:none;flex:1;min-width:0;text-align:center;font-size:14px;line-height:1.5;color:var(--haze)}
.focus-rotate-hint{display:none;flex:none;text-align:center;font-size:13px;color:var(--haze);padding:0 16px 8px}
.exit-focus{display:flex;gap:10px;align-items:center;font-size:14px;font-weight:500;min-height:44px;padding:0 8px;border-radius:8px}
.exit-focus span{font-size:26px;font-weight:300}
.focus-canvas{flex:1;display:flex;align-items:center;justify-content:center;padding:0 28px;min-height:0;min-width:0;overflow:hidden}
.focus-bottom{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px 26px;padding:6px 20px 12px;flex:none;font-size:14px}
.focus-caption{text-align:center;font-size:14px;line-height:1.6;color:var(--haze);padding:10px 24px 18px;flex:none}
#focus-dialog .image-error{margin:0 24px 18px}
/* Short viewports (landscape phones): the stage takes the viewport; the dialog scrolls to the controls. */
@media(max-height:520px){.focus-header{padding:6px 18px;min-height:48px}.focus-header h2{font-size:18px}.exit-focus{min-height:44px}.focus-canvas{flex:none;height:calc(100vh - 56px);height:calc(100dvh - 56px);padding-block:4px}.focus-bottom{padding-top:12px}.focus-caption{padding-block:8px 14px}}

/* Wide screens: the tip moves into the top bar so the picture gets the height. Touch screens held upright get a hint. */
@media(min-width:1100px) and (min-height:521px){.focus-tip{display:grid}.focus-caption{display:none}}
@media(orientation:portrait) and (pointer:coarse){.focus-rotate-hint{display:block}}

/* Responsive */
@media(min-width:1500px){.image-surround{padding-block:18px 30px}}
@media(max-width:1000px){.hero{grid-template-columns:1fr;gap:36px}.hero-mark{justify-self:start;width:min(100%,280px)}.how-layout,.about-section{gap:44px}.viewer-actions{gap:12px}.image-surround{padding-inline:20px}.study-grid{gap:12px}}
@media(max-width:720px){:root{scroll-padding-top:18px}.wrap{width:calc(100% - 36px)}body{font-size:16px}.site-header{min-height:80px;gap:16px;flex-wrap:wrap;padding:16px 0}.brand-wordmark{width:214px}.site-header nav{gap:20px;font-size:14px}.hero{padding:44px 0 40px}.hero h1{font-size:clamp(40px,12vw,64px)}.section-heading{padding:36px 0 18px}.viewer-toolbar{padding:14px 16px;flex-wrap:wrap;gap:12px}.viewer-actions{width:100%;justify-content:space-between}.wrap-wide{width:100%}.viewer{border-radius:0}.image-surround{padding:8px 6px 14px}.viewer-title{width:100%;justify-content:space-between}.hero-mark{width:120px;border-radius:18px}.hero-mark-state{right:9px;bottom:9px;width:12px;height:12px}.guide-track{height:25px}.guide-track i{width:4px;height:4px;top:8px}.viewer-controls{padding:12px 16px;gap:10px 14px}.size-control{gap:8px}.size-control input{width:96px}.viewer-caption{padding:0 10px 8px;text-align:left}.image-error{margin:0 16px 16px}.study-grid{grid-template-columns:1fr;gap:10px;margin-top:20px}.study-card{display:flex;align-items:center;gap:14px;padding:8px}.study-thumb{width:36%;max-width:180px;flex:none}.study-card-info{padding:2px 6px 2px 0;flex:1}.how-section,.about-section{padding:56px 0}.how-layout,.about-section{grid-template-columns:1fr;gap:32px}.site-footer .wrap{grid-template-columns:1fr}.focus-header{padding:8px 16px}.focus-header h2{font-size:19px}.focus-canvas{padding:0 10px}.focus-bottom{padding:12px 16px 0;justify-content:space-between;gap:10px 14px}.focus-bottom .size-control input{width:92px}.focus-caption{text-align:left;padding:10px 16px 16px}}
@media(max-width:400px){.site-header nav{width:100%;justify-content:space-between}.size-control input{width:76px}.focus-bottom .mode-switch button{padding-inline:11px}}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
