/* catB Studio & Cecilia — Stockholm official entrance
   Palette: grey-white, paper, light wood, sage, cool blue, muted red */

:root {
  --paper: #f4f1ec;
  --paper-2: #ece8e0;
  --paper-3: #e4dfd4;
  --ink: #26241f;
  --ink-soft: #6f6a60;
  --ink-faint: #9b9588;
  --wood: #c9a878;
  --sage: #a9b3a2;
  --blue: #8fa4b4;
  --red: #b96a5e;
  --line: rgba(38, 36, 31, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(143, 164, 180, 0.35); }

/* ---------- 01 · Hero / the room ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(#f3f1ec, #ece7dd);
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.hero-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3.4vw, 44px) clamp(20px, 4.4vw, 60px);
  pointer-events: none;
}

.hero-ui a { pointer-events: auto; }

.topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.wordmark {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.04em;
}

.topline-note {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-copy {
  max-width: 620px;
  margin-top: auto;
  padding-bottom: clamp(8px, 2vh, 26px);
  position: relative;
}

/* a soft breath of paper behind the copy — not a card */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -80px -110px -50px -90px;
  background: radial-gradient(ellipse at 32% 60%, rgba(244, 241, 236, 0.96), rgba(244, 241, 236, 0.66) 48%, transparent 74%);
  z-index: -1;
  filter: blur(2px);
}

.brand {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.brand-sub {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--ink-soft);
  margin-top: 6px;
}

.brand-sub em { font-style: italic; color: var(--ink); }

.tagline {
  margin-top: 18px;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-foot {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

.hero-foot .scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2px;
}

.foot-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
}

.scroll-cue {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--ink-faint), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: 0; top: -14px;
  width: 1px; height: 14px;
  background: var(--ink);
  animation: cue 2.4s ease-in-out infinite;
}

@keyframes cue {
  0%   { top: -14px; opacity: 0; }
  35%  { opacity: 1; }
  100% { top: 46px; opacity: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.35s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: #3a372f;
  box-shadow: 0 10px 26px rgba(38, 36, 31, 0.18);
}

.btn-ghost { background: transparent; }

.btn-ghost:hover { background: rgba(38, 36, 31, 0.05); }

.btn-quiet {
  border-color: transparent;
  padding-left: 10px;
  padding-right: 10px;
  color: var(--ink-soft);
}

.btn-quiet:hover { color: var(--ink); }

.btn-quiet .arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-quiet:hover .arrow { transform: translateY(3px); }

.btn-lg { padding: 16px 38px; font-size: 14px; }

/* ---------- sound toggle ---------- */

.sound-toggle {
  position: fixed;
  right: clamp(16px, 2.6vw, 34px);
  bottom: clamp(16px, 2.6vw, 26px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 236, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sound-toggle:hover {
  color: var(--ink);
  border-color: rgba(38, 36, 31, 0.45);
  transform: translateY(-2px);
}

body.sound-on .sound-toggle {
  color: var(--ink);
  border-color: rgba(38, 36, 31, 0.4);
}

.sound-toggle.sound-hint {
  animation: hint 2.8s ease-in-out 2;
}

@keyframes hint {
  0%, 100% { transform: translateY(0); }
  12%      { transform: translateY(-4px); }
  24%      { transform: translateY(0); }
}

.s-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.s-bars i {
  width: 2px;
  border-radius: 1px;
  background: currentColor;
  height: 4px;
  transform-origin: bottom;
}

.s-bars i:nth-child(2) { height: 8px; }
.s-bars i:nth-child(3) { height: 11px; }
.s-bars i:nth-child(4) { height: 6px; }

body.sound-on .s-bars i {
  animation: wave 1.6s ease-in-out infinite;
}

body.sound-on .s-bars i:nth-child(2) { animation-delay: 0.18s; }
body.sound-on .s-bars i:nth-child(3) { animation-delay: 0.36s; }
body.sound-on .s-bars i:nth-child(4) { animation-delay: 0.54s; }

/* ---------- shared section bits ---------- */

.kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.kicker::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 18px auto 0;
  background: var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- 02 · residents ---------- */

.residents {
  padding: clamp(90px, 13vh, 150px) clamp(20px, 5vw, 60px) clamp(70px, 10vh, 120px);
  background:
    linear-gradient(rgba(244, 241, 236, 0), rgba(236, 232, 224, 0.6) 60%, rgba(244, 241, 236, 0)),
    var(--paper);
}

.residents-grid {
  max-width: 980px;
  margin: clamp(50px, 7vh, 80px) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
}

.resident { text-align: center; }

.resident:nth-child(2) { transition-delay: 0.12s; }

.resident-visual {
  aspect-ratio: 4 / 5;
  max-width: 380px;
  margin: 0 auto;
  overflow: hidden;
}

.resident-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sticker-card {
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(38, 36, 31, 0.06), 0 22px 44px -22px rgba(38, 36, 31, 0.28);
  transform: rotate(-1deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sticker-card:hover { transform: rotate(0.4deg) translateY(-4px); }

.framed {
  border: 10px solid #fdfdfb;
  outline: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(38, 36, 31, 0.06), 0 22px 44px -22px rgba(38, 36, 31, 0.28);
  transform: rotate(0.8deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.framed:hover { transform: rotate(0deg) translateY(-4px); }

.resident-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin-top: 30px;
}

.resident-line {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.voice-row {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.wave i {
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: var(--blue);
  animation: wave 1.8s ease-in-out infinite;
}

.wave i:nth-child(2)  { animation-delay: 0.10s; height: 10px; }
.wave i:nth-child(3)  { animation-delay: 0.20s; height: 15px; }
.wave i:nth-child(4)  { animation-delay: 0.30s; height: 9px; }
.wave i:nth-child(5)  { animation-delay: 0.40s; height: 17px; }
.wave i:nth-child(6)  { animation-delay: 0.50s; height: 12px; }
.wave i:nth-child(7)  { animation-delay: 0.60s; height: 19px; }
.wave i:nth-child(8)  { animation-delay: 0.70s; height: 11px; }
.wave i:nth-child(9)  { animation-delay: 0.80s; height: 16px; }
.wave i:nth-child(10) { animation-delay: 0.90s; height: 8px; }
.wave i:nth-child(11) { animation-delay: 1.00s; height: 14px; }
.wave i:nth-child(12) { animation-delay: 1.10s; height: 10px; }
.wave i:nth-child(13) { animation-delay: 1.20s; height: 13px; }
.wave i:nth-child(14) { animation-delay: 1.30s; height: 7px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.55; }
  50%      { transform: scaleY(1.25); opacity: 1; }
}

.voice-note {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- 03 · doors ---------- */

.doors {
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 60px) clamp(90px, 13vh, 150px);
  text-align: center;
}

.doors-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: -0.01em;
  margin-top: clamp(38px, 5vh, 56px);
}

.doors-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(32px, 4.5vh, 44px);
  flex-wrap: wrap;
  transition-delay: 0.1s;
}

.doors-soon {
  margin-top: 34px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition-delay: 0.2s;
}

.soon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.8;
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.25); opacity: 0.95; }
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 60px) 42px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.foot-sep { opacity: 0.5; }

.foot-year { margin-left: 6px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .residents-grid { grid-template-columns: 1fr; gap: 70px; }
  .topline-note { display: none; }
}

@media (max-width: 640px) {
  .hero { min-height: 100svh; }

  .hero-ui { padding: 18px 20px 22px; }

  .hero-copy::before {
    inset: -50px -60px -30px -50px;
  }

  .brand { font-size: 40px; }

  .tagline { font-size: 14px; margin-top: 12px; }

  .hero-actions { gap: 8px; margin-top: 20px; }

  .btn { padding: 11px 20px; font-size: 12px; }

  .btn-quiet { padding-left: 6px; padding-right: 6px; }

  .hero-foot .foot-line { max-width: 60%; }

  .doors-actions { flex-direction: column; align-items: center; }

  .btn-lg { width: min(320px, 86vw); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave i, .s-bars i, .soon-dot, .scroll-cue::after, .sound-toggle.sound-hint { animation: none; }
}
