/*
  Shared stylesheet for round 4 (12-greenhouse, 13-y2k-mint, 14-matcha-peach, 15-jewel-garden).
  Every colour and the heading font come from the theme.css in each folder.
  The "Jocelyn" script (Italianno) stays the same in all of them.
*/

:root {
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-script: "Italianno", cursive;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.05), 0 8px 24px rgba(20, 30, 25, 0.07);
  --shadow-lift: 0 2px 4px rgba(20, 30, 25, 0.06), 0 18px 40px rgba(20, 30, 25, 0.12);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

p { text-wrap: pretty; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface);
}
.skip-link:focus { left: 16px; }

.logo {
  font-family: var(--font-script);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Status bar ---------- */
.status-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 46px;
  padding: 0 var(--gutter);
  background: var(--status-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.6s ease;
}
.js:not(.entered) .status-bar {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.status-bar .logo { justify-self: start; margin-top: 3px; }
.status-time { font-variant-numeric: tabular-nums; }
.status-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.signal { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.signal i { width: 3px; border-radius: 1px; background: var(--ink); }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 8px; }
.signal i:nth-child(4) { height: 10px; }
.signal i:nth-child(5) { height: 12px; opacity: 0.25; }
.battery {
  position: relative;
  width: 26px;
  height: 12px;
  padding: 1.5px;
  border: 1.5px solid var(--ink);
  border-radius: 3.5px;
}
.battery::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: var(--ink);
}
.battery span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: 1.5px;
  background: var(--accent);
}

/* ---------- Intro: the hero you slide into ---------- */
.intro {
  position: relative;
  z-index: 150;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--hero-bg);
  transition: opacity 0.9s ease;
}
.js .intro {
  position: fixed;
  inset: 0;
}
.js:not(.entered) body { overflow: hidden; }

.intro-zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 1.1s cubic-bezier(0.7, 0, 0.3, 1), filter 1.1s ease;
}

/* The orchids are painted here, only where the light has been */
.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.intro-stage {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding: 0 var(--gutter);
  text-align: center;
}

.hello {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 0.35em;
  margin: 0;
  font-weight: 400;
  line-height: 1;
}
.hello .hi {
  margin-right: 0.15em;
  font-family: var(--font-body);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--soft);
}
.hello .name {
  font-family: var(--font-script);
  font-size: clamp(76px, 10vw, 138px);
  line-height: 0.85;
  color: var(--ink);
}

.tagline {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--soft);
}

.intro .hello,
.intro .tagline { text-shadow: 0 0 18px var(--hero-bg), 0 0 4px var(--hero-bg); }
.intro .hello { animation: rise 1.4s var(--ease) both; }
.intro .tagline { animation: rise 1.4s 0.3s var(--ease) both; }

.intro.is-entering { opacity: 0; pointer-events: none; }
.intro.is-entering .intro-zoom {
  transform: scale(2.8);
  filter: blur(3px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.js .app {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.9s 0.2s ease, transform 1.2s 0.2s var(--ease);
}
.js.entered .app {
  opacity: 1;
  transform: none;
}
.skip-hero .intro { display: none; }
.skip-hero .app { transition: none; }

/* ---------- Slide to enter ---------- */
.unlock {
  position: absolute;
  bottom: clamp(48px, 10vh, 96px);
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  width: min(320px, calc(100% - 48px));
  height: 58px;
  padding: 4px;
  translate: -50% 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--track);
  box-shadow: inset 0 1px 3px rgba(20, 30, 25, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: rise 1.4s 0.6s var(--ease) both;
}

.unlock-knob {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--knob-bottom) 100%);
  color: var(--accent);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(20, 30, 25, 0.16);
  cursor: grab;
  touch-action: none;
  translate: var(--knob, 0px) 0;
}
.unlock-knob::before {
  content: "";
  position: absolute;
  inset: 1px 1px 52% 1px;
  border-radius: 11px 11px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2));
}
.unlock-knob svg { position: relative; width: 22px; height: 22px; }
.unlock.is-sliding .unlock-knob { cursor: grabbing; }
.unlock.is-done .unlock-knob,
.unlock.is-resetting .unlock-knob { transition: translate 0.45s var(--ease); }

.unlock-text {
  position: absolute;
  inset: 0 0 0 76px;
  display: grid;
  place-items: center start;
  padding-left: 6px;
  font-size: 17px;
  font-weight: 500;
  color: transparent;
  background: linear-gradient(90deg, var(--soft) 0%, var(--soft) 40%, var(--ink) 50%, var(--soft) 60%, var(--soft) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3.2s linear infinite;
  pointer-events: none;
}
.unlock.is-sliding .unlock-text { opacity: calc(1 - var(--progress, 0) * 1.6); }

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -150% 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 128px) var(--gutter); }

.section-head {
  max-width: var(--max);
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.kicker {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kicker);
}

.section-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: calc(clamp(30px, 3.6vw, 44px) * var(--head-scale, 1));
  font-weight: var(--head-weight, 600);
  line-height: 1.1;
  letter-spacing: var(--head-tracking, -0.02em);
  color: var(--ink);
}

.hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
  text-align: center;
}

.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.9s ease, translate 0.9s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

.develop img {
  filter: grayscale(1) brightness(1.25) contrast(0.75) blur(2px);
  opacity: 0.75;
  transition: filter 2.6s 0.2s ease, opacity 2.6s 0.2s ease;
}
.no-js .develop img,
.develop.is-visible img {
  filter: none;
  opacity: 1;
}

.thumb img {
  filter: grayscale(1) contrast(0.92) brightness(1.04);
  transition: filter 1.2s ease, transform 1.2s var(--ease);
}
[data-glow]:hover .thumb img,
[data-glow]:focus-visible .thumb img { filter: none; }

.glow-edge { position: relative; }
.glow-edge::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, -400px) var(--my, -400px), var(--glow), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), filter 0.3s;
}
.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ---------- Home: the island ---------- */
.island-screen {
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 80px var(--gutter) 40px;
}

.map-scroll {
  width: 100%;
  max-width: min(1040px, max(560px, calc((100svh - 230px) * 1.67)));
  margin: 0 auto;
}
.map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.map text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
  text-anchor: middle;
}

/* Island colours */
.i-cloud { fill: var(--cloud); stroke: var(--cloud-line); stroke-width: 1.5; }
.i-land { fill: var(--land); stroke: var(--land-edge); stroke-width: 4; }
.i-land-side { fill: var(--land-side); }
.i-pond { fill: var(--pond); stroke: var(--land-edge); stroke-width: 3; }
.i-path { fill: none; stroke: var(--path); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 12; }
.i-trunk { fill: var(--trunk); }
.i-tree { fill: var(--tree); }
.i-tree-hi { fill: var(--tree-hi); }
.i-wall { fill: var(--wall); stroke: var(--wall-line); stroke-width: 1.5; }
.i-wall-side { fill: var(--wall-side); }
.i-door { fill: var(--door); }
.i-window { fill: url(#warmWindow); stroke: var(--wall-line); stroke-width: 1.5; }
.i-shade { fill: url(#roofShine); }
.i-side-shade { fill: #000; opacity: 0.16; }
.i-roof-studio { fill: var(--roof-studio); }
.i-roof-gallery { fill: var(--roof-gallery); }
.i-roof-house-a { fill: var(--roof-house-a); }
.i-roof-house-b { fill: var(--roof-house-b); }
.i-art-frame { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.i-art-1 { fill: var(--art-1); }
.i-art-2 { fill: var(--art-2); }
.i-art-3 { fill: none; stroke: var(--art-3); stroke-width: 1.8; stroke-linecap: round; }
.i-label { fill: var(--surface); stroke: var(--line); }
.i-me-label { fill: var(--me-bg); }
.map .i-me-text { fill: var(--me-ink); }
.s-win-top { stop-color: var(--win-top); }
.s-win-bottom { stop-color: var(--win-bottom); }

.place { cursor: pointer; outline: none; }
.place .bob {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.place:hover .bob,
.place:focus-visible .bob { transform: translateY(-7px) scale(1.03); }
.place .i-label { transition: fill 0.3s, stroke 0.3s; }
.place:hover .i-label,
.place:focus-visible .i-label {
  fill: var(--ink);
  stroke: var(--ink);
}
.place:hover text,
.place:focus-visible text { fill: var(--surface); }

.me { cursor: pointer; outline: none; }
.me-body { transform-box: fill-box; transform-origin: 50% 100%; }
.me.is-hopping .me-body { animation: hop 0.6s var(--ease); }
.me:focus-visible .i-me-label { stroke: var(--ink); stroke-width: 2; }
@keyframes hop {
  0% { transform: translateY(0); }
  35% { transform: translateY(-22px) rotate(-4deg); }
  65% { transform: translateY(0) scaleY(0.94); }
  100% { transform: translateY(0); }
}

.cloud { animation: drift 20s ease-in-out infinite alternate; }
.cloud-2 { animation-duration: 26s; animation-direction: alternate-reverse; }
@keyframes drift {
  from { translate: -16px 0; }
  to { translate: 16px 0; }
}

.swipe-hint { display: none; }

.scroll-cue {
  display: block;
  margin: 8px auto 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
  text-align: center;
  text-decoration: none;
}
.scroll-cue span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Dock: waits under "Scroll for more", then sticks to the bottom ---------- */
.dock-slot {
  position: relative;
  height: 108px;
  margin-top: 40px;
}

.dock {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 120;
  display: flex;
  gap: clamp(10px, 2.4vw, 22px);
  padding: 12px clamp(14px, 3vw, 22px) 8px;
  translate: -50% 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: linear-gradient(180deg, var(--dock-top), var(--dock-bottom));
  box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(20, 30, 25, 0.16);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
.dock.is-docked {
  position: fixed;
  top: auto;
  bottom: 14px;
}

.app-link {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--ink);
  text-decoration: none;
}

.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(20, 30, 25, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--icon-top), var(--icon-bottom));
  color: var(--icon-ink);
  box-shadow: 0 2px 5px rgba(20, 30, 25, 0.16);
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.app-icon::after {
  content: "";
  position: absolute;
  inset: -20% -20% 52% -20%;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.1));
  pointer-events: none;
}
.app-link:nth-child(1) .app-icon { --icon-top: var(--ic1-top); --icon-bottom: var(--ic1-bottom); --icon-ink: var(--ic1-ink); }
.app-link:nth-child(2) .app-icon { --icon-top: var(--ic2-top); --icon-bottom: var(--ic2-bottom); --icon-ink: var(--ic2-ink); }
.app-link:nth-child(3) .app-icon { --icon-top: var(--ic3-top); --icon-bottom: var(--ic3-bottom); --icon-ink: var(--ic3-ink); }
.app-link:nth-child(4) .app-icon { --icon-top: var(--ic4-top); --icon-bottom: var(--ic4-bottom); --icon-ink: var(--ic4-ink); }
.app-link:nth-child(5) .app-icon { --icon-top: var(--ic5-top); --icon-bottom: var(--ic5-bottom); --icon-ink: var(--ic5-ink); }
.app-icon svg { position: relative; z-index: 1; width: 26px; height: 26px; }
.app-label { font-size: 12px; font-weight: 600; }
.app-link:hover .app-icon { transform: translateY(-6px) scale(1.06); }
.app-link:active .app-icon { transform: scale(0.94); }

/* ---------- Bio: player card ---------- */
.about { background: var(--band); }

.player {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(20px, 3.5vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
}
.player::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--sx, 30%) var(--sy, 0%), rgba(255, 255, 255, 0.7), transparent 55%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.player-photo { margin: 0; }
.player-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 49% 30%;
  border-radius: 20px;
}
.player-tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tag-ink);
}
.player-name {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(64px, 7vw, 84px);
  font-weight: 400;
  line-height: 0.95;
  color: var(--ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--chip-ink);
}
.chips li:nth-child(2) { background: var(--chip2-bg); color: var(--chip2-ink); }
.player-line {
  max-width: 36ch;
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.55;
}

/* ---------- Projects: arch cards, staggered ---------- */
.arch-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 340px));
  justify-content: center;
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
  max-width: var(--max);
  margin: 0 auto;
}

.arch-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 180px 180px 22px 22px;
  background: var(--card-1);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
}
.arch-row > :nth-child(2) .arch-card { background: var(--card-2); }
.arch-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}
.arch-thumb {
  aspect-ratio: 10 / 9;
  overflow: hidden;
  border-radius: 170px 170px 14px 14px;
  background: var(--surface);
}
.arch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.arch-card:hover .arch-thumb img { transform: scale(1.04); }
.arch-body { padding: 18px 12px 12px; }
.meta {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
}
.arch-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-size: calc(22px * var(--head-scale, 1));
  font-weight: var(--head-weight, 600);
  line-height: 1.2;
  letter-spacing: var(--head-tracking, -0.01em);
  color: var(--ink);
}
.arch-body p:not(.meta) { margin: 0 0 14px; font-size: 15.5px; }
.arch-link { font-size: 14px; font-weight: 600; color: var(--accent); }
.arch-link span { display: inline-block; transition: transform 0.3s; }
.arch-card:hover .arch-link span { transform: translateX(5px); }

.section.projects { padding-bottom: 180px; }

/* ---------- "Coming soon" ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  z-index: 400;
  max-width: calc(100% - 32px);
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: none) {
  .thumb img { filter: none; }
}

@media (min-width: 721px) {
  .arch-row > :nth-child(2) { margin-top: 100px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .map-scroll {
    overflow-x: auto;
    width: auto;
    max-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .map-scroll::-webkit-scrollbar { display: none; }
  .map { width: 760px; max-width: none; }
  .swipe-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 13px;
    text-align: center;
    color: var(--soft);
  }
  .player { grid-template-columns: 1fr; }
  .player-photo { width: min(100%, 240px); }
  .app-icon { width: 46px; height: 46px; }
  .app-icon svg { width: 22px; height: 22px; }
  .app-label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
