@font-face {
  font-family: "Alte Haas Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.cdnfonts.com/s/8581/AlteHaasGroteskRegular.woff") format("woff");
}

@font-face {
  font-family: "Alte Haas Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://fonts.cdnfonts.com/s/8581/AlteHaasGroteskBold.woff") format("woff");
}

:root {
  --film-shadow: #072C12;
  --film-mid: #175822;
  --film-highlight: #B8CE38;
  --film-halation: #D8E44E;
  --film-accent: #E2A922;
  --film-drift: 1.0;
  --film-grain: 0.36;
  --ink: #F3F0EA;
  --font-display: "Alte Haas Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Alte Haas Grotesk", "Helvetica Neue", Arial, sans-serif;
}

/* Mineral analog film moods driven by time or interaction */
html[data-mood="forest"] {
  --film-shadow: #072C12;
  --film-mid: #175822;
  --film-highlight: #B8CE38;
  --film-halation: #D8E44E;
  --film-accent: #E2A922;
  --ink: #FFBDCA;
}

html[data-mood="burgundy"] {
  --film-shadow: #260B10;
  --film-mid: #53171E;
  --film-highlight: #BC5D4C;
  --film-halation: #D47E56;
  --film-accent: #E2A922;
  --ink: #A6F5D4;
}

html[data-mood="sky"] {
  --film-shadow: #213A4C;
  --film-mid: #385E77;
  --film-highlight: #8FB8CE;
  --film-halation: #DFC18F;
  --film-accent: #A8D672;
  --ink: #FFE0AA;
}

html[data-mood="sun"] {
  --film-shadow: #70311B;
  --film-mid: #96441E;
  --film-highlight: #E0B546;
  --film-halation: #ECCB63;
  --film-accent: #1E3D8F;
  --ink: #D8E9FF;
}

html[data-mood="powder"] {
  --film-shadow: #8CB4CF;
  --film-mid: #B5D2E6;
  --film-highlight: #E1EEF7;
  --film-halation: #F4F9FC;
  --film-accent: #C7D87A;
  --ink: #6E1F2A;
}

html[data-mood="linen"] {
  --film-shadow: #CFC3AE;
  --film-mid: #E6DDD0;
  --film-highlight: #F5EFE4;
  --film-halation: #FCF8F0;
  --film-accent: #7A9E7E;
  --ink: #1D4ED8;
}

html[data-mood="canary"] {
  --film-shadow: #D8BA2E;
  --film-mid: #F2DB4D;
  --film-highlight: #F9EB78;
  --film-halation: #FCF5A8;
  --film-accent: #8FB8CE;
  --ink: #3B124A;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background-color: var(--film-mid);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 4.5s ease, color 4.5s ease;
}

::selection {
  background: var(--ink);
  color: var(--film-mid);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Full-bleed WebGL film wash + stationary matte paper grain */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.film-wash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.film-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.14;
  mix-blend-mode: soft-light;
}

/* Page Shell */
.page {
  position: relative;
  z-index: 2;
  pointer-events: none;
  min-height: 100svh;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3.5vw, 52px) clamp(28px, 3.5vw, 44px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
}

/* Header */
.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 24px;
  height: auto;
  aspect-ratio: 806 / 724;
  display: block;
  -webkit-mask: url('../assets/brand/brand-mark.png') center / contain no-repeat;
  mask: url('../assets/brand/brand-mark.png') center / contain no-repeat;
}

.wordmark-horiz {
  height: 19px;
  width: auto;
  aspect-ratio: 1024 / 78;
  display: block;
  -webkit-mask: url('../assets/brand/wordmark-horizontal.png') center / contain no-repeat;
  mask: url('../assets/brand/wordmark-horizontal.png') center / contain no-repeat;
}

.tint-ink {
  content: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
  background-color: currentColor;
}

/* 1-Color Interactive Living Room Illustration */
.scene-stage {
  display: grid;
  place-items: center;
  padding: 8px 0;
}

.room-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}
.room-stage:active {
  cursor: grabbing;
}

@media (pointer: coarse) {
  .film-grain {
    display: none;
  }
}

/* Header Links */
.top-links {
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

.top-links a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  opacity: 0.94;
}

.top-links a:hover {
  opacity: 1;
  border-bottom-color: currentColor;
}

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

/* Footer */
.site-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
}

.signup-wrap {
  position: relative;
  pointer-events: auto;
  width: 100%;
  max-width: 260px;
}

.signup-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 5px;
}

.signup-form:has(input:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 6px;
  border-radius: 2px;
}

.signup-form[hidden] {
  display: none;
}

.signup-form input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  padding: 2px 0;
  outline: none;
}

.signup-form input::placeholder {
  color: currentColor;
  opacity: 0.78;
}

.signup-form input:-webkit-autofill,
.signup-form input:-webkit-autofill:hover,
.signup-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: currentColor;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-out 0s;
}

.signup-form.is-invalid {
  animation: gentleShake 0.32s ease;
}

@keyframes gentleShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.signup-form button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1;
  padding: 2px 2px;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.signup-form button:hover:not(:disabled) {
  opacity: 1;
  transform: translateX(2px);
}

.signup-form button:disabled {
  opacity: 0.55;
  cursor: default;
}

.signup-status {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.signup-form[hidden] + .signup-status:not([hidden]) {
  position: static;
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 6px;
  font-size: 14px;
  line-height: 1.3;
}

.signup-reset {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.signup-reset:hover {
  opacity: 1;
}

.footer-right {
  text-align: right;
}

.stay-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.nowrap {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    transition: none;
  }
  .signup-form.is-invalid {
    animation: none;
  }
}

@media (max-width: 680px) {
  .page {
    padding: calc(20px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));
    grid-template-rows: auto 1fr auto auto;
    gap: 20px;
  }
  .site-header {
    display: contents;
  }
  .brand-lockup {
    position: relative;
    z-index: 3;
    grid-row: 1;
    gap: 10px;
  }
  .brand-mark {
    width: 21px;
  }
  .wordmark-horiz {
    height: 16px;
  }
  .scene-stage {
    grid-row: 2;
  }
  .site-footer {
    grid-row: 3;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
  }
  .top-links {
    position: relative;
    z-index: 3;
    grid-row: 4;
    justify-content: space-between;
    padding-top: 8px;
    gap: 18px;
  }
  .top-links a {
    padding: 6px 0;
    font-size: 13px;
  }
  .signup-wrap {
    max-width: 100%;
  }
  .signup-form input {
    font-size: 16px;
  }
  .signup-form button {
    font-size: 18px;
    padding: 6px 4px 6px 12px;
  }
  .footer-right {
    text-align: left;
  }
  .stay-line {
    font-size: clamp(26px, 7.2vw, 32px);
    line-height: 1.08;
  }
}
