/* City Blok site. Colors are drawn from the game itself (docs/STYLE.md and its screenshots):
   canal teal, lawn green, sidewalk cream, clay roofs. Calm, warm, a little storybook, never toy-like.
   The style guide is site/STYLE.md: keep the two in step. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #F7F3EA;      /* sidewalk cream */
  --paper-2: #EFE9DC;
  --ink: #233330;        /* deep canal ink */
  --body: #45524D;
  --dim: #6F7A72;
  --moss: #4F7F4A;
  --lawn: #E6EDDC;       /* pale lawn wash */
  --canal: #2E6E70;
  --canal-deep: #1F4F52;
  --clay: #D2653E;
  --marigold: #F2A541;
  --line: #DCD4C4;
  --sky-top: #A9CFE6;
  --sky: #E3EEEC;
  --display: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.015em;
}
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--moss); }
p { margin: 0; }
a { color: inherit; }

/* Nav: floats over the hero shot */

.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 52px);
  color: #FFFBF2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 23px;
  text-shadow: 0 1px 12px rgba(20, 40, 38, .35);
}
.brand img { display: block; height: 30px; width: auto; filter: drop-shadow(0 1px 8px rgba(20, 40, 38, .4)); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  text-shadow: 0 1px 10px rgba(20, 40, 38, .45);
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}
.nav-links a:hover { border-color: currentColor; }
.nav-social { display: inline-flex; gap: 14px; margin-left: 4px; }
.nav-links a.social { display: inline-flex; align-items: center; border: 0; filter: drop-shadow(0 1px 6px rgba(20, 40, 38, .45)); transition: opacity .2s; }
.nav-links a.social:hover { opacity: .75; }
.social svg, .btn.yt svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.follow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn.yt { background: #FFFBF2; color: var(--ink); }
.btn.yt:hover { background: #FFFFFF; }
.closing .contact { margin-top: 22px; font-size: 15.5px; }
.contact a { color: #FFFBF2; text-decoration-color: rgba(255, 251, 242, .45); text-underline-offset: 3px; }
.contact a:hover { text-decoration-color: currentColor; }
.footer a { color: #E3EEEA; text-decoration-color: rgba(227, 238, 234, .4); text-underline-offset: 3px; }

/* Hero: the game itself */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--canal-deep);
  isolation: isolate;
}
.hero-shot {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 50%;
  animation: settle 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes settle { from { transform: scale(1.06); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(20, 44, 42, .45), rgba(20, 44, 42, 0) 22%),
    linear-gradient(to top, rgba(16, 40, 40, .82), rgba(16, 40, 40, .4) 50%, rgba(16, 40, 40, .1) 80%);
}

.hero-copy {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 52px) clamp(64px, 11vh, 120px);
  color: #F3F1E8;
  text-align: center;
}

.tag {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #CFE3D6;
}

.hero h1 {
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: .95;
  text-shadow: 0 2px 30px rgba(16, 40, 40, .35);
  color: #FFFBF2;
}
.hero h1 em { color: #CBE3B3; }
.hero h1 .wordmark { display: block; width: min(860px, 88vw); height: auto; margin: 0 auto; filter: drop-shadow(0 4px 28px rgba(16, 40, 40, .4)); }

.lede {
  max-width: 560px;
  margin: 24px auto 0;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: #E4EAE2;
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: #FFFBF2; color: var(--ink); }
.btn.primary:hover { background: #FFFFFF; }
.btn.ghost { border-color: rgba(255, 251, 242, .7); color: #FFFBF2; }
.btn.ghost:hover { background: rgba(255, 251, 242, .12); }
.btn.small { padding: 9px 18px; font-size: 15px; background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.small:hover { border-color: var(--moss); }
.btn:focus-visible, .chip-btn:focus-visible, .nav-links a:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero-caption {
  position: absolute;
  right: clamp(16px, 4vw, 52px);
  bottom: 22px;
  font-size: 13px;
  font-style: italic;
  color: rgba(243, 241, 232, .75);
}

/* Intro */

.intro {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) 16px clamp(48px, 7vw, 80px);
  text-align: center;
}
.intro-text {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 400;
  font-size: clamp(24px, 3.1vw, 34px);
  line-height: 1.4;
  color: var(--ink);
}

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

/* Before & after */

.change { max-width: 1200px; margin: 0 auto; padding: 0 16px clamp(72px, 9vw, 112px); }
.compare-tabs { display: flex; justify-content: center; gap: 4px; width: max-content; margin: 0 auto 20px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.compare {
  position: relative;
  aspect-ratio: 2000 / 1060;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 30px 60px -30px rgba(31, 60, 56, .45);
  user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .pill {
  position: absolute;
  top: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(247, 243, 234, .9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  pointer-events: none;
}
.compare .pill.left { left: 16px; }
.compare .pill.right { right: 16px; }
.compare .handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #FFFBF2;
  box-shadow: 0 0 12px rgba(16, 40, 40, .35);
  pointer-events: none;
}
.compare .handle span {
  position: absolute;
  top: 50%; left: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: #FFFBF2;
  box-shadow: 0 4px 16px rgba(16, 40, 40, .3);
}
.compare .handle span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center / 24px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23233330' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
}
.compare .range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(.range:focus-visible) .handle span { outline: 2px solid var(--marigold); outline-offset: 3px; }
.compare.swap img { animation: fadein .5s ease-out; }

/* The illustrated street */

.street {
  position: relative;
  background: linear-gradient(to bottom, var(--paper), var(--sky) 30%, var(--sky-top));
}
.scene {
  display: block;
  width: 100%;
  height: clamp(280px, 35.75vw, 640px);
}
.scene .rider { animation: ride 46s linear infinite; }
.scene .rider.r2 { animation-duration: 58s; animation-delay: -30s; }
@keyframes ride {
  from { transform: translateX(-120px); }
  to { transform: translateX(1720px); }
}
.scene .fade-in { animation: fadein .6s ease-out; }

.street-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  padding: 22px 16px;
  background: var(--paper-2);
  font-size: 15px;
  color: var(--dim);
}

/* Sections */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(80px, 10vw, 128px) 16px 0;
}

.band { background: var(--lawn); padding-bottom: clamp(80px, 10vw, 120px); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--moss);
  margin-bottom: 14px;
}
.section h2, .change h2 { font-size: clamp(34px, 4.6vw, 52px); }
.sub { margin: 16px auto 0; color: var(--dim); max-width: 540px; }

/* Two ways to play */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 6vw, 80px);
}
.play { position: relative; }
.leaf-icon {
  width: 44px; height: 44px;
  fill: none; stroke: var(--moss); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.play h3 { font-size: 30px; margin: 16px 0 12px; }
.tags { margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--moss); letter-spacing: .02em; }

.pull {
  max-width: 720px;
  margin: clamp(56px, 7vw, 80px) auto 0;
  padding: 0;
  text-align: center;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-style: italic;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.5;
  color: var(--ink);
}
.pull::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 28px;
  background: var(--moss);
  border-radius: 2px;
}

/* Cross-section */

.xs-wrap { text-align: center; }

.toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 8px;
  background: var(--paper-2);
  border-radius: 999px;
}
.chip-btn {
  padding: 8px 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.chip-btn:hover { color: var(--ink); }
.chip-btn[aria-selected="true"] { background: var(--canal); color: #FFFBF2; }

.xsection { display: block; width: 100%; height: auto; }
.xsection .el { transition: opacity .35s; }
.xsection text { font-family: var(--sans); }

.meter { max-width: 520px; margin: 20px auto 0; text-align: left; }
.meter-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 600; color: var(--ink); }
.meter-label strong { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 500; font-size: 30px; color: var(--moss); }
.meter-track { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--moss), #7FAE6A);
  transition: width .9s cubic-bezier(.3, .9, .4, 1);
}
.meter-legend { margin-top: 8px; font-size: 14px; color: var(--dim); text-align: center; }

/* The town */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 36px; }
.feature svg {
  width: 38px; height: 38px;
  fill: none; stroke: var(--canal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { font-size: 23px; margin: 14px 0 8px; }
.feature p { font-size: 16px; }

/* Closing: the canal */

.closing {
  position: relative;
  margin-top: clamp(96px, 12vw, 150px);
  background: var(--canal);
  color: #E3EEEA;
}
.wave { position: absolute; left: 0; bottom: 100%; width: 100%; height: 60px; display: block; fill: var(--canal); }
.closing-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(48px, 7vw, 88px) 16px;
}
.closing h2 { font-size: clamp(30px, 3.8vw, 44px); color: #FFFBF2; }
.closing p { margin-top: 14px; max-width: 560px; color: #CFE2DC; }
.closing-art { flex: 0 0 auto; width: clamp(140px, 20vw, 210px); height: auto; }

/* Waitlist: an outlined field and the cream button on the canal band */
.waitlist { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; margin-top: 20px; }
.waitlist input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 22px;
  border: 1.5px solid rgba(255, 251, 242, .55);
  border-radius: 999px;
  background: rgba(255, 251, 242, .08);
  color: #FFFBF2;
  font: inherit;
  font-size: 16px;
  transition: border-color .2s, background .2s;
}
.waitlist input[type="email"]::placeholder { color: #A9C4BD; opacity: 1; }
.waitlist input[type="email"]:hover { border-color: rgba(255, 251, 242, .8); }
.waitlist input[type="email"]:focus { outline: none; }
.waitlist input[type="email"]:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; background: rgba(255, 251, 242, .12); }
.waitlist .btn { flex: 0 0 auto; }
.waitlist .btn:disabled { opacity: .7; cursor: progress; transform: none; }
.waitlist.done { display: none; }
.waitlist .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.closing .waitlist-note { margin-top: 10px; font-size: 14.5px; color: #A9C4BD; }
/* In the hero the form is the page's main call to action, centered over the shot */
.hero .waitlist { margin: 32px auto 0; justify-content: center; }
.hero .waitlist input[type="email"] { background: rgba(16, 40, 40, .32); border-color: rgba(255, 251, 242, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero .waitlist input[type="email"]::placeholder { color: #CFE3D6; }
.hero .waitlist-note { margin: 12px auto 0; max-width: 560px; text-wrap: balance; font-size: 14.5px; color: #CFE3D6; text-shadow: 0 1px 12px rgba(16, 40, 40, .5); }
.hero .waitlist-note[data-kind="ok"] { margin-top: 28px; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 0; font-style: italic; font-size: clamp(22px, 2.6vw, 28px); color: #CBE3B3; }
.hero .waitlist-note[data-kind="error"] { color: #F4C7B4; font-weight: 600; }
.hero-more { display: inline-block; margin-top: 18px; font-size: 15px; font-weight: 500; color: #E4EAE2; text-decoration: underline; text-decoration-color: rgba(228, 234, 226, .4); text-underline-offset: 4px; }
.hero-more:hover { text-decoration-color: currentColor; }
.hero-more:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }
.closing .waitlist-note[data-kind="ok"] { margin-top: 20px; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 0; font-style: italic; font-size: 22px; color: #CBE3B3; }
.closing .waitlist-note[data-kind="error"] { color: #F4C7B4; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 22px clamp(16px, 4vw, 52px) 30px;
  background: var(--canal-deep);
  color: #A9C4BD;
  font-size: 14px;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { min-height: 760px; }
  .hero-shot { object-position: 30% 50%; }
  .hero-caption { display: none; }
  .compare { aspect-ratio: 4 / 3; border-radius: 14px; }
  .compare .handle span { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .closing-inner { flex-direction: column; text-align: center; }
  .closing p { margin-inline: auto; }
  .follow { justify-content: center; }
  .waitlist { margin-inline: auto; justify-content: center; }
  .waitlist .btn { flex: 1 1 100%; justify-content: center; }
  .xsection text.w { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scene .rider, .hero-shot { animation: none !important; }
  html { scroll-behavior: auto; }
}
