/* The Portal v3 — shared materials for the scene page. Collage (real salon photos and objects), paper,
   tape, ink and pencil; every scene sits on its own surface. */
@font-face { font-family: 'Kerub'; src: url('_hf/styleframes/fonts/Kerub-Beta02Regular.woff2') format('woff2'); }
@font-face { font-family: 'Calibre'; src: url('_hf/styleframes/fonts/calibre-regular.woff2') format('woff2'); }
@font-face { font-family: 'Hand'; src: url('_hf/styleframes/fonts/caveat.woff2') format('woff2'); font-weight: 400 700; }
:root { --ink: #2F2F2F; --paper: #EBEBD6; --brain: #FA4AA0; --brain-text: #9C2E30; --sky: #5AA3D8; --sun: #FCC978; --card: #F6F3E6; --sheet: #FBFAF4; --pencil: #6a6a66; --chalk: #F1EFE4; }
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: 'Calibre', system-ui, sans-serif; overflow-x: clip; }

.grain { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; mix-blend-mode: multiply; opacity: .45; z-index: 90; }
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 80; display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 22px; pointer-events: none; }
nav .tag { pointer-events: auto; background: var(--card); padding: 8px 12px 6px; box-shadow: 0 8px 14px -8px rgba(0,0,0,.4); transform: rotate(-2deg); }
nav .tag img { height: 24px; width: auto; display: block; }
nav a.pill { pointer-events: auto; font-size: 15px; padding: 10px 20px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; box-shadow: 0 6px 12px -6px rgba(0,0,0,.4); }

/* scenes: a surface that fills the screen, and a 1600×900 stage scaled to fit it */
.scene { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.fit { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform: translate(-50%, -50%) scale(var(--k, 1)); }
.vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(20,16,12,.18) 100%); }
.a { position: absolute; }
.replay { position: absolute; right: 18px; bottom: 16px; z-index: 5; font: 13px 'Calibre'; letter-spacing: .12em; text-transform: uppercase; color: rgba(47,47,47,.7); background: rgba(246,243,230,.85); border: 1px solid rgba(47,47,47,.15); border-radius: 999px; padding: 6px 12px 4px; cursor: pointer; display: none; }
.review .replay { display: block; }

/* surfaces */
.bg-paper { background: var(--paper); }
.bg-wood { background: #241c18; }
.bg-graph { background-color: #F4F2E8; background-image: linear-gradient(rgba(90,163,216,.26) 1px, transparent 1px), linear-gradient(90deg, rgba(90,163,216,.26) 1px, transparent 1px); background-size: 26px 26px; }
.bg-blueprint { background-color: #1d4a80; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px); background-size: 32px 32px, 32px 32px, 160px 160px, 160px 160px; }
/* a scene's texture only loads once the scene is built (core.js ensure) — the colour holds the place until then */
.scene:not(.built) { background-image: none; }
.bg-kraft { background: #b98f63 url('ink/tex-kraft.jpg') center / cover; }
.bg-textile { background: #d9dce6 url('ink/tex-textile.jpg') center / cover; }
.bg-concrete { background: #8f8a84 url('ink/tex-concrete.jpg') center / cover; }
.bg-night { background: radial-gradient(ellipse at 40% 30%, #22345a, #121c33 70%); }
.bg-wall { background: #e8e5dd url('ink/tex-wall.jpg') center / cover; }
.bg-cork { background: #b88b58 url('ink/tex-cork.jpg') center / cover; }

/* type */
.eyebrow { font-family: 'Calibre'; font-size: 14px; letter-spacing: .26em; text-transform: uppercase; color: var(--brain-text); }
.h2 { font-family: 'Kerub'; font-weight: normal; font-size: 62px; line-height: 1.02; letter-spacing: -.012em; word-spacing: .04em; color: var(--ink); }
.lead { font-family: 'Calibre'; font-size: 21px; line-height: 1.5; color: rgba(47,47,47,.76); }
.small { font-family: 'Calibre'; font-size: 15px; line-height: 1.5; color: rgba(47,47,47,.62); }
.hand { font-family: 'Hand'; font-weight: 600; color: var(--ink); }
.btn { display: inline-block; font-family: 'Calibre'; font-size: 19px; padding: 16px 30px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; border: 0; cursor: pointer; }
.link { font-family: 'Calibre'; font-size: 18px; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(47,47,47,.3); text-underline-offset: 6px; cursor: pointer; background: none; border: 0; }
.chalk { font-family: 'Hand'; font-weight: 600; color: var(--chalk); }

/* paper */
.note { --lift: 0; position: absolute; width: 468px; height: 372px; background: var(--card); padding: 54px 42px 30px 46px; transform-origin: 50% 40%;
  background-image: repeating-linear-gradient(to bottom, transparent 0 51px, rgba(90,163,216,.22) 51px 52px); background-position: 0 38px;
  box-shadow: 0 calc(18px + var(--lift) * 60px) calc(30px + var(--lift) * 50px) calc(-8px - var(--lift) * 4px) rgba(20,16,12, calc(.32 - var(--lift) * .12)), 0 2px 4px rgba(20,16,12,.12); }
.note .wish { font-family: 'Hand'; font-weight: 600; font-size: 66px; line-height: .98; }
.note .why { position: relative; font-family: 'Hand'; font-weight: 500; font-size: 31px; color: var(--pencil); margin-top: 22px; line-height: 1.14; }
.note .why .l2 { display: inline-block; }
.tape { position: absolute; top: -18px; left: 150px; width: 150px; height: 40px; transform: rotate(3deg); background: rgba(236,226,196,.82);
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 18% 2%, 26% 9%, 100% 0, 97% 50%, 100% 100%, 90% 92%, 82% 100%, 74% 91%, 0 100%, 3% 50%); }
.tape.pink { background: rgba(250,120,180,.62); }
.tape.blue { background: rgba(120,176,220,.6); }
.tape.free { position: absolute; }
.card { position: absolute; background: var(--card); box-shadow: 0 18px 30px -10px rgba(20,16,12,.32), 0 2px 4px rgba(20,16,12,.12); }
.sheet { background: var(--sheet); }
.label { position: absolute; background: var(--card); padding: 22px 30px 20px; box-shadow: 0 16px 26px -12px rgba(20,16,12,.45), 0 2px 3px rgba(20,16,12,.15); }
.print { position: absolute; background: #fbfaf5; padding: 12px 12px 14px; box-shadow: 0 16px 26px -10px rgba(20,16,12,.38), 0 2px 3px rgba(20,16,12,.15); }
.print img { display: block; width: 100%; height: auto; }
.print .cap { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%) rotate(-2deg); font-family: 'Hand'; font-weight: 600; font-size: 26px; white-space: nowrap; background: rgba(236,226,196,.92); padding: 2px 14px 0; }
.obj { position: absolute; }
.obj img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 16px rgba(20,16,12,.28)) drop-shadow(0 2px 3px rgba(20,16,12,.2)); }
.ink { position: absolute; display: block; pointer-events: none; }
.ink.chalky { filter: invert(1) sepia(.15) brightness(1.08); mix-blend-mode: screen; }
.standwrap { position: absolute; perspective: 1400px; perspective-origin: 50% -40%; }
.stand { position: relative; width: 100%; height: 100%; background: var(--card); padding: 10px; transform-origin: 50% 100%; box-shadow: 0 18px 30px -8px rgba(20,16,12,.32), 0 2px 4px rgba(20,16,12,.14); }
.inner { position: relative; width: 100%; height: 100%; overflow: hidden; }
.pencil { position: absolute; overflow: visible; pointer-events: none; }
.pencil path { fill: none; stroke: var(--pencil); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pencil.pink path { stroke: var(--brain); stroke-width: 3.4; opacity: .88; }
.pencil.chalkline path { stroke: var(--chalk); stroke-width: 3.2; opacity: .92; filter: url(#rough); }
.pencil.inkline path { stroke: var(--ink); stroke-width: 2.4; filter: url(#rough); }
.drawhand { position: absolute; left: 0; top: 0; width: 1px; height: 1px; pointer-events: none; opacity: 0; visibility: hidden; }
.stamp { position: absolute; font-family: 'Calibre'; font-size: 22px; letter-spacing: .22em; text-transform: uppercase; color: rgba(190,40,90,.85);
  border: 3px solid rgba(190,40,90,.85); border-radius: 6px; padding: 8px 14px 5px; filter: url(#inkbleed); mix-blend-mode: multiply; }
.index { position: absolute; background: var(--sheet); padding: 26px 30px; box-shadow: 0 16px 24px -12px rgba(20,16,12,.36), 0 2px 3px rgba(20,16,12,.1);
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(90,163,216,.2) 39px 40px); background-position: 0 30px; }
.write .ln { display: block; }

/* the recurring character: a small wish note on ink legs */
.walker { position: absolute; width: 150px; height: 210px; z-index: 40; transform-origin: 50% 100%; }
.walker .wbody { position: absolute; left: 10px; top: 0; width: 130px; height: 104px; background: var(--card); box-shadow: 0 10px 14px -8px rgba(20,16,12,.4);
  background-image: repeating-linear-gradient(to bottom, transparent 0 21px, rgba(90,163,216,.25) 21px 22px); background-position: 0 14px; }
.walker .wbody .tape { top: -9px; left: 40px; width: 52px; height: 16px; }
.walker .face { position: absolute; left: 34px; top: 34px; width: 64px; height: 40px; }
.walker .eye { position: absolute; top: 4px; width: 8px; height: 11px; border-radius: 50%; background: var(--ink); }
.walker .eye.l { left: 14px; } .walker .eye.r { left: 40px; }
.walker svg { position: absolute; overflow: visible; }
.walker svg path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.walker .legs { left: 0; top: 100px; width: 150px; height: 110px; }
.walker .arms { left: -30px; top: 40px; width: 210px; height: 90px; }
.walker.chalkwalk svg path { stroke: var(--chalk); }
.strip { position: absolute; font-family: 'Hand'; font-weight: 600; font-size: 32px; padding: 7px 18px 5px; background: var(--sheet); box-shadow: 0 8px 14px -6px rgba(20,16,12,.35); white-space: nowrap; color: var(--ink); }
.carry .strip { position: relative; display: inline-block; }

/* ---- v4 surfaces: designed papers only (no photographs of floors or fabric) */
.tooth { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; opacity: .55; }
.bg-mat { background-color: #2c574b;
  background-image:
    linear-gradient(rgba(214,236,214,.30) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(214,236,214,.30) 1.5px, transparent 1.5px),
    linear-gradient(rgba(214,236,214,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(214,236,214,.13) 1px, transparent 1px),
    linear-gradient(45deg, transparent 49.9%, rgba(214,236,214,.07) 50%, transparent 50.1%);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px, 480px 480px; background-position: -1px -1px; }
.bg-rose { background: radial-gradient(ellipse at 30% 20%, #f3bdb4, #e9a79d 70%); }
.bg-water { background: radial-gradient(ellipse at 78% 12%, rgba(252,201,120,.55), rgba(252,201,120,0) 55%), radial-gradient(ellipse at 10% 90%, rgba(244,166,160,.28), rgba(244,166,160,0) 50%), #f5eedf; }
.bg-vellum { background-color: #e6e9e8; background-image: radial-gradient(rgba(60,80,90,.28) 1.2px, transparent 1.4px); background-size: 20px 20px; }
.bg-studio { background: radial-gradient(ellipse at 50% 38%, #f3efe7 0%, #e3ddd1 55%, #cfc7b8 100%); }
.bg-lined { background-color: #f7f4ea; background-image: linear-gradient(90deg, transparent 150px, rgba(222,90,90,.5) 150px, rgba(222,90,90,.5) 152px, transparent 152px), repeating-linear-gradient(to bottom, transparent 0 43px, rgba(90,163,216,.32) 43px 44px); background-position: 0 0, 0 22px; }

/* ---- v4: cut-out photographs (scissor-cut border baked into cut/*.png) and their physical shadows */
.cut { position: absolute; --lift: 0; }
.cut img { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 1px .6px rgba(20,16,12,.42)) drop-shadow(0 calc(4px + var(--lift) * 30px) calc(5px + var(--lift) * 22px) rgba(20,16,12,.20)) drop-shadow(0 calc(12px + var(--lift) * 46px) calc(20px + var(--lift) * 28px) rgba(20,16,12,.14)); }

/* ---- v4: the cut-paper doll */
.doll { position: absolute; width: 1px; height: 1px; z-index: 40; transform-origin: 0 0; }
.doll .dbone { position: absolute; width: 0; height: 0; }
.doll .dskin { position: absolute; display: block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); filter: drop-shadow(0 1px .5px rgba(20,16,12,.45)) drop-shadow(1px 3px 2px rgba(20,16,12,.22)); }
.doll .dpin { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; z-index: 5;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #d4a748 45%, #8a6420 90%); box-shadow: 0 1px 1px rgba(0,0,0,.45); }
.doll .dface { position: absolute; overflow: visible; }
.doll .dface path { fill: none; stroke: #2b2a28; stroke-width: 2.2; stroke-linecap: round; }
.doll .dface .deye { fill: #2b2a28; }
.doll .dshadow { position: absolute; left: -70px; top: 150px; width: 150px; height: 22px; border-radius: 50%; background: radial-gradient(ellipse, rgba(20,16,12,.32), rgba(20,16,12,0) 70%); }

/* ---- v4: salon tags — a true detail on a manila tag tied to the object with cotton string (H.tag) */
.stag { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 45; pointer-events: none; }
.stag .string { position: absolute; overflow: visible; }
.stag .string path { fill: none; stroke: #b7a47c; stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 3px 2px rgba(20,16,12,.18)); }
.stag .tagcard { position: absolute; padding: 12px 16px 13px 36px; color: #3a3530;
  background:
    linear-gradient(90deg, rgba(0,0,0,0) 88%, rgba(90,60,20,.10)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.9 0.08' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.33  0 0 0 0 0.16  0 0 0 0.22 0'/></filter><rect width='160' height='160' filter='url(%23f)'/></svg>"),
    linear-gradient(170deg, #d9c197, #c9ae80);
  box-shadow: 0 16px 24px -10px rgba(20,16,12,.5), 0 2px 3px rgba(20,16,12,.2), inset 0 0 0 1px rgba(255,248,230,.18), inset 0 0 7px rgba(110,80,40,.28), inset -8px 0 12px -6px rgba(90,60,20,.32);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.stag .tagcard.mir { padding: 12px 36px 13px 16px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); }
.stag .tagcard.mir .eyelet { left: auto; right: 9px; }
.stag .tagcard.mir .knot { left: auto; right: 3px; transform: scaleX(-1); }
.stag .eyelet { position: absolute; left: 9px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: #3b3328; z-index: 1;
  box-shadow: 0 0 0 2.5px #c9a45c, 0 0 0 3.5px rgba(90,60,20,.45), 0 0 0 8px rgba(246,236,210,.75), 0 0 0 9px rgba(120,90,50,.18), inset 0 1px 2px rgba(0,0,0,.6); }
.stag .knot { position: absolute; left: 3px; top: 4px; width: 30px; height: 22px; overflow: visible; z-index: 2; }
.stag .knot path { fill: none; stroke: #b7a47c; stroke-width: 1.6; stroke-linecap: round; }
.stag .k { display: block; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: rgba(70,52,28,.85); }
.stag .by { display: block; margin-top: 7px; font-size: 10px; line-height: 1.45; letter-spacing: .16em; text-transform: uppercase; color: rgba(70,52,28,.86); }
.stag b { display: block; margin-top: 4px; font-family: 'Kerub'; font-weight: normal; font-size: 23px; line-height: 1; color: #2f2b27; }
.stag p { margin-top: 6px; font-size: 13.5px; line-height: 1.38; color: rgba(47,43,39,.86); }

/* ---- the phone composition (APPROACH.md §11; ported from The Human Signal v4, 29 Sep 2026). core.js adds html.phone
   below 0.6 of the stage (or with ?phone) and lays each section out as .pcopy + .pwin + .pafter. */
html.phone .scene.ph { height: auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
html.phone .ph .pcopy, html.phone .ph .pafter { position: relative; z-index: 6; width: 100%; max-width: 560px; margin: 0 auto; }
html.phone .ph .pcopy { padding: 76px 24px 14px; }
html.phone .ph .pafter { padding: 10px 24px 44px; }
html.phone .ph .pcopy.empty { padding: 0; }
html.phone .ph .pafter.empty { padding: 0 0 28px; }
/* the window: vertical swipes always scroll; sideways drags reach the scene */
html.phone .ph .pwin { position: relative; flex: none; width: 100%; z-index: 1; touch-action: pan-y; }
html.phone .ph .fit { left: 0; top: 0; transform: scale(var(--k, 1)); transform-origin: 0 0; }
html.phone .ph .pcopy > *, html.phone .ph .pafter > * { position: relative !important; inset: auto !important; width: auto !important; max-width: none !important; height: auto !important; }
html.phone .ph .pcopy > * + *, html.phone .ph .pafter > * + * { margin-top: 14px; }
/* type on a phone: titles in Kerub, long copy in Calibre; body at least 15 px, labels at least 12 px */
html.phone .pcopy .eyebrow, html.phone .pafter .eyebrow { font-size: 11.5px; letter-spacing: .22em; }
html.phone .pcopy .h1 { font-size: 46px !important; }
html.phone .pcopy .h2, html.phone .pafter .h2 { font-size: 36px !important; line-height: 1.04; }
html.phone .pcopy .lead, html.phone .pafter .lead, html.phone .pcopy p, html.phone .pafter p { font-size: 17px; line-height: 1.5; }
html.phone .pcopy .small, html.phone .pafter .small { font-size: 14px; }
html.phone .pcopy .btn, html.phone .pafter .btn { font-size: 17px; padding: 14px 26px 12px; }
html.phone .ph .fit .hintnote { scale: var(--hz, 1); transform-origin: 0 50%; }
html.phone nav { padding: 12px 14px; }
/* the paper's tooth and the page's fibre: small stitched tiles of the same SVG noise instead of a filter the height of
   each section (WebKit renders those at full size, per section) */
html.phone .tooth rect, html.phone .grain rect { display: none; }
html.phone .tooth { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='t' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' seed='21' stitchTiles='stitch' result='n'/%3E%3CfeDiffuseLighting in='n' surfaceScale='1.6' lighting-color='%23ffffff' result='l'%3E%3CfeDistantLight azimuth='225' elevation='52'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix in='l' type='matrix' values='0.33 0.33 0.33 0 0  0.33 0.33 0.33 0 0  0.33 0.33 0.33 0 0  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23t)'/%3E%3C/svg%3E") 0 0 / 256px 256px repeat; }
/* (the grain's multiply over the whole page cost WebKit ~80 MB: on a phone it is the same noise drawn as black at the alpha
   multiplying by the fibre's colour takes away, dst \00D7 (1 \2212 a(1 \2212 c)), in normal blending) */
html.phone .grain { mix-blend-mode: normal; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='a' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -0.088 0.071'/%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.05' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -0.082 0.057'/%3E%3C/filter%3E%3Crect width='500' height='500' filter='url(%23a)'/%3E%3Crect width='500' height='500' filter='url(%23b)'/%3E%3C/svg%3E") 0 0 / 500px 500px repeat; }
/* a stage far from the screen leaves the rendering */
html.phone .scene.ph.far > * { visibility: hidden; }
html.phone .scene.ph.far .fit { display: none; }
html.phone *, html.phone *:before, html.phone *:after { will-change: auto !important; }

/* the hero carries its own "I'm curious"; the pill waits until the visitor has scrolled past it, as on the home page
   (John, 6 Oct 2026: "borde komma upp först på nästa sektion") */
body.hero-in nav a.pill { opacity: 0 !important; visibility: hidden; pointer-events: none; transition: opacity .3s ease, visibility 0s linear .3s; }
