/* Document-sized scenery: upper scene, extensible middle, bottom-anchored terrain. */
body{position:relative;isolation:isolate}
:root{--hatch:#57554b}
:root[data-mode="day"]{--hatch:rgba(255,255,255,.27)}
.scene-background{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.scene-background svg{position:absolute;left:0;width:100%;height:auto;will-change:auto;transform:none}
.scene-background .scene-top{top:0;aspect-ratio:1600/1000;opacity:.92}
.scene-background .scene-bottom{top:auto;bottom:0;aspect-ratio:1600/250;opacity:.75}
.scene-middle{position:absolute;top:660px;bottom:140px;left:0;right:0;background:var(--hatch);mask:url('/project1/terrain-middle.svg?v=000d4677405d') center top/100% auto repeat-y;-webkit-mask:url('/project1/terrain-middle.svg?v=000d4677405d') center top/100% auto repeat-y;opacity:.5}
.cloud-drift{animation:cloud-passage 23s ease-in-out infinite alternate;transform-box:view-box}
@keyframes cloud-passage{from{transform:translateX(-9px)}to{transform:translateX(15px)}}
.scene-background .bell{animation:bell-greeting 4s ease-in-out .6s 1,bell-clear 8s ease-in-out 5s infinite;transform-box:view-box}
@keyframes bell-greeting{0%,100%{transform:rotate(0)}12%{transform:rotate(27deg)}29%{transform:rotate(-23deg)}46%{transform:rotate(17deg)}63%{transform:rotate(-12deg)}79%{transform:rotate(6deg)}}
@keyframes bell-clear{0%,55%,100%{transform:rotate(0)}61%{transform:rotate(21deg)}69%{transform:rotate(-18deg)}77%{transform:rotate(12deg)}85%{transform:rotate(-7deg)}93%{transform:rotate(3deg)}}
.scene-background .bird{animation:bird-wings 1.65s ease-in-out infinite;transform-box:view-box}
.scene-background .bird path{stroke-width:1.85}
.scene-background .flock{animation:flock-south 22s linear infinite}
@keyframes bird-wings{0%,100%{transform:scaleY(1) rotate(-3deg)}50%{transform:scaleY(.25) rotate(4deg)}}
@keyframes flock-flight{from{transform:translate(0,0)}to{transform:translate(-36px,22px)}}
@media(max-width:767px){.scene-background .scene-top{width:100%;max-width:none;left:0;opacity:.8}.scene-middle{top:400px;bottom:80px}.scene-background .scene-bottom{width:140%;left:-20%}}
@media(prefers-reduced-motion:reduce){.scene-background .cloud-drift,.scene-background .bird,.scene-background .flock,.scene-background .bell{animation:none!important;transform:none}}

/* Restrained sky; coordinated gusts, always southbound flight. */
.scene-background .sun-rays{opacity:.12}
.scene-background .cloud-controls{opacity:.16}
.cloud-shape{transform-box:fill-box;transform-origin:50% 65%;animation:cloud-breathe 16s ease-in-out infinite alternate}
@keyframes cloud-breathe{0%{transform:scale(1,1) skewX(-1deg)}100%{transform:scale(1.045,.91) skewX(1deg)}}
@keyframes flock-south{0%{transform:translateY(-28px);opacity:0}8%{opacity:1}87%{opacity:1}100%{transform:translateY(150px);opacity:0}}
.scene-background .cypress{transform-box:view-box;animation:cypress-gust 4s ease-in-out infinite}
@keyframes cypress-gust{0%,8%,67%,100%{transform:skewX(0deg)}24%{transform:skewX(-2.2deg)}37%{transform:skewX(-.6deg)}48%{transform:skewX(-1.1deg)}59%{transform:skewX(-.2deg)}}
/* Short independent engraved curls travel physically across the scene. */
.wind-gust path{stroke-width:1.35;stroke-dasharray:none;stroke-dashoffset:0;opacity:1;animation:none}
.wind-stroke{opacity:0;animation:wind-travel 4s linear infinite;transform-box:view-box}
.wind-two{animation-delay:.18s}.wind-three{animation-delay:.34s}
.wind-two path{stroke-width:1.05}.wind-three path{stroke-width:.9}
@keyframes wind-travel{0%,3%{transform:translateX(-300px);opacity:0}12%{transform:translateX(-30px);opacity:.5}62%{transform:translateX(1510px);opacity:.5}73%{transform:translateX(1830px);opacity:0}100%{transform:translateX(1830px);opacity:0}}
@media(prefers-reduced-motion:reduce){.scene-background .cypress,.scene-background .cloud-shape,.scene-background .flock{animation:none!important;transform:none}.wind-gust{display:none}}

/* The three curls and the trees share one scripted timeline. */
.scene-background .cypress{animation:none}
.wind-curl{transform-box:view-box;will-change:transform}
.wind-gust .curl-main{stroke-width:1.25}
.wind-gust .curl-echo{stroke-width:.65}
@media(prefers-reduced-motion:reduce){.wind-gust{display:none}.scene-background .cypress{transform:none!important}}
/* Daytime rays need more contrast than the same strokes on charcoal. */
:root[data-mode="day"] .scene-background .sun-rays{opacity:.38}
/* Direct hover/focus response: works independently of JavaScript. */
.mode .sky.moon{transform-box:view-box;transform-origin:50% 50%;transform:rotate(0deg);transition:transform 1.25s cubic-bezier(.25,.1,.25,1),opacity .55s ease-in}
.mode .sky.sun .icon-rays{transform-box:view-box;transform-origin:16px 16px;transform:scale(1);transition:transform 1.5s cubic-bezier(.25,.1,.25,1)}
:root:not([data-mode="day"]) .mode:has(.switch:is(:hover,:focus-visible)) .sky.moon,
:root:not([data-mode="day"]) .mode.sky-near .sky.moon{transform:rotate(-14deg)}
:root[data-mode="day"] .mode:has(.switch:is(:hover,:focus-visible)) .sky.sun .icon-rays,
:root[data-mode="day"] .mode.sky-near .sky.sun .icon-rays{transform:scale(1.2)}
@media(prefers-reduced-motion:reduce){.mode .sky.moon,.mode .sky.sun .icon-rays{transition:none}}

/* The reference's three light, growing arc trails; no rigid curl symbols. */
.wind-gust .wind-trace{animation:none;stroke-dasharray:none;stroke-width:1.25}
.wind-gust .wind-trace:nth-child(2){stroke-width:.95}
.wind-gust .wind-trace:nth-child(3){stroke-width:.7}


/* Crisp ink furniture and independently sized room architecture. */
:root{--study-ink:#77705f}
:root[data-mode="day"]{--study-ink:rgba(255,255,255,.58)}
.paper-stack{z-index:2}
.scene-background{bottom:var(--study-footer-depth,0px)}
.study-room{position:relative;isolation:isolate;z-index:0;flex:none;width:100%;height:auto;aspect-ratio:1402/1140;margin-top:-26px;pointer-events:none;color:var(--study-ink)}
.study-ink{position:absolute;z-index:1;top:0;left:-4.636234%;width:109.557775%;aspect-ratio:1536/1024}
.study-ink svg{display:block}
.study-architecture{position:absolute;top:0;height:100%;overflow:visible;color:var(--study-ink)}
@media(max-width:959px){.study-room{margin-top:-20px}}
/* A short, gentle bow, followed by a quiet pause; repeats every ten seconds. */
.study-stem{transform-box:view-box;animation:study-stem-bow 10s infinite cubic-bezier(.45,0,.3,1)}
.study-stem-left{animation-name:study-stem-bow-left}
@keyframes study-stem-bow{0%,8%,43%,100%{transform:rotate(0deg)}23%{transform:rotate(1.6deg)}34%{transform:rotate(-.25deg)}}
@keyframes study-stem-bow-left{0%,11%,47%,100%{transform:rotate(0deg)}27%{transform:rotate(-1.8deg)}38%{transform:rotate(.25deg)}}
.study-candle-sparks{transform-box:view-box;transform-origin:1012px 589px}
:root:not([data-mode="day"]) .study-candle-flame{color:#d9b95f}
:root:not([data-mode="day"]) .study-candle-sparks{color:#b8a060;animation:study-candle-breathe 4.8s ease-in-out infinite}
@keyframes study-candle-breathe{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.09);opacity:1}}
@media(prefers-reduced-motion:reduce){.study-stem,:root:not([data-mode="day"]) .study-candle-sparks{animation:none}}
/* The pendant and its rope share one pivot. Daylight alone warms the bulb. */
.study-lamp{transform-box:view-box;transform-origin:768px 0px}
.study-bulb-light{display:block;opacity:0;transition:opacity .5s ease .1s}
.study-lamp[data-light="on"] .study-bulb-light{opacity:1}
.study-lamp[data-light="on"] .study-bulb-flicker{animation:study-bulb-flicker 3.7s linear infinite}
:root[data-mode="day"] .study-candle-flame,
:root[data-mode="day"] .study-candle-sparks{display:none}
@keyframes study-bulb-flicker{0%,100%{opacity:.83}12%{opacity:.95}18%{opacity:.79}35%{opacity:.9}47%{opacity:.76}58%{opacity:1}66%{opacity:.86}83%{opacity:.96}92%{opacity:.8}}
@media(prefers-reduced-motion:reduce){.study-lamp[data-light="on"] .study-bulb-flicker{animation:none}.study-bulb-light{transition:none}}
/* The flame bends at the wick; it remains absent throughout daytime. */
.study-candle-flame{transform-box:view-box;transform-origin:1012px 603px}
:root:not([data-mode="day"]) .study-candle-flame{animation:study-flame-dance 2.9s ease-in-out infinite}
@keyframes study-flame-dance{0%,100%{transform:rotate(-1deg) scaleY(1)}19%{transform:rotate(2.7deg) scaleY(1.035)}43%{transform:rotate(-2deg) scaleY(.975)}68%{transform:rotate(1.5deg) scaleY(1.02)}84%{transform:rotate(-.7deg) scaleY(.99)}}
@media(prefers-reduced-motion:reduce){:root:not([data-mode="day"]) .study-candle-flame{animation:none}}
/* Sparse meadow contours finish only the landscape beside the page's lower edge. */
.scene-meadow{position:absolute;left:0;right:0;bottom:0;aspect-ratio:1600/380;background:var(--hatch);opacity:.9;-webkit-mask:url('/project1/terrain-meadow.svg?v=c162dffa3ceb') center bottom/100% 100% no-repeat;mask:url('/project1/terrain-meadow.svg?v=c162dffa3ceb') center bottom/100% 100% no-repeat}
/* The closing signature uses the same light ink as the room illustration. */
@font-face{font-family:'Atelier Footer Hand';src:url('/project1/fonts/caveat-footer.woff2?v=28c266a94a5b') format('woff2'),url('/project1/fonts/caveat-footer.ttf?v=24564d09705a') format('truetype');font-weight:400;font-style:normal;font-display:swap}
.foot{font-family:'Atelier Footer Hand',cursive;font-size:19px;line-height:1.5;letter-spacing:.015em;color:var(--study-ink)}
.foot .rule{color:inherit;gap:0}
.foot .rule::before,.foot .rule::after{display:none}
.foot .rule svg{display:block;width:224px;height:18px}
.foot .social{color:inherit}
.foot .social svg{width:25px;height:25px;overflow:visible}
.foot p{opacity:1}
.foot .legal{margin-top:7px}
.foot .legal a{position:relative;display:inline-block;border-bottom:0;padding-bottom:4px;color:inherit}
.foot .legal a::after{content:'';position:absolute;left:1%;right:0;bottom:0;height:5px;background:currentColor;opacity:.7;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 5' preserveAspectRatio='none'%3E%3Cpath d='M1 3Q47 1.7 92 2.6M98 2.7Q173 3.4 218 2M225 2.1L278 2.7' fill='none' stroke='black' stroke-width='.9' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 5' preserveAspectRatio='none'%3E%3Cpath d='M1 3Q47 1.7 92 2.6M98 2.7Q173 3.4 218 2M225 2.1L278 2.7' fill='none' stroke='black' stroke-width='.9' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat}
.foot .legal a:focus-visible{outline:1px dashed currentColor;outline-offset:5px}
/* The approved casement is the only added furnishing. Its breeze owns the
   plant response; the night room has neither incoming wind nor plant motion. */
.study-ink>svg{overflow:visible}
.study-stem{animation:none}
.study-room-breeze{opacity:.8}
.study-window{pointer-events:none}
/* Quiet independent flower movement at night; daytime remains breeze-led. */
:root:not([data-mode="day"]) .study-stem{animation:study-stem-bow 10s infinite cubic-bezier(.45,0,.3,1)}
:root:not([data-mode="day"]) .study-stem-left{animation-name:study-stem-bow-left}
@media(prefers-reduced-motion:reduce){:root:not([data-mode="day"]) .study-stem{animation:none}}
/* The cup keeps its empty rim above a low coffee level and one crema layer. */
.study-coffee .coffee-liquid{fill:none;stroke:currentColor;stroke-linecap:round;opacity:.8}
.study-coffee .coffee-crema{fill:none;stroke:currentColor;stroke-width:.6;opacity:.8}
.study-coffee .coffee-crema-edge{stroke:currentColor;opacity:.75}
.coffee-steam-wisp{transform-box:view-box;transform-origin:1078px 643px;opacity:0;stroke-dasharray:.7 .7;animation:coffee-steam-rise 14s linear infinite}
.coffee-steam-second{animation-delay:.8s}
@keyframes coffee-steam-rise{0%,4%{opacity:0;stroke-dashoffset:1;transform:translateY(3px) scale(.72,.65)}10%{opacity:.18;stroke-dashoffset:.5}21%{opacity:.28;stroke-dashoffset:0;transform:translateY(-7px) scale(1,1)}34%{opacity:.12;stroke-dashoffset:-.5}43%,100%{opacity:0;stroke-dashoffset:-1;transform:translateY(-20px) scale(1.2,1.15)}}
@media(prefers-reduced-motion:reduce){.study-coffee-steam{display:none}.coffee-steam-wisp{animation:none}}
/* A small inked pull switch with a full-size invisible touch target. */
.study-lamp-switch{pointer-events:all;cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}
.lamp-pull-cord{transform-box:view-box;transform-origin:797px 354px}
.lamp-pull-grip{transform-box:view-box;transform-origin:797px 403px}
.lamp-pull-focus{opacity:0;transition:opacity .2s ease}
.study-lamp-switch:focus-visible .lamp-pull-focus{opacity:.8}
.study-lamp-switch:hover .lamp-pull-grip{color:var(--frame-fg)}
/* The rug and skirting disappear behind the poodle's contour, including its
   raised head. Only the head responds to the two social balls. */
.poodle-head{transform-box:view-box;transform-origin:700px 560px;transform:translateY(0px) rotate(0deg);transition:transform .9s cubic-bezier(.25,.1,.25,1)}
.study-poodle.is-alert .poodle-head{transform:translateY(-12px) rotate(8deg)}
.poodle-social-link{pointer-events:all;cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}
.poodle-ball-focus{opacity:0;transition:opacity .2s ease}
.poodle-social-link:focus-visible .poodle-ball-focus{opacity:.85}
.poodle-social-link:hover .poodle-ball-ink,.poodle-social-link:focus-visible .poodle-ball-ink{color:var(--frame-fg)}
@media(prefers-reduced-motion:reduce){.poodle-head,.poodle-ball-focus{transition:none}}
.poodle-occlusion,.poodle-ball-shell{transition:fill .4s ease}
/* Small expressive eye movements and a separately rigged tail; the torso rests. */
.poodle-tail{transform-box:view-box;transform-origin:1220px 690px;transform:rotate(0deg)}
.poodle-eye{transform-box:view-box;transform:translate(0,0) scaleY(1);transition:color .4s ease,transform .4s ease}
.study-poodle.is-alert .poodle-eye{color:color-mix(in srgb,var(--study-ink) 65%,var(--frame-fg) 35%);animation:poodle-eye-interest 2.8s ease-in-out infinite}
:root[data-mode="day"] .study-poodle.is-alert .poodle-eye{color:#fff}
@keyframes poodle-eye-interest{0%,100%{transform:translate(-2px,-1px) scaleY(1.16)}32%{transform:translate(-3px,-2px) scaleY(1.22)}73%{transform:translate(-1px,-1px) scaleY(1.18)}}
@media(prefers-reduced-motion:reduce){.poodle-eye{transition:none}.study-poodle.is-alert .poodle-eye{animation:none;transform:scaleY(1.12)}}
/* Rafa's note appears on hover, focus or a touch; social links remain separate. */
.study-poodle{pointer-events:none;outline:none}
.poodle-name-hit{pointer-events:all;cursor:help;-webkit-tap-highlight-color:transparent}
.poodle-name{font-family:'Atelier Footer Hand',cursive;fill:currentColor;color:var(--study-ink);opacity:0;pointer-events:none;transform:translateY(3px);transition:opacity .3s ease,transform .4s ease}
.poodle-name.is-visible{opacity:1;transform:translateY(0px)}
.poodle-name-title{font-size:18px}
.poodle-name-caption{font-size:13px}
.poodle-name-position[data-compact="true"] .poodle-name-title{transform:translateY(22px)}
.poodle-name-position[data-compact="true"] .poodle-name-caption,.poodle-name-position[data-compact="true"] .poodle-name-rule{display:none}
@media(prefers-reduced-motion:reduce){.poodle-name{transition:none;transform:none}}

/* The small metal key retains a readable contour at narrow room scales. */
.study-journal-key{color:color-mix(in srgb,var(--study-ink) 88%,var(--frame-fg) 12%)}
:root[data-mode="day"] .study-journal-key{color:rgba(255,255,255,.7)}
@media(max-width:700px){.study-journal-key .key-main-line{vector-effect:non-scaling-stroke;stroke-width:.45px}.study-journal-key .key-pressure-line{vector-effect:non-scaling-stroke;stroke-width:.6px}.study-journal-key .key-metal-ink>path:nth-last-child(-n+2){stroke-width:.25px}}
