/* Clover Meadow Games — marketing site
   Hand-built, dependency-free. Dark, premium, meadow-toned. */

:root {
  --bg: #0b140d;
  --bg-2: #0f1b12;
  --panel: #13221680;
  --panel-solid: #142317;
  --line: #ffffff14;
  --line-strong: #ffffff26;

  --text: #eef3ec;
  --muted: #a7b6a8;
  --faint: #7f8f81;

  --clover: #57c97e;
  --clover-bright: #7ee49b;
  --clover-deep: #2f9256;

  --crusader: #ff7a45;
  --coral: #46c6e6;

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--clover);
  color: #06140a;
}

:focus-visible {
  outline: 2px solid var(--clover-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--clover);
  color: #06140a;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 0;
}

/* ---- Ambient meadow backdrop ---- */
.meadow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -5%, #1c3a24 0%, transparent 60%),
    radial-gradient(55% 45% at 12% 8%, #16301f 0%, transparent 55%),
    radial-gradient(80% 60% at 50% 118%, #123f24 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}
.meadow::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    #ffffff0a 1px,
    transparent 0
  );
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 100%);
}

/* ---- Layout helpers ---- */
.site-header,
main > section,
.site-footer {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

/* ---- Scroll reveal (progressive; content shows without JS) ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  margin-top: 0.4rem;
  border-radius: 999px;
  transition:
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    padding 0.3s var(--ease);
}
.site-header.is-scrolled {
  padding: 0.7rem 1.2rem;
  width: min(100% - 1.5rem, var(--maxw));
  background: #0d1811cc;
  box-shadow:
    0 1px 0 var(--line) inset,
    0 14px 40px -24px #000;
  backdrop-filter: blur(12px) saturate(1.2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand__mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  color: var(--clover);
}
.brand__mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.brand__mark--sm {
  width: 30px;
  height: 30px;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand__name span {
  color: var(--muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition:
    color 0.2s,
    background 0.2s;
}
.site-nav a:hover {
  color: var(--text);
  background: #ffffff0d;
}
.site-nav__cta {
  color: #06140a !important;
  background: var(--clover);
  font-weight: 600 !important;
}
.site-nav__cta:hover {
  background: var(--clover-bright) !important;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 clamp(3rem, 6vw, 5.5rem);
}
.hero__inner {
  max-width: 47rem;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  color: var(--clover-bright);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clover);
  box-shadow: 0 0 0 4px #57c97e2a;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px #57c97e00;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 2rem + 4.6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}
.hero__lede {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.32rem);
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 40rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.6rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin: 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.hero__stats div {
  display: flex;
  flex-direction: column;
}
.hero__stats dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--clover-bright);
}
.hero__stats dd {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--faint);
  max-width: 12ch;
}

/* floating pollen motes */
.motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.motes i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clover-bright);
  opacity: 0.18;
  animation: drift 14s linear infinite;
}
.motes i:nth-child(1) {
  left: 62%;
  top: 30%;
  animation-duration: 17s;
}
.motes i:nth-child(2) {
  left: 74%;
  top: 60%;
  width: 4px;
  height: 4px;
  animation-duration: 21s;
  animation-delay: -4s;
}
.motes i:nth-child(3) {
  left: 85%;
  top: 22%;
  width: 3px;
  height: 3px;
  animation-duration: 25s;
  animation-delay: -8s;
}
.motes i:nth-child(4) {
  left: 55%;
  top: 72%;
  width: 6px;
  height: 6px;
  animation-duration: 19s;
  animation-delay: -2s;
}
.motes i:nth-child(5) {
  left: 92%;
  top: 48%;
  width: 4px;
  height: 4px;
  animation-duration: 23s;
  animation-delay: -11s;
}
.motes i:nth-child(6) {
  left: 68%;
  top: 12%;
  width: 3px;
  height: 3px;
  animation-duration: 27s;
  animation-delay: -6s;
}
@keyframes drift {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.22;
  }
  90% {
    opacity: 0.22;
  }
  100% {
    transform: translate(-40px, -120px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .motes {
    display: none;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn__ico {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}
.btn--primary {
  background: var(--clover);
  color: #06140a;
  box-shadow: 0 10px 30px -12px #57c97e88;
}
.btn--primary:hover {
  background: var(--clover-bright);
  box-shadow: 0 14px 34px -12px #57c97eaa;
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--clover);
  color: var(--clover-bright);
}

.btn--wishlist {
  background: #12203c;
  border-color: #2a3f66;
  color: #dbe6ff;
}
.btn--wishlist:hover {
  border-color: #3d5b91;
}
.btn--wishlist.is-soon {
  cursor: not-allowed;
  color: #9fb0cf;
}
.btn--wishlist.is-soon:hover {
  transform: none;
  border-color: #2a3f66;
}
.btn--wishlist .btn__ico {
  color: #7fa9ff;
}
.btn .soon {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #ffffff14;
  color: #cdd8ef;
}

/* ---- Section heads ---- */
.section-head {
  max-width: 40rem;
  margin-bottom: 2.6rem;
}
.section-kicker {
  color: var(--clover-bright);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.5rem + 1.7vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.6rem;
}
.section-sub {
  color: var(--muted);
  margin: 0;
  font-size: 1.08rem;
}

/* ---- Games ---- */
.games {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem);
}
.game-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(2, 1fr);
}
.game {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s;
}
.game::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(
    160deg,
    var(--accent, var(--clover)),
    transparent 42%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.game:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -34px #000;
}
.game:hover::before {
  opacity: 1;
}
.game--crusader {
  --accent: var(--crusader);
}
.game--coral {
  --accent: var(--coral);
}

.game__art {
  aspect-ratio: 40 / 26;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.game:hover .art {
  transform: scale(1.04);
}

.game__body {
  padding: 1.7rem 1.7rem 1.9rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game__tag {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.game__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.7rem;
}
.game__hook {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.game__spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1.6rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}
.game__spec div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.game__spec dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.1;
}
.game__spec dd {
  margin: 0;
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.3;
}
.game__cta {
  margin-top: auto;
}

/* ---- CTA / wishlist band ---- */
.cta {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem);
}
.cta__inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 3.8rem);
  text-align: center;
  background:
    radial-gradient(90% 140% at 50% -20%, #1e4b30 0%, transparent 60%),
    linear-gradient(160deg, #15271b, #0d1912);
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 auto 0.9rem;
  max-width: 18ch;
}
.cta__copy {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 auto 2rem;
  max-width: 52ch;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.cta__note {
  margin: 1.6rem 0 0;
  font-size: 0.88rem;
  color: var(--faint);
}

/* ---- Studio / values ---- */
.studio {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}
.values {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(3, 1fr);
}
.value {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #14251a, #0e1a12);
  padding: 1.8rem 1.6rem;
}
.value__ico {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #57c97e1a;
  color: var(--clover-bright);
  margin-bottom: 1.1rem;
}
.value__ico svg {
  width: 24px;
  height: 24px;
}
.value h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.value p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

/* ---- Footer ---- */
.site-footer {
  padding: 2.6rem 0 3rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: 1.8rem;
}
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.site-footer__brand .brand__mark {
  color: var(--clover-deep);
  width: 34px;
  height: 34px;
}
.site-footer__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}
.site-footer__name small {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--faint);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.site-footer__links a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    color 0.2s,
    background 0.2s;
}
.site-footer__links a:hover {
  color: var(--clover-bright);
  background: #ffffff0a;
}
.site-footer__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  width: 100%;
}
.site-footer__meta a:hover {
  color: var(--clover-bright);
}

/* ---- First-look gallery ---- */
.gallery {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem);
}
.shots {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, 1fr);
}
.shots li:nth-child(1) {
  grid-column: span 4;
}
.shots li:nth-child(2),
.shots li:nth-child(3),
.shots li:nth-child(4),
.shots li:nth-child(5) {
  grid-column: span 2;
}
.shots figure {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0d1912;
}
.shots img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  transition: transform 0.5s var(--ease);
}
.shots figure:hover img {
  transform: scale(1.05);
}
.shots figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #eaffff;
  background: linear-gradient(0deg, #04121bd9, transparent);
}

/* ---- CTA countdown ---- */
.cta__countdown {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.cta__countdown-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--clover-bright);
}

@media (max-width: 760px) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }
  .shots li {
    grid-column: auto !important;
  }
}
@media (max-width: 460px) {
  .shots {
    grid-template-columns: 1fr;
  }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .values {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
@media (max-width: 760px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
  .site-nav a[href='#studio'] {
    display: none;
  }
}
@media (max-width: 460px) {
  .site-nav a[href='#games'] {
    display: none;
  }
  .hero__stats {
    gap: 1.4rem 2rem;
  }
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
