/* Mild Corner Studio - single stylesheet for all pages
   Dark game-studio style. Chosen by the owner on 2026-11-22. */

:root {
  /* Surfaces */
  --bg: #0e0d13;
  --surface: #15131f;
  --surface-2: #171423;
  --raised: #1e1a2e;
  --footer-bg: #0a090f;

  /* Text */
  --text: #f2f0ea;
  --body: #c9c4d4;
  --muted: #a8a3b8;

  /* Accents */
  --teal: #2ee6c8;
  --teal-soft: #7ff3df;
  --violet: #8b7cff;
  --crimson: #ff4d5e;

  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);

  --radius: 10px;
  --radius-sm: 6px;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

::selection {
  background: rgba(46, 230, 200, 0.3);
  color: #ffffff;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-soft);
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin: 0 12px 4px 0;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(46, 230, 200, 0.8);
  vertical-align: middle;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 13, 19, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  filter: drop-shadow(0 0 8px rgba(46, 230, 200, 0.55));
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(46, 230, 200, 0.8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover {
  color: #ffffff;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--teal);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: var(--teal);
  color: #0e0d13;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 0 0 rgba(46, 230, 200, 0);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.button:hover {
  background: var(--teal-soft);
  border-color: var(--teal-soft);
  color: #0e0d13;
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(46, 230, 200, 0.45);
}

.button.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: #ffffff;
}

.button.secondary:hover {
  background: rgba(46, 230, 200, 0.08);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 24px rgba(46, 230, 200, 0.22);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 84px;
  background:
    radial-gradient(ellipse at 18% 28%, rgba(46, 230, 200, 0.14), transparent 52%),
    radial-gradient(ellipse at 88% 78%, rgba(139, 124, 255, 0.18), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

/* faint CSS-only grid */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 35% 45%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse at 35% 45%, #000 15%, transparent 72%);
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.orb.o1 {
  top: -160px;
  left: -120px;
  width: 440px;
  height: 440px;
  background: var(--teal);
  opacity: 0.2;
}

.orb.o2 {
  right: -140px;
  bottom: -180px;
  width: 500px;
  height: 500px;
  background: var(--violet);
  opacity: 0.28;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: var(--teal);
  text-shadow: 0 0 28px rgba(46, 230, 200, 0.5), 0 0 60px rgba(46, 230, 200, 0.25);
}

.hero .lead {
  margin: 0 0 38px;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.65;
}

/* Hero emblem: one inline SVG (filled badge, pixel M, pixel squares, glow) */

.hero-art {
  width: 100%;
  max-width: 380px;
  margin-left: auto;
}

.hero-emblem {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 28px rgba(46, 230, 200, 0.22)) drop-shadow(0 0 60px rgba(139, 124, 255, 0.2));
}

.hero-emblem .fl {
  animation: float 6s ease-in-out infinite;
}

.hero-emblem .fl.f2 {
  animation-duration: 7.5s;
  animation-delay: -2s;
}

.hero-emblem .fl.f3 {
  animation-duration: 5s;
  animation-delay: -3.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Shared icon style ----------
   One style for every icon: duotone (tinted fill + 2px accent stroke),
   round joins, same corner radius family, same soft glow. */

.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic .tint {
  fill: currentColor;
  fill-opacity: 0.3;
}

.ic .solid {
  fill: currentColor;
}

.ic .ink {
  stroke: #ffffff;
  fill: none;
}

/* ---------- Sections ---------- */

section {
  padding: 96px 0;
}

h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.about h2,
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.about h2::before,
.section-head h2::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: var(--teal);
  box-shadow: 0 0 14px rgba(46, 230, 200, 0.8);
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 56px;
  align-items: start;
}

.about h2 {
  margin: 0;
}

.about-text p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.principles {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  --c: var(--teal);
  --c-rgb: 46, 230, 200;
  position: relative;
  padding: 32px 28px 30px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.card.c-violet {
  --c: var(--violet);
  --c-rgb: 139, 124, 255;
}

.card.c-crimson {
  --c: var(--crimson);
  --c-rgb: 255, 77, 94;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--c-rgb), 0.55);
  border-top-color: var(--c);
  box-shadow: 0 0 0 1px rgba(var(--c-rgb), 0.25), 0 16px 44px rgba(var(--c-rgb), 0.2);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  background: linear-gradient(145deg, rgba(var(--c-rgb), 0.24), rgba(var(--c-rgb), 0.07));
  border: 1px solid rgba(var(--c-rgb), 0.5);
  border-radius: 12px;
  color: var(--c);
  box-shadow: 0 0 22px rgba(var(--c-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.card .icon svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgba(var(--c-rgb), 0.6));
}

.card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* Contact */

.contact-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 52px 52px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(46, 230, 200, 0.12), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(139, 124, 255, 0.12), transparent 55%),
    var(--surface-2);
  border: 1px solid rgba(46, 230, 200, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(46, 230, 200, 0.08), 0 0 60px rgba(46, 230, 200, 0.14);
}

.contact-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.contact-card p {
  margin: 0;
  color: var(--body);
  font-size: 1.1rem;
}

.contact-card strong {
  color: var(--teal);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---------- Legal / document pages ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse at 12% 10%, rgba(46, 230, 200, 0.13), transparent 50%),
    radial-gradient(ellipse at 92% 90%, rgba(139, 124, 255, 0.16), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.page-hero .wrap {
  position: relative;
}

.page-hero .wrap::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 50%;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  transform: rotate(45deg);
  border: 2px solid rgba(46, 230, 200, 0.7);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(46, 230, 200, 0.26), rgba(139, 124, 255, 0.32));
  box-shadow: 0 0 30px rgba(46, 230, 200, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.page-hero h1 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero .meta {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.doc {
  padding: 56px 0 100px;
}

.doc .wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: var(--radius);
  font-size: 0.93rem;
}

.toc p {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--body);
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  color: var(--teal);
}

.doc-body {
  padding: 44px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.doc-body .intro {
  margin: 0 0 8px;
  padding: 18px 22px;
  background: rgba(46, 230, 200, 0.07);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-weight: 500;
}

.doc-body h2 {
  margin: 42px 0 12px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--teal);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.doc-body h2:nth-of-type(even) {
  border-left-color: var(--violet);
}

.doc-body h3 {
  margin: 24px 0 6px;
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 700;
}

.doc-body p,
.doc-body ul {
  margin: 0 0 14px;
}

.doc-body ul {
  padding-left: 22px;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body li::marker {
  color: var(--teal);
}

.doc-body strong {
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 64px 0 28px;
  font-size: 0.96rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 160px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(46, 230, 200, 0.8);
}

.site-footer a {
  color: var(--body);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
}

.footer-brand .brand-mark {
  width: 28px;
  height: 28px;
}

.footer-grid p {
  margin: 0;
  max-width: 28em;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.copyright {
  margin: 24px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

/* Grid children may shrink below their content width, and long words
   (such as the email address) may break instead of causing overflow. */
.hero .wrap > *,
.about .wrap > *,
.doc .wrap > *,
.footer-grid > * {
  min-width: 0;
}

body {
  overflow-wrap: break-word;
}

.footer-grid a,
.contact-card strong {
  overflow-wrap: anywhere;
}

/* Touch devices and tablets: every link and button is at least 44px tall.
   This only sets minimum heights, it does not change the layout. */
@media (max-width: 960px), (pointer: coarse) {
  .brand {
    min-height: 44px;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .toc a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
  }

  .toc li {
    break-inside: avoid;
  }

  .footer-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-grid li {
    margin-bottom: 0;
  }
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 28px;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-art {
    max-width: 300px;
    margin: 0;
  }

  .about .wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .doc .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toc {
    position: static;
    max-height: none;
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }

  .page-hero .wrap::after {
    display: none;
  }
}

@media (max-width: 640px) {
  html {
    /* the sticky header is two rows tall on phones */
    scroll-padding-top: 112px;
  }

  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 20px;
  }

  /* Header: brand on the first row, the four links share the second row evenly */
  .site-header .wrap {
    gap: 0;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .nav {
    width: 100%;
    gap: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .nav a {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 6px;
    font-size: 1rem;
    white-space: nowrap;
  }

  .nav a::after {
    left: 6px;
    right: 6px;
    bottom: 4px;
  }

  /* Readable text sizes: no body, link or label text below 13px */
  .eyebrow,
  .toc p,
  .footer-grid h3 {
    font-size: 0.82rem;
  }

  .toc,
  .site-footer {
    font-size: 1rem;
  }

  .hero {
    padding: 56px 0 60px;
  }

  .hero .lead {
    font-size: 1.08rem;
  }

  .hero-art {
    max-width: 260px;
  }

  .button {
    width: 100%;
  }

  section {
    padding: 64px 0;
  }

  .card {
    padding: 26px 22px 24px;
  }

  .contact-card {
    padding: 34px 24px;
  }

  .page-hero {
    padding: 52px 0 40px;
  }

  .doc {
    padding: 32px 0 64px;
  }

  /* Legal pages: the text card runs edge to edge so the reading column
     keeps the full width, with 20px of padding on each side */
  .doc-body {
    margin: 0 -20px;
    padding: 28px 20px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .doc-body h2 {
    padding-left: 12px;
    font-size: 1.25rem;
  }

  .toc {
    padding: 18px 18px 12px;
  }

  .toc ol {
    column-gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Very narrow windows (a 320px window with a classic scrollbar is about 305px) */
@media (max-width: 340px) {
  .nav a {
    padding: 0 4px;
    font-size: 0.94rem;
  }

  .nav a::after {
    left: 4px;
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}
