/* =========================================================
   Betafisch — styles.css
   Brand blue sampled from the logo: #0057b2
   ========================================================= */

:root {
  /* Brand palette */
  --brand:      #0057b2;
  --brand-600:  #0a6fd6;
  --brand-500:  #1f86ec;
  --brand-400:  #46a3ff;
  --brand-300:  #7cc0ff;
  --brand-200:  #b9ddff;

  /* Deep navy (dark surfaces) */
  --navy-950:   #041428;
  --navy-900:   #06213f;
  --navy-800:   #0a2d54;

  /* Neutrals */
  --paper:      #ffffff;
  --paper-2:    #f2f7ff;
  --paper-3:    #e7f0fb;
  --ink:        #0c1a2b;
  --ink-2:      #3a4a5e;
  --muted:      #64768c;
  --line:       #dfe8f4;

  /* On-dark text */
  --on-dark:        #eef5ff;
  --on-dark-muted:  #a9c4e6;

  /* Effects */
  --radius:     14px;
  --radius-lg:  22px;
  --radius-xl:  28px;
  --shadow-sm:  0 1px 2px rgba(6, 33, 63, .06), 0 2px 8px rgba(6, 33, 63, .05);
  --shadow-md:  0 8px 24px rgba(6, 33, 63, .10);
  --shadow-lg:  0 24px 60px rgba(4, 20, 40, .18);
  --shadow-brand: 0 16px 40px rgba(0, 87, 178, .28);

  --container:  1140px;
  --ease:       cubic-bezier(.22, .61, .36, 1);

  --font-head:  "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body:  "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .75em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--sm { padding: .55em 1.05em; font-size: .9rem; }
.btn--lg { padding: .9em 1.7em; font-size: 1.05rem; }

.btn--primary {
  background: linear-gradient(180deg, var(--brand-600), var(--brand));
  color: #fff; box-shadow: var(--shadow-brand);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(0,87,178,.36); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent; color: var(--on-dark);
  border-color: rgba(255,255,255,.4);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
  transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(4,20,40,.28); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.nav__brand img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links > a {
  font-family: var(--font-head); font-weight: 600; font-size: .96rem; color: #eaf3ff;
  padding: .5em .8em; border-radius: 8px; transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__links > a:not(.nav__cta):hover { background: rgba(255,255,255,.14); color: #fff; }
.nav__cta {
  margin-left: 8px; color: var(--brand) !important; background: #fff;
  box-shadow: 0 4px 14px rgba(4,20,40,.2);
}
.nav__cta:hover { transform: translateY(-1px); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer; border-radius: 8px;
}
.nav__toggle span { width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Shared section bits ---------- */
.section { padding-block: clamp(64px, 9vw, 118px); position: relative; }
.section__head { max-width: 720px; margin-bottom: 52px; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section__sub { color: var(--muted); font-size: 1.1rem; margin-top: 14px; }

.eyebrow {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: var(--brand-600); margin-bottom: 14px;
}
.eyebrow--light { color: var(--brand-300); }

.text-grad {
  background: linear-gradient(100deg, var(--brand-300), #fff 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(120% 100% at 85% -10%, var(--brand-600) 0%, transparent 55%),
    linear-gradient(165deg, var(--navy-900) 0%, var(--brand) 130%);
  color: var(--on-dark);
  padding-block: clamp(84px, 13vw, 168px);
}
.hero__inner { position: relative; z-index: 2; max-width: 860px; }
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; letter-spacing: -.03em;
  color: #fff; margin-block: 8px 22px;
}
.hero__lede { font-size: clamp(1.08rem, 2.2vw, 1.35rem); color: var(--on-dark-muted); max-width: 620px; }
.hero__lede strong { color: #fff; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); list-style: none;
  margin-top: 56px; padding: 26px 0 0; border-top: 1px solid rgba(255,255,255,.14);
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.hero__stats span { font-size: .9rem; color: var(--on-dark-muted); margin-top: 6px; }

/* Hero decorative background */
.hero__bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero__glow--1 { width: 480px; height: 480px; top: -140px; right: -80px; background: radial-gradient(circle, var(--brand-400), transparent 70%); }
.hero__glow--2 { width: 420px; height: 420px; bottom: -160px; left: -120px; background: radial-gradient(circle, #1246a0, transparent 70%); }
.hero__grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 10%, #000 30%, transparent 75%);
          mask-image: radial-gradient(120% 90% at 70% 10%, #000 30%, transparent 75%);
}
.float-shape {
  position: absolute; border-radius: 12px;
  background: linear-gradient(150deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  animation: floaty 9s ease-in-out infinite;
}
.float-shape--a { width: 66px; height: 66px; top: 20%; right: 12%; transform: rotate(12deg); animation-delay: -1s; }
.float-shape--b { width: 42px; height: 42px; top: 62%; right: 26%; border-radius: 50%; animation-delay: -4s; }
.float-shape--c { width: 54px; height: 54px; top: 74%; right: 8%; transform: rotate(-8deg); animation-delay: -2.5s; }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }

.hero__wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; z-index: 2;
  background: var(--paper);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 70V28c180 30 360 34 720 6S1260 4 1440 30v40Z' fill='%23000'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 70V28c180 30 360 34 720 6S1260 4 1440 30v40Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* ---------- Games ---------- */
.games { background: var(--paper); }
.game-card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 60px);
  align-items: center; background: linear-gradient(180deg, #fff, var(--paper-2));
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow-md);
}
.game-card__media {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  box-shadow: var(--shadow-lg); background: var(--brand-200);
  transform: rotate(-1.2deg); transition: transform .4s var(--ease);
}
.game-card__media img { width: 100%; height: auto; }
.game-card:hover .game-card__media { transform: rotate(0deg) scale(1.015); }

.game-card__title { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-top: 14px; }
.game-card__tagline { font-family: var(--font-head); font-weight: 600; color: var(--brand-600); font-size: 1.15rem; margin-top: 6px; }
.game-card__desc { color: var(--ink-2); margin-top: 16px; font-size: 1.05rem; }

.game-card__meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.game-card__meta dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.game-card__meta dd { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.02rem; margin-top: 2px; }

.game-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 28px; }
.game-card__note { color: var(--muted); font-size: .95rem; }
.game-card__note a { color: var(--brand-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head);
  font-weight: 600; font-size: .82rem; padding: .4em .85em; border-radius: 999px;
}
.pill--live { background: rgba(0,87,178,.1); color: var(--brand-600); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 3px rgba(23,178,106,.2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(23,178,106,.05); } }

.games__more { text-align: center; color: var(--muted); margin-top: 40px; font-size: 1rem; }

/* ---------- Studio ---------- */
.studio { background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.studio__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.studio__text p { color: var(--ink-2); font-size: 1.08rem; margin-top: 18px; }
.studio__text .section__title { margin-bottom: 8px; }

.traits { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.traits li {
  font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--brand-600);
  background: rgba(0,87,178,.07); border: 1px solid var(--brand-200);
  padding: .42em .95em; border-radius: 999px;
}

.founder {
  display: flex; align-items: center; gap: 18px; margin-top: 34px;
  padding: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.founder__avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800;
  color: #fff; font-size: 1.2rem; letter-spacing: .02em;
  background: linear-gradient(150deg, var(--brand-500), var(--brand));
  box-shadow: var(--shadow-brand);
}
.founder__name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.founder__role { color: var(--brand-600); font-weight: 600; font-size: .9rem; }
.founder__bio { color: var(--muted); font-size: .92rem; margin-top: 2px; }

.studio__stats {
  list-style: none; display: grid; gap: 14px;
}
.studio__stats li {
  display: flex; align-items: baseline; gap: 16px;
  background: linear-gradient(150deg, var(--brand), var(--brand-600));
  color: #fff; padding: 22px 26px; border-radius: var(--radius-lg); box-shadow: var(--shadow-brand);
}
.studio__stats strong { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.studio__stats span { color: var(--brand-200); font-weight: 500; }

/* ---------- Approach ---------- */
.approach { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: linear-gradient(180deg, #fff, var(--paper-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  color: var(--brand-600); background: rgba(0,87,178,.09); margin-bottom: 20px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 1rem; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(120% 120% at 15% 0%, var(--brand-600) 0%, transparent 45%),
    linear-gradient(160deg, var(--navy-900), var(--brand) 140%);
  color: var(--on-dark);
}
.contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
.contact__intro .section__title { color: #fff; }
.contact__sub { color: var(--on-dark-muted); font-size: 1.1rem; margin-top: 16px; }
.contact__alt { margin-top: 22px; color: var(--on-dark-muted); }
.contact__alt a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.form {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 34px);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-top: 18px; }
.form__row .field { margin-top: 0; }
.field__label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: #eaf3ff; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: #fff;
  background: rgba(4,20,40,.35); border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 12px; padding: .8em 1em; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(233,243,255,.5); }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23b9ddff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1em center; padding-right: 2.6em;
}
.field select option { color: #0c1a2b; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-300); background: rgba(4,20,40,.5);
}
.form__submit { margin-top: 24px; width: 100%; justify-content: center; }
.form__status { margin-top: 14px; font-size: .95rem; min-height: 1.2em; text-align: center; }
.form__status.is-error { color: #ffb4b4; }
.form-success { text-align: center; padding: 20px 6px; }
.form-success h3 { color: #fff; font-size: 1.5rem; }
.form-success p { color: var(--on-dark-muted); margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand); color: #dbebff; padding-block: 56px 30px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 34px; width: auto; margin-bottom: 16px; }
.footer__brand p { color: var(--brand-200); max-width: 340px; font-size: .96rem; }
.footer__nav h4, .footer__social h4 { font-family: var(--font-head); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 16px; }
.footer__nav { display: flex; flex-direction: column; gap: 10px; }
.footer__nav a { color: #cfe3ff; width: fit-content; transition: color .18s var(--ease); }
.footer__nav a:hover { color: #fff; }
.footer__icons { display: flex; gap: 12px; }
.footer__icons a {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; transition: background .2s var(--ease), transform .2s var(--ease);
}
.footer__icons a:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); }
.footer__icons svg { width: 18px; height: 18px; }

.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16);
  font-size: .85rem; color: var(--brand-200);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .game-card { grid-template-columns: 1fr; }
  .game-card__media { transform: rotate(0); order: -1; }
  .studio__grid, .contact__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--brand); padding: 14px 24px 24px; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links > a { padding: .8em 1em; font-size: 1.05rem; }
  .nav__cta { margin-left: 0; margin-top: 8px; justify-content: center; }
  .form__row { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px 36px; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stats strong { font-size: 1.7rem; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
