:root {
  color-scheme: dark;
  --page: #071126;
  --surface: #0b1b38;
  --surface-raised: #0d2041;
  --surface-soft: #10294f;
  --text: #f4f8ff;
  --muted: #a8b8d4;
  --subtle: #7689a8;
  --line: rgba(145, 178, 226, 0.2);
  --cyan: #35d9ff;
  --blue: #2575ff;
  --violet: #b279ff;
  --gold: #f2c46b;
  --header-glass: linear-gradient(180deg, rgba(4, 12, 29, 0.73), rgba(4, 12, 29, 0.12));
  --shadow: 0 24px 70px rgba(0, 5, 20, 0.3);
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f5f8fe;
  --surface: #ffffff;
  --surface-raised: #f0f5fc;
  --surface-soft: #e6f0fd;
  --text: #0d1b3b;
  --muted: #4c5e7b;
  --subtle: #6d7e99;
  --line: rgba(38, 76, 131, 0.16);
  --cyan: #00a9d6;
  --blue: #155ce4;
  --violet: #8244dc;
  --gold: #b98525;
  --header-glass: rgba(250, 252, 255, 0.9);
  --shadow: 0 22px 60px rgba(34, 71, 126, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  transition: background-color 220ms ease, color 220ms ease;
}

body,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

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

.page-shell,
.section-shell,
.header-inner {
  width: min(100% - 56px, 1320px);
  margin-inline: auto;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 50;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  clip: auto;
  color: #071126;
  background: #fff;
  border-radius: 10px;
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--header-glass);
  transition: transform 300ms cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-105%);
}

.site-header.is-hidden:focus-within {
  transform: translateY(0);
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 31px;
  height: 44px;
  flex: 0 0 31px;
  overflow: hidden;
}

.brand-mark img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mark-light {
  display: none;
}

:root[data-theme="light"] .mark-light {
  display: block;
}

:root[data-theme="light"] .mark-dark {
  display: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.brand-name span {
  color: #b6d9ff;
  font-weight: 500;
}

:root[data-theme="light"] .brand-name,
:root[data-theme="light"] .brand-name span {
  color: #0d1b3b;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.site-nav > a {
  padding: 8px 0;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav > a:hover,
.site-nav > a:focus-visible {
  color: var(--cyan);
}

.theme-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: #f4f8ff;
  border: 1px solid rgba(210, 230, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 20, 43, 0.42);
  cursor: pointer;
}

.theme-icon {
  color: var(--gold);
  font-size: 17px;
}

:root[data-theme="light"] .site-header {
  background: rgba(250, 252, 255, 0.9);
  border-color: var(--line);
}

:root[data-theme="light"] .site-nav {
  color: #1d2a47;
}

:root[data-theme="light"] .theme-toggle {
  color: #1d2a47;
  background: #fff;
  border-color: var(--line);
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  display: flex;
  min-height: clamp(820px, 100svh, 1120px);
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #09142c;
}

.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: url("assets/roo-world-promo-v2.png");
  background-position: center center;
  background-size: cover;
  transform: scale(1.02);
  animation: hero-art-drift 32s ease-in-out infinite alternate;
}

@keyframes hero-art-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-0.35%, 0.25%, 0); }
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 12, 32, 0.97) 0%, rgba(3, 12, 32, 0.9) 26%, rgba(4, 15, 37, 0.45) 53%, rgba(4, 15, 37, 0.08) 100%),
    linear-gradient(0deg, rgba(4, 12, 29, 0.72), transparent 30%, rgba(4, 12, 29, 0.08) 80%);
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 74px;
}

.hero-copy {
  width: min(100%, 610px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow > span {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: url("assets/gamiroo-icon-dark.png") center / contain no-repeat;
}

:root[data-theme="light"] .eyebrow > span:not(.contact-dialog-mark) {
  background-image: url("assets/gamiroo-icon-light.png");
}

.hero h1,
.section-heading h2,
.approach h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero h1 {
  max-width: 560px;
  font-size: clamp(54px, 7.1vw, 94px);
}

.hero h1 span,
.section-heading h2 span,
.approach h2 span {
  color: transparent;
  background: linear-gradient(100deg, #32dcff 6%, #2282ff 55%, #b977ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-description {
  max-width: 500px;
  margin: 24px 0 0;
  color: rgba(242, 247, 255, 0.84);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 31px;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button-primary::after {
  position: absolute;
  z-index: -1;
  top: -60%;
  bottom: -60%;
  left: -45%;
  width: 28%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: skewX(-22deg) translateX(-180%);
  transition: transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.button-primary:hover::after,
.button-primary:focus-visible::after {
  transform: skewX(-22deg) translateX(650%);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #041128;
  background: linear-gradient(100deg, #42e2ff, #2584ff 66%, #7657ff);
  box-shadow: 0 10px 30px rgba(25, 133, 255, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 14px 35px rgba(25, 133, 255, 0.42);
}

.button span {
  font-size: 18px;
  line-height: 1;
}

.hero-note {
  color: rgba(236, 244, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll {
  position: absolute;
  right: 0;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-scroll span {
  width: 28px;
  height: 1px;
  background: var(--cyan);
  transform-origin: left;
  animation: hero-scroll-pulse 2.6s ease-in-out infinite;
}

@keyframes hero-scroll-pulse {
  0%, 100% { opacity: 0.55; transform: scaleX(0.68); }
  50% { opacity: 1; transform: scaleX(1); }
}

:root[data-theme="light"] .hero::before {
  background:
    linear-gradient(90deg, rgba(246, 250, 255, 0.98) 0%, rgba(246, 250, 255, 0.94) 24%, rgba(246, 250, 255, 0.67) 45%, rgba(246, 250, 255, 0.04) 75%),
    linear-gradient(0deg, rgba(246, 250, 255, 0.56), transparent 34%);
}

:root[data-theme="light"] .hero-description {
  color: #354660;
}

:root[data-theme="light"] .hero-note,
:root[data-theme="light"] .hero-scroll {
  color: #3d4c65;
}

.projects {
  position: relative;
  padding-top: 76px;
  padding-bottom: 80px;
}

.projects::before,
.approach::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(860px, 82%);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(53, 217, 255, 0.82), rgba(178, 121, 255, 0.56), transparent);
  opacity: 0.36;
  transform: translateX(-50%) scaleX(0.28);
  transform-origin: center;
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.18, 0.7, 0.18, 1);
}

.projects.is-visible::before,
.approach.is-visible::before {
  opacity: 0.9;
  transform: translateX(-50%) scaleX(1);
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-heading .eyebrow {
  justify-content: center;
}

.section-heading h2 {
  font-size: clamp(31px, 4vw, 49px);
  letter-spacing: -0.055em;
}

.section-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

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

.project-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: #071126;
  background-image: linear-gradient(180deg, rgba(4, 12, 29, 0.02) 28%, rgba(4, 12, 29, 0.4) 100%), var(--project-card-image);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 190ms ease, border-color 190ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(53, 217, 255, 0.48);
}

.project-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.project-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background: transparent;
}

.project-visual::before {
  position: absolute;
  z-index: 1;
  top: -45%;
  bottom: -45%;
  left: -38%;
  width: 26%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(198, 237, 255, 0.23), transparent);
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg) translateX(-220%);
  transition: opacity 120ms ease, transform 780ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover .project-visual::before,
.project-card:focus-visible .project-visual::before {
  opacity: 1;
  transform: skewX(-18deg) translateX(650%);
}

.project-visual::after {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  content: "";
  background: linear-gradient(0deg, rgba(3, 9, 23, 0.88), transparent);
  pointer-events: none;
}

.project-logo {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 102px;
  object-fit: contain;
}

.mark-dark { display: block; }

:root[data-theme="light"] .project-logo.mark-light,
:root[data-theme="light"] .detail-brand-logo.mark-light {
  display: block;
}

.project-logo.mark-light,
.detail-brand-logo.mark-light {
  display: none;
}

.development-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #f6f9ff;
  border: 1px solid rgba(224, 236, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 16, 37, 0.78);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.development-badge > span {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #ffca70;
  box-shadow: 0 0 10px rgba(255, 202, 112, 0.72);
}

.design-concept-badge {
  border-color: rgba(255, 208, 120, 0.5);
  background: rgba(21, 22, 42, 0.88);
}

.design-concept-badge > span {
  background: #62e7ff;
  box-shadow: 0 0 10px rgba(98, 231, 255, 0.78);
}

.balance-visual {
  background: transparent;
}

.balance-logo {
  width: min(100%, 236px);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.22));
}

.os-visual {
  background: transparent;
}

.os-logo {
  width: min(100%, 370px);
  max-height: 126px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.26));
}

.roo-visual {
  background: transparent;
}

.echo-visual {
  background: transparent;
}

.gotp-visual {
  background: transparent;
}

.roo-logo {
  width: min(100%, 330px);
  max-height: 122px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.gotp-card-wordmark {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  color: #f7f1dc;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.55));
}

.gotp-card-wordmark strong {
  color: #f5d27c;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px rgba(74, 218, 255, 0.55);
}

.gotp-card-wordmark span {
  margin-top: 6px;
  color: #8feaff;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.6vw, 18px);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-balance {
  --project-card-image: url("assets/balance-kitchen-header.webp");
}

.project-os {
  --project-card-image: url("assets/gamiroos-header-v2.webp");
}

.project-roo {
  --project-card-image: url("assets/roo-world-header.webp");
  background-position: 62% center;
}

.project-echo {
  --project-card-image: url("assets/echoree/whisper-hero.webp");
}

.project-gotp {
  --project-card-image: url("assets/gotp-pvp-battle.webp");
}

@media (max-width: 620px) {
  .project-balance,
  .project-os,
  .project-roo,
  .project-echo,
  .project-gotp {
    background-position: 68% center;
  }
}

.echo-logo {
  width: min(100%, 230px);
  max-height: 92px;
}

.visual-caption {
  position: absolute;
  z-index: 2;
  top: 17px;
  display: block;
  width: fit-content;
  max-width: 70%;
  left: 18px;
  padding: 8px 10px;
  color: rgba(248, 251, 255, 0.82);
  border: 1px solid rgba(231, 241, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 13, 31, 0.38);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-align: left;
  text-transform: uppercase;
}

.project-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
  padding: 19px 19px 21px;
  color: #f5f8ff;
  border-top: 1px solid rgba(231, 241, 255, 0.16);
  background: rgba(4, 13, 31, 0.46);
  backdrop-filter: blur(9px);
}

.project-content .project-type,
.project-content > p:not(.project-type) {
  color: rgba(242, 247, 255, 0.78);
}

.project-type {
  margin: 0 0 6px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.04em;
  line-height: 1.2;
  transition: color 180ms ease;
}

.project-card:hover .project-content h3,
.project-card:focus-visible .project-content h3 {
  color: var(--cyan);
}

.project-content > p:not(.project-type) {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.text-link span {
  font-size: 16px;
  transition: transform 150ms ease;
}

.text-link:hover span,
.text-link:focus-visible span {
  transform: translate(2px, -2px);
}

:root[data-theme="light"] .project-visual::after {
  height: 50%;
  background: linear-gradient(0deg, rgba(4, 13, 31, 0.3), transparent);
}

:root[data-theme="light"] .balance-visual {
  background: transparent;
}

:root[data-theme="light"] .text-link {
  color: #145be0;
}

html.motion-ready .motion-target {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: opacity, transform;
}

html.motion-ready .motion-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.motion-ready .hero-copy > :nth-child(1) { transition-delay: 70ms; }
html.motion-ready .hero-copy > :nth-child(2) { transition-delay: 180ms; }
html.motion-ready .hero-copy > :nth-child(3) { transition-delay: 290ms; }
html.motion-ready .hero-copy > :nth-child(4) { transition-delay: 400ms; }

html.motion-ready .project-card:nth-child(2) {
  transition-delay: 70ms;
}

html.motion-ready .project-card:nth-child(3) {
  transition-delay: 140ms;
}

html.motion-ready .project-card:nth-child(4) {
  transition-delay: 210ms;
}

html.motion-ready .project-card:nth-child(5) {
  transition-delay: 280ms;
}

.approach {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.1fr) minmax(340px, 1.2fr);
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
  padding-top: 27px;
  padding-bottom: 29px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.approach .eyebrow {
  margin-bottom: 13px;
}

.approach h2 {
  font-size: clamp(27px, 3vw, 37px);
  line-height: 1.08;
}

.approach-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.approach-points {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.approach-points::before {
  position: absolute;
  top: 19px;
  right: 17%;
  left: 17%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold));
  opacity: 0.48;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1000ms cubic-bezier(0.18, 0.7, 0.18, 1) 180ms;
}

.approach.is-visible .approach-points::before {
  transform: scaleX(1);
}

.approach-point {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 9px;
  padding-inline: 8px;
  color: var(--text);
  border-left: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.point-icon {
  z-index: 1;
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--page);
  font-size: 23px;
  line-height: 1;
  transition: transform 420ms ease, box-shadow 420ms ease;
}

.approach.is-visible .approach-point:nth-child(1) .point-icon { transition-delay: 220ms; }
.approach.is-visible .approach-point:nth-child(2) .point-icon { transition-delay: 360ms; }
.approach.is-visible .approach-point:nth-child(3) .point-icon { transition-delay: 500ms; }

.approach.is-visible .point-icon {
  transform: scale(1.08);
  box-shadow: 0 0 21px rgba(53, 217, 255, 0.18);
}

.approach-point:nth-child(2) .point-icon {
  color: var(--violet);
}

.approach-point:nth-child(3) .point-icon {
  color: var(--gold);
}

.closing-landscape {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(4, 12, 29, 0.48) 0%, rgba(4, 12, 29, 0.58) 38%, rgba(4, 12, 29, 0.78) 100%),
    url("assets/gamiroo-footer-panorama.webp") center top / cover no-repeat;
}

:root[data-theme="light"] .closing-landscape {
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.72) 0%, rgba(250, 252, 255, 0.76) 48%, rgba(250, 252, 255, 0.84) 100%),
    url("assets/gamiroo-footer-panorama.webp") center top / cover no-repeat;
}

.site-footer {
  position: relative;
  display: flex;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  min-height: min(62svh, 680px);
  align-items: center;
  isolation: isolate;
  overflow: visible;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 42px 0 26px;
}

.footer-inner {
  width: min(100% - 56px, 1320px);
  margin-inline: auto;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(120px, 0.6fr) minmax(190px, 0.9fr) minmax(230px, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  padding-bottom: 42px;
  text-align: center;
}

.footer-brand-column {
  display: grid;
  justify-items: center;
  max-width: 340px;
}

.footer-brand {
  color: var(--text);
}

.footer-tagline {
  margin: 22px 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.footer-summary {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.footer-link-column {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.footer-link-column h2 {
  margin: 5px 0 8px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-link-column a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-link-column a:hover,
.footer-link-column a:focus-visible {
  color: var(--cyan);
}

.footer-contact {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.footer-contact .eyebrow {
  margin: 3px 0 12px;
}

.footer-contact h2 {
  max-width: 270px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.footer-contact > p:not(.eyebrow) {
  max-width: 280px;
  margin: 10px 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.footer-contact .contact-open {
  margin-top: 2px;
}

.contact-dialog {
  width: min(92vw, 590px);
  max-width: none;
  max-height: min(90dvh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(112, 183, 255, 0.4);
  border-radius: 24px;
  color: var(--text);
  background:
    radial-gradient(ellipse at 95% 0%, rgba(53, 217, 255, 0.11), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 96%, #102d56), var(--page));
  box-shadow: 0 32px 110px rgba(0, 4, 16, 0.55), 0 0 45px rgba(53, 217, 255, 0.12);
  animation: contact-dialog-appear 260ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.contact-dialog::backdrop {
  background: rgba(2, 8, 22, 0.76);
  backdrop-filter: blur(8px);
  animation: contact-backdrop-appear 220ms ease both;
}

.contact-dialog-shell {
  position: relative;
  padding: clamp(22px, 5vw, 38px);
}

.contact-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.contact-dialog-close:hover,
.contact-dialog-close:focus-visible {
  transform: rotate(90deg);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px rgba(53, 217, 255, 0.16);
}

.contact-dialog-shell > .eyebrow {
  margin: 0 44px 10px 0;
}

.contact-dialog .eyebrow > .contact-dialog-mark {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: none;
}

.contact-dialog-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-dialog-shell > h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 4.5vw, 38px);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.contact-dialog-intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-dialog .contact-form {
  width: 100%;
  max-width: none;
  margin-top: 22px;
}

@keyframes contact-dialog-appear {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes contact-backdrop-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

.contact-form {
  position: relative;
  display: grid;
  width: min(100%, 390px);
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(9, 23, 50, 0.88), rgba(12, 30, 61, 0.72)) padding-box,
    conic-gradient(from var(--contact-angle, 0deg), rgba(53, 217, 255, 0.34), rgba(178, 121, 255, 0.65), rgba(242, 196, 107, 0.34), rgba(53, 217, 255, 0.34)) border-box;
  box-shadow: 0 18px 55px rgba(0, 5, 20, 0.2), inset 0 1px rgba(255, 255, 255, 0.06);
  animation: contact-frame 18s linear infinite;
}

:root[data-theme="light"] .contact-form {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 255, 0.88)) padding-box,
    conic-gradient(from var(--contact-angle, 0deg), rgba(0, 169, 214, 0.3), rgba(130, 68, 220, 0.5), rgba(185, 133, 37, 0.26), rgba(0, 169, 214, 0.3)) border-box;
}

.contact-form::before {
  position: absolute;
  z-index: -1;
  top: -88px;
  right: -55px;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(53, 217, 255, 0.14), transparent 68%);
  animation: contact-pulse 5s ease-in-out infinite alternate;
  pointer-events: none;
}

.contact-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  text-align: left;
}

.contact-field-message,
.contact-field-topic {
  grid-column: 1 / -1;
}

.contact-field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: rgba(4, 13, 31, 0.42);
  font: inherit;
  font-size: 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

:root[data-theme="light"] .contact-field input,
:root[data-theme="light"] .contact-field select,
:root[data-theme="light"] .contact-field textarea {
  background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .contact-field select {
  border-color: rgba(21, 92, 228, 0.28);
  background-color: color-mix(in srgb, var(--blue) 10%, var(--surface-raised));
}

.contact-field textarea {
  min-height: 94px;
  resize: vertical;
}

.contact-field select {
  cursor: pointer;
  border-color: rgba(75, 157, 255, 0.42);
  background-color: color-mix(in srgb, var(--blue) 17%, var(--surface-raised));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.contact-field select option {
  color: var(--text);
  background-color: var(--surface-raised);
}

.contact-field select option:checked {
  color: #fff;
  background-color: var(--blue);
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--cyan);
  background-color: rgba(4, 13, 31, 0.62);
  box-shadow: 0 0 0 3px rgba(53, 217, 255, 0.12), 0 0 22px rgba(53, 217, 255, 0.13);
  transform: translateY(-1px);
}

:root[data-theme="light"] .contact-field input:focus,
:root[data-theme="light"] .contact-field select:focus,
:root[data-theme="light"] .contact-field textarea:focus {
  background-color: #fff;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--subtle);
}

.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit-row {
  display: grid;
  grid-column: 1 / -1;
  justify-items: stretch;
  gap: 8px;
}

.contact-submit {
  width: 100%;
  min-height: 45px;
  justify-content: space-between;
  padding-inline: 17px;
  cursor: pointer;
}

.contact-submit-label {
  font-size: 12px !important;
}

.contact-submit-orb {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 0 13px rgba(255, 255, 255, 0.95);
  animation: contact-orb 2.4s ease-in-out infinite;
}

.contact-submit:disabled {
  cursor: wait;
  filter: saturate(0.82);
}

.contact-submit.is-sending .contact-submit-orb {
  animation-duration: 550ms;
}

.contact-status,
.contact-privacy {
  min-height: 1.3em;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.contact-status[data-state="success"] {
  color: #7de4b5;
}

.contact-status[data-state="error"] {
  color: #ff9aab;
}

:root[data-theme="light"] .contact-status[data-state="success"] {
  color: #167f55;
}

:root[data-theme="light"] .contact-status[data-state="error"] {
  color: #b32e4c;
}

.contact-privacy {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--subtle);
}

@property --contact-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes contact-frame {
  to { --contact-angle: 360deg; }
}

@keyframes contact-pulse {
  from { opacity: 0.45; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1.12); }
}

@keyframes contact-orb {
  0%, 100% { opacity: 0.6; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.18); }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 10px;
  text-align: center;
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: none;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: var(--cyan);
}

:focus-visible {
  outline: 3px solid rgba(53, 217, 255, 0.72);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 48px;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
    max-width: 560px;
  }

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

  .approach-points {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 72px;
  }

  .page-shell,
  .section-shell,
  .header-inner {
    width: min(100% - 36px, 580px);
  }

  .site-header {
    height: 70px;
  }

  .brand-mark {
    width: 32px;
    height: 39px;
    flex-basis: 32px;
  }

  .brand-mark img {
    width: 100%;
    height: 100%;
  }

  .brand-name {
    font-size: 16px;
  }

  .menu-toggle {
    display: flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(210, 230, 255, 0.28);
    border-radius: 50%;
    background: rgba(8, 20, 43, 0.55);
    cursor: pointer;
  }

  .menu-toggle > span:not(.sr-only) {
    width: 17px;
    height: 2px;
    background: #fff;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 12px 18px 18px;
    color: var(--text);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a {
    padding: 11px 8px;
  }

  .theme-toggle {
    align-self: flex-start;
    margin-top: 5px;
  }

  :root[data-theme="light"] .menu-toggle {
    background: #fff;
    border-color: var(--line);
  }

  :root[data-theme="light"] .menu-toggle > span:not(.sr-only) {
    background: #152342;
  }

  .hero {
    min-height: max(780px, 100svh);
    align-items: flex-start;
  }

  .hero-art {
    background-position: 46% center;
    background-size: auto 100%;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(3, 12, 32, 0.92), rgba(3, 12, 32, 0.56) 64%, rgba(3, 12, 32, 0.16)),
      linear-gradient(0deg, rgba(4, 12, 29, 0.82), transparent 57%);
  }

  :root[data-theme="light"] .hero::before {
    background:
      linear-gradient(90deg, rgba(246, 250, 255, 0.96), rgba(246, 250, 255, 0.76) 70%, rgba(246, 250, 255, 0.28)),
      linear-gradient(0deg, rgba(246, 250, 255, 0.75), transparent 58%);
  }

  .hero-inner {
    min-height: inherit;
    padding-top: 132px;
    padding-bottom: 76px;
  }

  .hero-copy {
    width: min(100%, 500px);
  }

  .hero h1 {
    font-size: clamp(52px, 14vw, 78px);
  }

  .hero-description {
    max-width: 430px;
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-scroll {
    left: 0;
    right: auto;
  }

  .projects {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .section-heading {
    margin-bottom: 24px;
    text-align: left;
  }

  .section-heading .eyebrow {
    justify-content: flex-start;
  }

  .section-heading h2 {
    font-size: clamp(31px, 9vw, 44px);
  }

  .section-heading > p:last-child {
    font-size: 13px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .project-card {
    display: flex;
    min-height: 370px;
    border-radius: 15px;
  }

  .project-visual {
    min-height: 0;
    padding: 14px;
  }

  .project-visual > .development-badge {
    top: 7px;
    right: 7px;
    gap: 4px;
    padding: 5px 7px;
    font-size: 7px;
  }

  .project-visual > .development-badge > span {
    width: 5px;
    height: 5px;
    flex-basis: 5px;
  }

  .project-logo {
    max-height: 82px;
  }

  .roo-logo {
    max-height: 100px;
  }

  .balance-logo {
    max-height: 100px;
  }

  .visual-caption {
    display: none;
  }

  .project-content {
    padding: 15px 15px 16px;
  }

  .project-content h3 {
    font-size: 16px;
  }

  .project-content > p:not(.project-type) {
    margin: 7px 0 11px;
    font-size: 11px;
  }

  .text-link {
    font-size: 10px;
  }

  .approach {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .approach-points {
    grid-column: auto;
  }

  .approach-point {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding-left: 12px;
    font-size: 9px;
  }

  .point-icon {
    font-size: 24px;
  }

  .site-footer {
    padding: 36px 0 18px;
  }

  .footer-inner {
    width: min(100% - 36px, 580px);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
  }

  .footer-brand-column {
    grid-column: auto;
  }

  .footer-contact {
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-bottom {
    padding-top: 14px;
  }
}

@media (max-width: 390px) {
  .brand-name {
    font-size: 14px;
  }

  .project-card {
    min-height: 350px;
  }

  .project-content {
    padding: 12px;
  }

  .project-type {
    font-size: 8px;
  }
}

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