/* TaHa Interactive – site styles
   Mirrors the former Google Sites layout: transparent header over a hero image,
   white content area, 12-column grid (max 1138px), blue section headings. */

/* Self-hosted fonts (OFL licence) – latin subset, no requests to Google servers */
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pt-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pt-sans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/assets/fonts/merriweather-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-heading: #226e93;
  --color-link: #226e93;
  --color-nav-active: #49aad4;
  --color-text: #212121;
  --color-bg: #ffffff;
  --color-footer-bg: #0e1620;
  --color-footer-text: #c9d3dc;
  --font-heading: "PT Sans", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: Merriweather, Georgia, "Times New Roman", serif;
  --content-width: 1138px;
  --gutter: 20px;
  --header-height: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  /* keep the footer at the bottom on short pages (contact, impressum, 404) */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-link); }
a:hover { color: var(--color-nav-active); }

:focus-visible { outline: 3px solid var(--color-nav-active); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: #fff; color: #000; padding: 8px 14px; border-radius: 4px;
}
.skip-link:focus { top: 8px; }

/* ---------- Header / navigation ---------- */

.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  font-family: var(--font-heading);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .01em;
}
.brand:hover { color: #fff; }
.brand img { height: 44px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; color: #fff; cursor: pointer;
}
.nav-toggle svg { display: block; width: 28px; height: 28px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; }
.site-nav li { position: relative; }

.site-nav a,
.site-nav button.nav-link {
  display: block; padding: 10px 12px;
  color: #fff; text-decoration: none;
  font: inherit; font-size: 1rem; font-weight: 700;
  background: none; border: 0; cursor: pointer;
}
.site-nav a:hover,
.site-nav button.nav-link:hover { color: var(--color-nav-active); }
.site-nav [aria-current="page"] { color: var(--color-nav-active); }

.has-submenu > .nav-link::after {
  content: ""; display: inline-block; margin-left: 6px; vertical-align: middle;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}

.submenu {
  display: none;
  position: absolute; left: 0; top: 100%;
  min-width: 170px; padding: 6px 0 !important;
  background: rgba(14, 22, 32, .96);
  border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.is-open > .submenu { display: block; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  height: clamp(240px, 36vw, 520px);
  background: #05080d;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.hero--robo-flow img { object-position: 70% center; } /* keep the ROBOFLOW title in view on narrow screens */
.hero--page { height: clamp(220px, 24vw, 340px); }
.hero--page .hero-title {
  position: relative; z-index: 1;
  height: 100%; margin: 0;
  display: flex; align-items: center; justify-content: center;
  padding-top: var(--header-height);
  color: #fff; text-align: center;
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.33rem); line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}

/* ---------- Content ---------- */

main { display: block; flex: 1 0 auto; }

.container {
  width: 100%; max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin: 0 auto; padding: 0 var(--gutter);
}

.section { padding: 40px 0; }
.section--tight { padding-top: 16px; }

h1, h2, h3 { font-family: var(--font-heading); }

.section-title {
  margin: 0 0 24px;
  color: var(--color-heading); text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.83rem); font-weight: 700; line-height: 1.2;
}

.text-center { text-align: center; }
.intro p { margin: 0 0 14px; }
.status { font-weight: 700; }

.cta {
  display: inline-block; margin-top: 8px; padding: 6px 2px;
  font-family: var(--font-heading); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

.teaser h3 { margin: 0 0 4px; font-size: 1.125rem; }
.teaser p { margin: 0; }

/* Games listing */
.game-card {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter); align-items: center;
}
.game-card__text { grid-column: 1 / span 7; text-align: center; }
.game-card__text h2 { margin: 0 0 8px; font-size: 1.125rem; color: var(--color-text); }
.game-card__media { grid-column: 9 / span 3; }

/* Robo Flow */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}
.split {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter); align-items: center;
}
.split__text { grid-column: 1 / span 6; }
.split__media { grid-column: 8 / span 3; }
.split__media--pair {
  grid-column: 7 / span 6;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter);
}
.feature-list { list-style: none; margin: 0; padding: 0 0 0 5.5%; }
.feature-list li { margin: 0 0 16px; }

/* Legal / text pages */
.prose { max-width: 860px; margin: 0 auto; }
.prose h2 { margin: 32px 0 8px; font-size: 1.25rem; color: var(--color-heading); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.4em; }
.prose address { font-style: normal; margin: 0 0 14px; }
.prose a { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px; padding: 22px var(--gutter);
  background: var(--color-footer-bg); color: var(--color-footer-text);
  font-family: var(--font-heading); font-size: .9rem; text-align: center;
}
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer .sep { margin: 0 .6em; opacity: .5; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .game-card__text { grid-column: 1 / -1; order: 2; }
  .game-card__media { grid-column: 4 / span 6; order: 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .split__text { grid-column: 1 / -1; }
  .split__media { grid-column: 4 / span 6; }
  .split__media--pair { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-height); left: 0; right: 0;
    background: rgba(14, 22, 32, .97);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a,
  .site-nav button.nav-link { padding: 12px 4px; text-align: left; width: 100%; }
  .has-submenu > .nav-link::after { display: none; }
  .submenu { display: block; position: static; background: none; box-shadow: none; padding: 0 !important; min-width: 0; }
  .submenu a { padding-left: 20px; font-weight: 400; }
}

@media (max-width: 520px) {
  .brand { font-size: 1.05rem; }
  .brand img { height: 36px; }
  .game-card__media,
  .split__media { grid-column: 2 / span 10; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
