:root { --glass: rgba(255,255,255,0.07); --ink: #fff; }

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

html, body, #stage, #hud, .sheet, .path-grid, .fields {
  overflow: hidden;
}

html, body {
  width: 100%;
  height: 100%;
  background: #e8eef2;
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  user-select: none;
}

#stage { position: fixed; inset: 0; }

.plate, #vignette, #gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.plate {
  object-fit: cover;
  object-position: center 32%;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.plate.idle { transition: opacity 1.55s linear; }
.plate.on { opacity: 1; }

#still { z-index: 1; }
#idle-a, #idle-b { z-index: 2; }
#clip { z-index: 3; }
#gl { z-index: 7; pointer-events: none; mix-blend-mode: screen; }
#vignette {
  z-index: 8;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 46%, rgba(8, 16, 24, 0.18) 78%, rgba(8, 16, 24, 0.42) 100%),
    linear-gradient(to right, rgba(6, 12, 18, 0.38), transparent 14%, transparent 86%, rgba(6, 12, 18, 0.38)),
    linear-gradient(to bottom, rgba(6, 12, 18, 0.32), transparent 16%, transparent 78%, rgba(6, 12, 18, 0.28));
}

#chrome {
  position: absolute;
  top: 2.2vh;
  left: 2.4vw;
  right: 2.4vw;
  z-index: 16;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: none;
}

#chrome > * { pointer-events: auto; }

#logo-wrap {
  position: relative;
  justify-self: center;
  overflow: hidden;
  border-radius: 8px;
}

#logo {
  height: clamp(48px, 7.5vh, 92px);
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.35));
}

.sheen {
  position: absolute;
  inset: -10%;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.55) 50%, transparent 62%);
  transform: translateX(-140%);
  pointer-events: none;
}

.sheen.go {
  animation: glass-sheen 1.15s ease;
}

.rail {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.phone-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 1rem 0.35rem 0.35rem;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(18px, 2vw, 32px);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  animation: glow-breathe 3.8s ease-in-out 1.15s infinite;
}

.phone-num { padding-right: 0.2rem; }

.icon-btn {
  width: clamp(40px, 4.4vw, 56px);
  height: clamp(40px, 4.4vw, 56px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: #fff;
  text-decoration: none;
  flex: none;
}

.icon-btn svg {
  width: 54%;
  height: 54%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-ico {
  animation: handset-close 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.socials {
  display: flex;
  gap: 0.45rem;
}

.socials .icon-btn:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.16);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}

#weather {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 999px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

#weather [data-temp] {
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1;
}

.wx-meta {
  display: flex;
  flex-direction: column;
  font-size: clamp(14px, 1.3vw, 20px);
  line-height: 1.15;
}

#weather [data-edit] {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  cursor: pointer;
}

#weather [data-form] { display: flex; }
#weather [data-form][hidden] { display: none !important; }
#weather [data-input] {
  width: 10rem;
  border: 0;
  outline: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font: inherit;
  font-size: 18px;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  caret-color: #fff;
}

#caption {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 14vh;
  z-index: 12;
  text-align: center;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
#caption.on { opacity: 1; }

#hud {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  z-index: 14;
  width: min(92vw, 1400px);
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem;
  width: 100%;
}

.path-grid.inner { grid-template-columns: 1fr 1fr; }

.reply {
  appearance: none;
  border: 0;
  padding: 1.35rem 1.5rem;
  min-height: 5.2rem;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  color: #fff;
  font: inherit;
  font-size: clamp(22px, 2.4vw, 36px);
  text-decoration: none;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  border-radius: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.reply.ready {
  animation: fly-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), background 0.28s ease;
}

.reply.ready:hover {
  background: rgba(255,255,255,0.14);
  transform: scale(1.08);
}

.sheet {
  width: 100%;
  max-height: 62vh;
  padding: 1.8rem 2rem 2rem;
  background: var(--glass);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fly-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sheet-wide { height: 50vh; }
.sheet-wide iframe {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.sheet-kicker {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(14px, 1.4vw, 20px);
  opacity: 0.75;
}

.sheet-copy {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1.4rem;
}

.sheet label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: clamp(16px, 1.5vw, 22px);
}

.sheet input, .sheet select {
  border: 0;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font: inherit;
  font-size: clamp(22px, 2.2vw, 32px);
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  caret-color: #fff;
}

.reasons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.1rem;
  margin: 0.15rem 0 0.35rem;
}

.reasons .reply {
  min-height: 3.6rem;
  font-size: clamp(16px, 1.6vw, 24px);
  padding: 0.7rem 0.8rem;
}

.reasons .reply.on {
  background: rgba(255,255,255,0.22);
}

.send {
  border: 0;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font: inherit;
  font-size: clamp(22px, 2.2vw, 32px);
  padding: 1rem 1.2rem;
  margin-top: 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.send:hover { transform: scale(1.06); }

.ask-bar {
  display: flex;
  width: 100%;
  gap: 0.7rem;
  padding: 0.45rem 0.5rem 0.45rem 1.2rem;
  background: var(--glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 999px;
  animation: fly-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#ask-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(22px, 2.2vw, 32px);
  caret-color: #fff;
}

.ask-bar .send { padding: 0.75rem 1.4rem; }

#back {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font: inherit;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(16px, 1.6vw, 22px);
  cursor: pointer;
  margin-top: 0.85rem;
  padding: 0.55rem 0.2rem;
}

#threshold {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 1.2rem;
  background: #f4f1ec;
  cursor: pointer;
  transition: opacity 1.2s ease;
  overflow: hidden;
}

.enter-phone {
  position: absolute;
  top: 3.2vh;
  right: 3vw;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1.1rem 0.35rem 0.35rem;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  color: #1e3a5f;
  text-decoration: none;
  font-size: clamp(20px, 2.3vw, 34px);
  letter-spacing: 0.05em;
  animation: glow-breathe 3.8s ease-in-out 1.15s infinite;
}

.enter-phone .icon-btn {
  background: rgba(30,58,95,0.08);
  color: #1e3a5f;
}

.enter-logo-wrap {
  position: relative;
  overflow: hidden;
  width: min(52vw, 720px);
}

.enter-logo {
  width: 100%;
  height: auto;
  display: block;
  animation: arrive 1.4s ease both;
}

#threshold .place {
  font-size: clamp(22px, 2.4vw, 36px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #6b756f;
  animation: arrive 1.4s ease 0.15s both;
}

#threshold.gone { opacity: 0; pointer-events: none; }

@keyframes arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fly-reveal {
  from { opacity: 0; filter: blur(16px); transform: translateY(18px) scale(0.92); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

@keyframes handset-close {
  0% { transform: rotate(-28deg) scale(1.35); opacity: 0.35; }
  60% { transform: rotate(10deg) scale(1.04); opacity: 1; }
  100% { transform: rotate(0) scale(1); }
}

@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 22px 5px rgba(255,255,255,0.32); }
}

@keyframes glass-sheen {
  from { transform: translateX(-140%); }
  to { transform: translateX(140%); }
}

[hidden] { display: none !important; }
