:root {
  --font-sans: ui-rounded, "Nunito", Arial, sans-serif;
  --font-brand: "Manrope", sans-serif;
  --background: #f5f7fa;
  --foreground: #29384c;
  --desert: #050607;
  --muted: #617087;
  --line: #cfd7e2;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { min-width: 280px; margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #3b6396; outline-offset: 5px; border-radius: 5px; }
::selection { color: #142139; background: #b2c9e8; }
svg { flex-shrink: 0; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
[hidden] { display: none !important; }

.container { width: min(1120px, 100% - 112px); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 18px; color: #142139; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #f5f7fa; }
.nav-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 32px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; white-space: nowrap; font-family: var(--font-brand); font-size: 20px; font-weight: 650; letter-spacing: -0.8px; }
.brand img { width: 30px; height: 30px; object-fit: contain; filter: brightness(0) saturate(100%) invert(20%) sepia(20%) saturate(700%) hue-rotate(175deg); }
.home-page .site-header .brand img { filter: brightness(0) invert(1); }
.desktop-nav { display: flex; align-items: center; justify-self: center; gap: 32px; }
.desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); transition: color 0.18s; }
.desktop-nav a:hover, .footer-row a:hover { color: #101a2b; }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: 12px; }
.language-switch { display: flex; align-items: center; gap: 2px; }
.language-switch button { display: grid; place-items: center; min-width: 32px; min-height: 36px; font-size: 10px; font-weight: 450; color: #627185; border-radius: 6px; }
.language-switch button[aria-current] { color: #29384c; font-weight: 650; text-decoration: underline; text-underline-offset: 5px; }
.menu-toggle { display: none; place-items: center; width: 44px; height: 44px; color: #29384c; border: 1px solid #a4b1c3; border-radius: 10px; }
.mobile-menu { position: fixed; top: 76px; left: 0; right: 0; z-index: 51; padding: 4px 24px 20px; background: #f5f7fa; border-bottom: 1px solid var(--line); }
.mobile-menu a { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; padding: 9px 17px; font-size: 12px; font-weight: 450; line-height: 1.4; border-radius: 8px; transition: background 0.18s, border-color 0.18s, transform 0.18s; }
.button-secondary { color: #30465f; background: transparent; border: 1px solid #97a7ba; }
.button:hover { transform: translateY(-1px); }
.button-secondary:hover { background: #30465f0a; border-color: #30465f; }
.button:active, .menu-toggle:active { transform: scale(0.97); transition-duration: 80ms; }
.button-compact { min-height: 34px; padding: 7px 15px; font-size: 11px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: max(680px, 53vw); color: #30465f; background: var(--desert); }
.hero-copy { position: relative; z-index: 1; text-align: center; padding-top: clamp(66px, 5.7vw, 100px); padding-bottom: 380px; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; margin-bottom: 22px; padding: 3px 7px 3px 3px; font-size: 11px; line-height: 1.3; color: #4d627e; background: #e8eef5; border: 1px solid #c7d2e0; border-radius: 30px; transition: border-color 0.18s, background 0.18s; }
.hero-badge-label { padding: 2px 7px; font-size: 10px; color: #f8fbff; background: #30465f; border-radius: 20px; }
.hero-badge:hover { background: #e0e9f4; border-color: #829cbd; }
.hero h1 { font-size: clamp(46px, 3.9vw, 58px); font-weight: 500; line-height: 1.04; letter-spacing: -0.042em; }
.hero h1 span { display: block; }
.hero-sub { max-width: 46ch; margin: 14px auto 0; font-size: 14px; color: #4d627e; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.hero-landscape { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-landscape img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; user-select: none; -webkit-user-select: none; }
.hero-landscape::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, #f5f7fa, transparent 13%), linear-gradient(to top, var(--desert), #05060700 21%); }

/* ---------- Projects showcase ---------- */
.section { padding-block: 80px; }
.section h2, .contact-section h2 { font-size: clamp(32px, 3vw, 42px); font-weight: 500; line-height: 1.1; letter-spacing: -0.04em; }
.app-showcase { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 48px; padding-top: 92px; padding-bottom: 120px; }
.showcase-sidebar { position: sticky; top: max(120px, 27vh); align-self: start; }
.showcase-sidebar h2 { margin-bottom: 32px; }
.showcase-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.showcase-nav a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 23px; font-weight: 550; letter-spacing: -0.035em; color: #8998ad; transition: color 0.2s; }
.showcase-nav a > span { width: 6px; height: 6px; background: currentColor; border-radius: 1px; opacity: 0.55; }
.showcase-nav a[aria-current], .showcase-nav a:hover { color: #f0f4fb; }
.showcase-nav a[aria-current] > span { opacity: 1; }
.showcase-gallery { display: grid; gap: 96px; min-width: 0; }

.app-showcase-card { --card-ink: #17263d; --arrow-bg: #ffffff80; --arrow-hover: #ffffffcc; --tag-line: #17263d55; --m-copy: none;
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1.6; color: var(--card-ink); background: var(--card-bg); border-radius: 24px; scroll-margin-top: 120px; }
.app-showcase-image { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.65, 0.3, 1); }
.app-showcase-copy { position: relative; width: 34%; padding: 34px 0 0 34px; }
.showcase-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 23px; overflow: hidden; background: var(--icon-bg, #fff); border-radius: 13px; }
.showcase-icon img { width: 100%; height: 100%; object-fit: contain; }
.app-showcase-copy h3 { font-size: 23px; font-weight: 600; line-height: 1.25; letter-spacing: -0.035em; }
.app-showcase-copy p { max-width: 22ch; margin-top: 10px; font-size: 14px; line-height: 1.55; }
.showcase-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; max-width: 26ch; }
.showcase-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font-size: 11px; font-weight: 500; border: 1px solid var(--tag-line); border-radius: 6px; }
.showcase-status.is-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #2fa66a; }
.showcase-status.is-review::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #ff6a2b; animation: pulse 1.8s ease-in-out infinite; }
.showcase-visit { position: absolute; left: 34px; right: 26px; bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 550; }
.showcase-visit::before { content: ""; position: absolute; inset: -700px -40px -40px; }
.showcase-visit > span { position: relative; }
.showcase-arrow { display: grid; place-items: center; width: 46px; height: 46px; background: var(--arrow-bg); border: 1px solid #17263d33; border-radius: 50%; transition: background 0.2s; }
.app-showcase-card:has(.showcase-visit:hover) .app-showcase-image, .app-showcase-card:has(.showcase-visit:focus-visible) .app-showcase-image { transform: scale(1.025); }
.showcase-visit:hover .showcase-arrow { background: var(--arrow-hover); }
.app-showcase-card:has(.showcase-visit:focus-visible) { outline: 2px solid #c9dfff; outline-offset: 6px; }
.desert-continuation .showcase-visit:focus-visible { outline-color: #17263d; }

/* Per-project palettes */
.card-spotkcal   { --card-bg: #ffc9ad; --card-ink: #3a1708; --icon-bg: #fff; --tag-line: #3a170855; --m-copy: linear-gradient(90deg, #ffbf9e, #ffe3d4); }
.card-blackenium { --card-bg: #ead9bf; --card-ink: #2f2212; --icon-bg: #f47b3d; --tag-line: #2f221255; --m-copy: linear-gradient(90deg, #e6d2b4, #f4ead9); }
.card-exclusive  { --card-bg: #d9dde3; --card-ink: #111418; --icon-bg: #0b0b0b; --tag-line: #11141855; --m-copy: linear-gradient(90deg, #cfd4db, #eef0f3); }
.card-tmh        { --card-bg: #c9dcf5; --card-ink: #14284a; --icon-bg: #fff; --tag-line: #14284a55; --m-copy: linear-gradient(90deg, #bcd3f2, #e3eefc); }
.card-etiodoc    { --card-bg: #f3d3d6; --card-ink: #4a1418; --icon-bg: #fff; --tag-line: #4a141855; --m-copy: linear-gradient(90deg, #efc8cc, #fbe9ea); }
.card-hytale     { --card-bg: #d9d6f5; --card-ink: #221c4a; --icon-bg: #fff; --tag-line: #221c4a55; --m-copy: linear-gradient(90deg, #ccc7f1, #ecebfb); }
.card-astrale    { --card-bg: #c6e8ea; --card-ink: #0f3a40; --icon-bg: #0b1020; --tag-line: #0f3a4055; --m-copy: linear-gradient(90deg, #b8e1e4, #e2f5f5); }
.card-astrale .showcase-icon img { padding: 4px; }
.card-blackenium .showcase-icon img { padding: 11px; filter: brightness(0) invert(1); }
.card-exclusive .showcase-icon img { padding: 2px; }
.card-tmh .showcase-icon img, .card-hytale .showcase-icon img { padding: 8px; }
.card-etiodoc .showcase-icon img { padding: 6px; }

/* ---------- Contact / footer ---------- */
.contact-section { border-top: 1px solid #71849c44; }
.contact-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 25px; padding-block: 68px; text-align: center; }
.contact-section h2 { font-size: clamp(32px, 3.2vw, 44px); }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.email-link { white-space: nowrap; font-size: 12px; }

.site-footer { padding-top: 33px; padding-bottom: 17px; }
.footer-row { display: flex; align-items: center; gap: 24px; font-size: 11px; color: var(--muted); }
.footer-row nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.footer-row nav a { padding-block: 14px; }
.back-top { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #acbacc; border-radius: 50%; }
.footer-wordmark { margin-top: 18px; font-family: var(--font-brand); font-size: clamp(44px, 10.9vw, 156px); font-weight: 600; line-height: 1.2; letter-spacing: -0.065em; white-space: nowrap; color: #758aa4; user-select: none; -webkit-user-select: none; }

/* ---------- Home page dark "desert" theme ---------- */
.home-page { background: linear-gradient(to bottom, #f5f7fa 0 76px, var(--desert) 76px 100%); }
.home-page .site-header { color: #fff; background: transparent; mix-blend-mode: difference; }
.home-page .site-header .desktop-nav a, .home-page .site-header .language-switch button, .home-page .site-header .menu-toggle { color: #fff; }
.home-page .site-header .language-switch button:not([aria-current]) { opacity: 0.8; }
.home-page .site-header .nav-contact { color: #fff; background: transparent; border-color: #fff; }
.home-page .site-header .menu-toggle { border-color: #fff; }
.home-page .site-header a:focus-visible, .home-page .site-header button:focus-visible { outline-color: #fff; }
.home-page .site-header[data-menu-open="true"] { mix-blend-mode: normal; background: #050607; }
.home-page .mobile-menu { color: #fff; background: #050607; border-color: #71849c44; }
.home-page .site-header[data-scrolled="true"] { mix-blend-mode: normal; background: #050607cc; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 1px #ffffff14; }
.desert-continuation, .home-page .site-footer { --muted: #b7c1cf; --line: #71849c44; color: #f0f4fb; }
.desert-continuation { background: var(--desert); }
.desert-continuation .button-secondary { color: #f0f4fb; border-color: #92a5bf; }
.desert-continuation .button-secondary:hover { background: #ffffff0a; border-color: #f0f4fb; }
.desert-continuation a:focus-visible, .desert-continuation button:focus-visible, .home-page .site-footer a:focus-visible { outline-color: #c9dfff; }
.home-page .site-footer { border-top: 1px solid var(--line); }
.home-page .footer-row a:hover { color: #fff; }
.home-page .footer-wordmark { color: #91a3bb; }
.home-page .back-top { border-color: #71849c66; }

/* ---------- Motion ---------- */
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .container { width: calc(100% - 64px); }
  .nav-row { gap: 25px; }
  .hero { min-height: 710px; }
  .hero-copy { padding-top: 82px; }
  .hero h1 { font-size: clamp(42px, 5.6vw, 54px); }
  .button { padding-inline: 15px; }
  .app-showcase { grid-template-columns: 1fr; gap: 28px; padding-block: 72px 90px; }
  .showcase-sidebar { position: static; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
  .showcase-sidebar h2 { margin: 0; }
  .showcase-nav { flex-direction: row; flex-wrap: wrap; gap: 4px 22px; }
  .showcase-nav a { gap: 9px; font-size: 18px; }
  .showcase-gallery { gap: 40px; }
  .app-showcase-copy p { font-size: 13px; }
  .contact-inner { padding-block: 48px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 90px; }
  .container { width: calc(100% - 48px); }
  .nav-row { display: flex; gap: 8px; }
  .brand { margin-right: auto; gap: 5px; font-size: 15px; letter-spacing: -0.6px; }
  .brand img { width: 24px; height: 24px; }
  .desktop-nav { display: none; }
  .nav-contact { min-height: 34px; padding: 7px 10px; font-size: 10px; }
  .menu-toggle { display: grid; }
  .language-switch { gap: 0; }
  .language-switch button { min-width: 27px; }
  .nav-actions { gap: 6px; }

  .hero { min-height: 610px; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #f5f7fa; }
  .hero-copy { padding-top: 50px; padding-bottom: 340px; }
  .hero h1 { font-size: clamp(34px, 8.5vw, 48px); line-height: 1.08; letter-spacing: -0.04em; }
  .hero-sub { font-size: 13px; }
  .hero-actions { gap: 10px; margin-top: 25px; }
  .hero-actions .button { min-height: 40px; padding-inline: 14px; font-size: 11px; }
  .hero-landscape { top: auto; height: 430px; }

  .section h2 { font-size: 32px; }
  .app-showcase { gap: 24px; padding-block: 50px 70px; }
  .showcase-sidebar { gap: 16px; }
  .showcase-nav { gap: 0 22px; }
  .showcase-nav a { min-height: 36px; font-size: 17px; }
  .showcase-gallery { gap: 24px; }
  .app-showcase-card { display: flex; flex-direction: column; aspect-ratio: auto; min-height: 0; padding-bottom: 53px; border-radius: 18px; }
  .app-showcase-card.no-visit { padding-bottom: 0; }
  .app-showcase-image { position: relative; inset: auto; z-index: 0; display: block; height: auto; aspect-ratio: 1.02; object-fit: cover; object-position: 78% center; }
  .app-showcase-copy { order: -1; display: grid; grid-template-columns: 48px 1fr; gap: 7px 14px; width: auto; padding: 24px 24px 20px; background: var(--m-copy); }
  .showcase-icon { grid-row: span 2; width: 48px; height: 48px; margin: 0; border-radius: 12px; }
  .app-showcase-copy h3 { align-self: end; font-size: 22px; }
  .app-showcase-copy p { grid-column: 2; max-width: none; margin: 0; font-size: 12px; }
  .showcase-tags { grid-column: 2; max-width: none; margin-top: 4px; }
  .showcase-status { font-size: 10px; }
  .showcase-visit { left: 24px; right: 24px; bottom: 18px; }
  .showcase-arrow { width: 36px; height: 36px; background: transparent; }

  .contact-inner { gap: 27px; padding-block: 44px; }
  .contact-section h2 { font-size: 34px; }
  .email-link { min-height: 40px; }

  .site-footer { padding-top: 28px; padding-bottom: 18px; }
  .footer-row { flex-wrap: wrap; gap: 9px; }
  .footer-row nav { order: 3; flex-wrap: wrap; gap: 0 19px; width: 100%; margin-left: 0; font-size: 10px; }
  .back-top { margin-left: auto; }
  .footer-wordmark { margin-top: 13px; font-size: 10.7vw; }
}

@media (max-width: 360px) {
  .container { width: calc(100% - 32px); }
  .brand { font-size: 13px; }
  .brand img { width: 20px; height: 20px; }
  .hero h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .button:hover, .button:active { transform: none; }
  .app-showcase-card .app-showcase-image { transform: none !important; }
}
