@font-face {
  font-family: "VT323";
  src: url("/assets/fonts/vt323-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --sky: #2f6fd8;
  --sky-lite: #4f92e6;
  --deep: #1b3f77;
  --ink: #12305c;
  --ice: #eef4fb;
  --snow: #ffffff;
  --red: #e23b2b;
  --red-deep: #b32a1e;
  --face: #d7e4f4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--sky); }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: "VT323", "Courier New", ui-monospace, monospace;
  font-size: 21px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

.wordmark, .statement-stack span, .statement-sub, .meter-label,
.gallery-text, .contract-title, .foot p:first-child {
  font-family: Impact, "Haettenschweiler", "Arial Narrow Bold", "Arial Black", sans-serif;
  letter-spacing: 0.01em;
}

/* ---------- bevel frame (Win9x outset) ---------- */
.frame {
  margin: 0;
  background: var(--face);
  border: 4px solid;
  border-color: #ffffff #7d93b3 #7d93b3 #ffffff;
  box-shadow: 0 0 0 2px var(--deep);
  padding: 8px;
}
.frame img { border: 2px solid var(--deep); }

/* ---------- titlebar ---------- */
.titlebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(#2f6fd8, #1b3f77);
  color: var(--snow);
  border-bottom: 3px solid var(--deep);
  padding: 6px 8px 6px 12px;
  font-size: 22px;
}
.tb-name { display: flex; align-items: center; gap: 9px; letter-spacing: 0.03em; }
.tb-dot {
  width: 14px; height: 14px;
  background: var(--red);
  border: 2px solid var(--snow);
  display: inline-block;
}
.tb-btns { display: flex; gap: 5px; }
.tb-btn {
  width: 26px; height: 24px;
  display: grid;
  place-items: center;
  background: var(--ice);
  color: var(--ink);
  border: 3px solid;
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  font-size: 15px;
  text-decoration: none;
}
button.tb-btn { -webkit-appearance: none; appearance: none; font: inherit; cursor: pointer; }
.tb-x:hover { background: var(--red); color: var(--snow); }
.tb-x:active { border-color: #6f6f6f #ffffff #ffffff #6f6f6f; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 34px 20px 44px; }
.ocean {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.10) 0 6px, rgba(27,63,119,0.10) 6px 12px),
    linear-gradient(#3f7fd8, #1b3f77);
  animation: swell 7s ease-in-out infinite;
  z-index: 0;
}
@keyframes swell {
  0%, 100% { background-position: 0 0, 0 0; }
  50% { background-position: 40px 0, 0 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: center;
}
.hero-art { width: 100%; max-width: 460px; justify-self: center; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.float { animation: float 5s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-14px) rotate(0.4deg); }
}

.hero-copy { color: var(--snow); }
.wordmark {
  font-size: clamp(3.6rem, 13vw, 7rem);
  line-height: 0.92;
  margin: 0 0 14px;
  color: var(--snow);
  text-shadow: 5px 5px 0 var(--deep), 8px 8px 0 rgba(18,48,92,0.4);
}
.tagline {
  font-family: "VT323", monospace;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--snow);
  background: var(--red);
  border: 3px solid var(--deep);
  box-shadow: 4px 4px 0 var(--deep);
  padding: 8px 12px;
  display: inline-block;
}
.say { margin: 0 0 22px; color: var(--ice); font-size: 1.4rem; line-height: 1.3; max-width: 24em; }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font-family: "VT323", monospace;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  padding: 10px 22px;
  border: 4px solid;
  border-color: #ffffff #7d93b3 #7d93b3 #ffffff;
  box-shadow: 4px 4px 0 var(--deep);
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}
.btn-red { background: var(--red); color: var(--snow); }
.btn-ice { background: var(--ice); color: var(--ink); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--deep); }
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--deep);
  border-color: #7d93b3 #ffffff #ffffff #7d93b3;
}
.btn.copied { background: #2f9e44; color: var(--snow); }

/* ---------- chill meter ---------- */
.meter-wrap { padding: 40px 20px; display: flex; justify-content: center; }
.meter-box { width: 100%; max-width: 520px; text-align: center; }
.meter-label {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin: 4px 0 12px;
  color: var(--ink);
}
.meter-track {
  height: 30px;
  background: var(--snow);
  border: 3px solid var(--deep);
  padding: 3px;
  margin-bottom: 10px;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--sky) 0 14px, var(--sky-lite) 14px 20px);
  transition: width 0.45s cubic-bezier(.2,.7,.3,1);
}
.meter-status { margin: 0 0 16px; font-size: 1.2rem; min-height: 1.4em; }
.meter-system {
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--ice);
  background: var(--deep);
  border: 2px solid var(--ink);
  padding: 6px 10px;
  margin: 14px 0 0;
}

/* ---------- gallery ---------- */
.gallery { max-width: 1080px; margin: 20px auto; padding: 24px 20px 10px; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.gallery .frame { cursor: pointer; }
.gallery .frame:hover { box-shadow: 0 0 0 2px var(--red); }
.gallery .frame img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-text {
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1.15;
  color: var(--snow);
  text-shadow: 3px 3px 0 var(--deep);
  margin: 26px 0 6px;
}
.gallery-text strong { color: #ffd43b; }

/* ---------- statement ---------- */
.statement { text-align: center; padding: 62px 20px 70px; }
.statement-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 18px;
}
.statement-stack span {
  font-size: clamp(3rem, 15vw, 9rem);
  line-height: 0.9;
  color: var(--snow);
  text-shadow: 6px 6px 0 var(--deep);
}
.statement-sub {
  font-family: "VT323", monospace;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--ice);
  margin: 0;
}

/* ---------- contract ---------- */
.contract { padding: 0 20px 70px; display: flex; justify-content: center; }
.contract-box { width: 100%; max-width: 520px; text-align: center; }
.contract-title {
  letter-spacing: 0.06em;
  font-size: 1.35rem;
  margin: 4px 0 12px;
}
.contract-box .btn { margin: 4px 0 0; }
.contract-x-label { margin: 20px 0 8px; font-size: 1.15rem; }

/* ---------- footer ---------- */
.foot {
  border-top: 3px solid var(--deep);
  background: var(--deep);
  color: var(--ice);
  text-align: center;
  padding: 22px 20px;
}
.foot p { margin: 0; }
.foot p:first-child { font-size: 1.4rem; letter-spacing: 0.06em; color: var(--snow); }
.foot-sub { font-size: 1rem; margin-top: 4px; }
.foot-run {
  font-family: "VT323", monospace;
  font-size: 0.95rem;
  color: var(--sky-lite);
  margin-top: 10px;
  letter-spacing: 0.04em;
}

/* ---------- retro window (image zoom + close dialog) ---------- */
.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(18, 48, 92, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.win {
  background: var(--face);
  border: 4px solid;
  border-color: #ffffff #7d93b3 #7d93b3 #ffffff;
  box-shadow: 0 0 0 2px var(--deep), 8px 8px 0 rgba(18, 48, 92, 0.5);
  max-width: min(92vw, 860px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(#2f6fd8, #1b3f77);
  color: var(--snow);
  padding: 5px 6px 5px 10px;
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}
.win-close {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 22px;
  flex: none;
  background: var(--ice);
  color: var(--ink);
  border: 3px solid;
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  font-family: "VT323", monospace;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.win-close:active { border-color: #6f6f6f #ffffff #ffffff #6f6f6f; }
.win-body { padding: 12px; overflow: auto; }
.win-body img {
  border: 2px solid var(--deep);
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  margin: 0 auto;
}
.win-dialog .win-body {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 360px;
  padding: 18px 20px;
  font-family: "VT323", monospace;
  font-size: 1.25rem;
  line-height: 1.3;
}
.win-ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--snow);
  border: 3px solid var(--deep);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 26px;
  line-height: 1;
}
.win-msg strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.win-actions { padding: 0 20px 16px; text-align: right; }
.flake-burst { animation-iteration-count: 1; animation-fill-mode: forwards; }

/* ---------- snow ---------- */
.flake {
  position: fixed;
  top: -12px;
  color: var(--snow);
  font-size: 14px;
  pointer-events: none;
  z-index: 40;
  opacity: 0.85;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-20px) translateX(0); }
  100% { transform: translateY(105vh) translateX(28px); }
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero-copy { text-align: center; }
  .say { margin-left: auto; margin-right: auto; }
  .btn-row { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .float, .ocean, .flake { animation: none !important; }
  .btn:hover { transform: none; }
}
