:root {
  --ink: #12201e;
  --ink-soft: #3a4a47;
  --paper: #eef3ee;
  --paper-deep: #dde6dd;
  --teal: #0f6f65;
  --teal-deep: #0a3c37;
  --signal: #1aa392;
  --foam: #f7faf6;
  --sand: #c9b896;
  --warn: #c45c2a;
  --line: rgba(18, 32, 30, 0.12);
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(26, 163, 146, 0.18), transparent 55%),
    radial-gradient(90% 60% at -15% 30%, rgba(201, 184, 150, 0.28), transparent 50%),
    linear-gradient(165deg, #f4f8f3 0%, var(--paper) 42%, #e5eee8 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

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

a {
  color: inherit;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(238, 243, 238, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(238, 243, 238, 0.92);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.nav-brand img {
  color: var(--teal-deep);
  width: 34px;
  height: auto;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.site-nav nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.site-nav nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  color: var(--ink) !important;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--foam) !important;
}

/* —— Hero —— */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: end;
  min-height: min(100dvh, 900px);
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 8vh, 5rem);
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-wave {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 45%;
  border-radius: 50%;
  border: 1.5px solid rgba(15, 111, 101, 0.14);
  transform-origin: center bottom;
}

.hero-wave--a {
  bottom: -18%;
  animation: drift 18s ease-in-out infinite;
}

.hero-wave--b {
  bottom: -8%;
  border-color: rgba(15, 111, 101, 0.1);
  animation: drift 24s ease-in-out infinite reverse;
}

.hero-wave--c {
  bottom: 4%;
  border-color: rgba(196, 92, 42, 0.1);
  animation: drift 30s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateX(-2%) scaleY(1); }
  50% { transform: translateX(3%) scaleY(1.04); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  padding-bottom: 1.5rem;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--teal-deep);
}

.hero-mark {
  width: clamp(2.6rem, 7vw, 4rem);
  height: auto;
  align-self: center;
  margin-right: 0.15rem;
  animation: mark-in 1s var(--ease) 0.15s both;
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.hero-brand-sub {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  font-size: clamp(1.15rem, 2.8vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.hero-headline {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-lede {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--teal-deep);
  color: var(--foam);
  border: 1.5px solid var(--teal-deep);
}

.btn-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--foam);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 320px;
  color: var(--teal-deep);
  animation: rise 1s var(--ease) 0.2s both;
}

.hero-signal {
  width: min(100%, 480px);
  height: auto;
  overflow: visible;
}

.hero-signal .ring {
  stroke: var(--signal);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.35;
  transform-origin: 240px 280px;
  animation: pulse-ring 5.5s var(--ease) infinite;
}

.ring-1 { animation-delay: 0s; opacity: 0.55; }
.ring-2 { animation-delay: 0.4s; opacity: 0.4; }
.ring-3 { animation-delay: 0.8s; opacity: 0.28; }
.ring-4 { animation-delay: 1.2s; opacity: 0.16; }

@keyframes pulse-ring {
  0%, 100% { transform: scale(0.96); opacity: 0.2; }
  45% { transform: scale(1.02); opacity: 0.45; }
}

.hero-signal .mast {
  transform-origin: 240px 280px;
  animation: mast-breathe 6s ease-in-out infinite;
}

@keyframes mast-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* —— Sections —— */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.intro {
  padding-bottom: 1rem;
}

.section-head {
  max-width: 36rem;
}

.section-head h2,
.section-label-row h2,
.contact-panel h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-head p,
.contact-panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 34rem;
}

.section-label-row {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--ink);
}

.products--games {
  padding-top: 1rem;
}

/* —— Products —— */
.product-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.product {
  display: grid;
  grid-template-columns: minmax(88px, 120px) 1fr;
  gap: 0;
  text-decoration: none;
  background: rgba(247, 250, 246, 0.55);
  border: 1.5px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.35s var(--ease);
}

.product:hover,
.product:focus-visible {
  border-color: var(--teal-deep);
  background: var(--foam);
  transform: translateX(6px);
  outline: none;
}

.product-tone {
  display: grid;
  place-items: center;
  min-height: 100%;
  min-height: 7.5rem;
}

.product-tone--ostf {
  background: linear-gradient(160deg, #1a2a28, #0f6f65);
  color: #e8f5f2;
}

.product-tone--cue {
  background: linear-gradient(160deg, #2a3a55, #4a6fa5);
  color: #eef3fa;
}

.product-tone--wiki {
  background: linear-gradient(160deg, #3d3428, #8a7355);
  color: #f5efe6;
}

.product-tone--mix {
  background: linear-gradient(160deg, #1e3d36, #2d8a6e);
  color: #e8f7f1;
}

.product-tone--sail {
  background: linear-gradient(160deg, #1a3a4a, #2e6f8a 50%, #c9b896);
  color: #f0f6fa;
}

.product-tone--jewel {
  background: linear-gradient(160deg, #1a1a1a, #3a3a3a);
  color: #f0f0f0;
}

.product-tone--elf {
  background: linear-gradient(160deg, #2a1a1a, #8b3a2a 55%, #c9b896);
  color: #faf3eb;
}

.tone-glyph {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.tone-glyph--cards {
  position: relative;
  width: 2.4rem;
  height: 2.1rem;
}

.tone-glyph--cards i {
  position: absolute;
  width: 1.35rem;
  height: 1.85rem;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.tone-glyph--cards i:first-child {
  left: 0;
  top: 0.2rem;
  transform: rotate(-8deg);
}

.tone-glyph--cards i:last-child {
  right: 0;
  top: 0;
  transform: rotate(10deg);
}

.tone-glyph--wiki {
  font-size: 2.2rem;
}

.tone-glyph--mix {
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}

.tone-glyph--sail {
  width: 2.4rem;
  height: 2.4rem;
  background:
    linear-gradient(currentColor, currentColor) center 70% / 12% 55% no-repeat,
    linear-gradient(135deg, transparent 48%, currentColor 48%, currentColor 55%, transparent 55%) 55% 35% / 70% 55% no-repeat;
  border-bottom: 3px solid currentColor;
  border-radius: 0 0 40% 40%;
}

.tone-glyph--jewel {
  width: 1.6rem;
  height: 1.6rem;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.tone-glyph--elf {
  width: 1.8rem;
  height: 1.8rem;
  border: 3px solid currentColor;
  border-radius: 2px;
  position: relative;
}

.tone-glyph--elf::after {
  content: "";
  position: absolute;
  inset: 20% 20% auto;
  height: 3px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.product-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.85rem;
}

.product-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.product-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 40rem;
}

.product-link {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
}

.product:hover .product-link {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Contact —— */
.contact {
  padding-bottom: clamp(4rem, 10vh, 6rem);
}

.contact-panel {
  padding: clamp(2rem, 5vw, 3.25rem);
  background:
    linear-gradient(135deg, rgba(10, 60, 55, 0.94), rgba(15, 111, 101, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30h60M30 0v60' stroke='%23ffffff' stroke-opacity='0.06' fill='none'/%3E%3C/svg%3E");
  color: var(--foam);
  border-radius: 2px;
}

.contact-panel h2 {
  color: var(--foam);
}

.contact-panel p {
  color: rgba(247, 250, 246, 0.82);
  margin-bottom: 1.5rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-panel .btn-primary {
  background: var(--foam);
  color: var(--teal-deep);
  border-color: var(--foam);
}

.contact-panel .btn-primary:hover {
  background: #fff;
  border-color: #fff;
}

.contact-panel .btn-ghost {
  color: var(--foam);
  border-color: rgba(247, 250, 246, 0.55);
}

.contact-panel .btn-ghost:hover {
  background: var(--foam);
  color: var(--teal-deep);
  border-color: var(--foam);
}

/* —— Footer —— */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.footer-brand img {
  width: 26px;
  height: auto;
  opacity: 0.85;
}

.site-footer p {
  margin: 0;
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* —— Responsive —— */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.5rem;
    align-items: start;
  }

  .hero-visual {
    order: -1;
    min-height: 220px;
    max-height: 280px;
  }

  .hero-signal {
    width: min(100%, 320px);
  }

  .hero-brand {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }
}

@media (max-width: 640px) {
  .site-nav nav a:not(.nav-cta) {
    display: none;
  }

  .product {
    grid-template-columns: 1fr;
  }

  .product-tone {
    min-height: 5rem;
  }

  .product:hover,
  .product:focus-visible {
    transform: translateY(-3px);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
