:root {
  color-scheme: light;
  --paper: #faf8f2;
  --ink: #2f2d2a;
  --sea: #dcecf0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--paper);
}

button, a { -webkit-tap-highlight-color: transparent; }

.site-shell {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.scene-frame {
  position: relative;
  flex: none;
  width: min(100vw, calc(100vh * 1200 / 760));
  width: min(100vw, calc(100svh * 1200 / 760));
  aspect-ratio: 1200 / 760;
  overflow: hidden;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.ink {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper { fill: var(--paper); }
.scene-paper { fill: var(--paper); }
.sea-fill { fill: var(--sea); }
.faint-line { stroke-width: 1.35; }
.expression { stroke-width: 1.65; }
.sun-fill { fill: #eae2c0; }
.sun-outline { stroke-width: 1.8; }
#sun-anchor .faint-line { stroke-width: 1.5; }
.horizon { stroke-width: 1.3; opacity: .72; }
.water-marks { fill: none; stroke: #728f97; stroke-width: 1.2; stroke-linecap: round; opacity: .58; }
.wave-near { opacity: .65; }
.mobile-water { display: none; }
.wall-top { fill: #f1eee4; stroke-width: 1.9; }
.wall-face { fill: #e9e7de; }
.wall-outline { stroke-width: 1.9; }
.wall-detail { stroke-width: 1.2; opacity: .46; }
.wall-detail.subtle { opacity: .3; }
.wall-rim { stroke-width: 1.1; opacity: .25; }
.hair { fill: var(--ink); }
.shorts { fill: #62645e; }
.clothing-detail { stroke-width: 1.1; opacity: .64; }
.phone-screen { fill: #777e77; }
.phone-mark { stroke-width: .8; }
.chair-cloth { fill: #ece6d4; }
.chair-frame { stroke-width: 2.3; }
.fish-fill { fill: var(--paper); }
.glasses { fill: var(--ink); stroke-width: 1.3; }
.raft-wake, .hand-ripple { stroke: #728f97; stroke-width: 1.2; opacity: .66; }

.scene-anchor {
  transform-box: view-box;
  transform-origin: 0 0;
}

#sun-anchor { transform: translate(927px, 336px); }
#moon-anchor { transform: translate(1018px, 281px); }
#cloud-anchor { transform: translate(746px, 364px); }
#fish-anchor { transform: translate(957px, 515px); }
#bro-anchor { transform: translate(408px, 425px); }
#phone-anchor { transform: translate(332px, 425px); }
#hand-anchor { transform: translate(673px, 571px); }

.moving-part {
  transform-box: fill-box;
  transform-origin: center;
}

#bro-head { transform-origin: 45% 80%; }
.bro-leg, .cloud-foot { transform-origin: 50% 0%; }
#hand-wave { transform-origin: 50% 100%; }
.event-motion, .event-caption { opacity: 0; visibility: hidden; }

.event-caption {
  fill: var(--ink);
  stroke: none;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: .2px;
}

.site-name {
  position: fixed;
  z-index: 3;
  left: max(30px, env(safe-area-inset-left));
  bottom: max(26px, env(safe-area-inset-bottom));
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -.25px;
  text-decoration: none;
  opacity: .69;
}

.domain-dot { padding: 0 .4px; }
.site-name:focus-visible { outline: 1px dashed currentColor; outline-offset: 6px; }

.sea-button {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 42%;
  width: 58%;
  height: 45%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.sea-button:focus-visible { outline: 1px dashed #728f97; outline-offset: -9px; }

.motion-toggle {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(13px, env(safe-area-inset-bottom));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  background: transparent;
  opacity: .56;
  cursor: pointer;
  touch-action: manipulation;
}

.motion-toggle svg { display: block; width: 22px; height: 22px; }
.motion-toggle path { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[data-state="paused"] .icon-pause { display: none; }
.motion-toggle[data-state="paused"] .icon-play { display: block; }
.motion-toggle:hover { opacity: .9; }
.motion-toggle:focus-visible { outline: 1px dashed currentColor; outline-offset: -3px; opacity: 1; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .scene-frame {
    width: min(100vw, calc(100vh * 390 / 760));
    width: min(100vw, calc(100svh * 390 / 760));
    aspect-ratio: 390 / 760;
  }

  /* The fixed viewBox is cropped to x=405..795; these anchors compose that slice. */
  #sun-anchor { transform: translate(720px, 345px) scale(.82); }
  #moon-anchor { transform: translate(723px, 278px) scale(.82); }
  #cloud-anchor { transform: translate(665px, 372px) scale(.75); }
  #fish-anchor { transform: translate(695px, 551px) scale(.74); }
  #seawall { transform: translate(130px, 5px); }
  #bro-anchor { transform: translate(533px, 429px) scale(.92); }
  #phone-anchor { transform: translate(480px, 429px) scale(.92); }
  #hand-anchor { transform: translate(634px, 601px) scale(.88); }
  .moon-clip { height: 298px; }
  .mobile-water { display: initial; }
  .water-marks { stroke-width: 1.1; }
  .scene-anchor .ink { stroke-width: 1.9; }
  .scene-anchor .faint-line { stroke-width: 1.35; }

  .sea-button {
    top: 56%;
    left: 0;
    width: 100%;
    height: 37%;
    clip-path: polygon(53% 0, 100% 0, 100% 100%, 0 100%, 0 71%, 53% 65%);
  }

  .site-name { left: max(21px, env(safe-area-inset-left)); bottom: max(23px, env(safe-area-inset-bottom)); font-size: 13px; }
  .motion-toggle { right: max(12px, env(safe-area-inset-right)); bottom: max(9px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
