/* ==========================================================
   Tearevo — studio site
   Palette & typeface follow _utils/project.md
   ========================================================== */

@font-face {
  font-family: 'SofiaSite';
  src: url('fonts/SofiaSansExtraCondensed-Bold.woff2') format('woff2'),
       url('fonts/SofiaSansExtraCondensed-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #101010;
  --bg-raise: #151515;
  --bg-card: linear-gradient(180deg, rgba(255, 247, 217, .055), rgba(16, 16, 16, .9));

  --cream: #fff7d9;      /* headings, highlights */
  --text: #b5ae94;       /* body text */
  --gold: #fdcf82;       /* secondary text */
  --teal: #59e3e2;       /* accents, names, links */
  --teal-bright: #21fcfe;/* link hover */
  --cta-text: #e5dbba;   /* CTA label default */
  --error: #ff4444;

  --line: rgba(89, 227, 226, .34);
  --line-soft: rgba(89, 227, 226, .16);
  --line-warm: rgba(253, 207, 130, .26);
  --line-muted: rgba(181, 174, 148, .18);
  --glow: 0 0 28px rgba(89, 227, 226, .12);

  --font: 'SofiaSite', 'Arial Narrow', Arial, sans-serif;
  --fs-body: clamp(19px, 1rem + .45vw, 24px);
  --fs-lead: clamp(23px, 1.2rem + .7vw, 30px);
  --fs-h2: clamp(40px, 1.6rem + 2.6vw, 64px);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 56px; }
}

/* ---------- Base ---------- */

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

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html.is-locked { overflow: hidden; }

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.3;
  letter-spacing: .01em;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.game-active,
body.menu-open {
  overflow: hidden;
}

body.game-active { touch-action: none; }

img { max-width: 100%; height: auto; }

p { margin: 0 0 .8em; }

a { color: var(--teal); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--teal-bright); }

button { font: inherit; color: inherit; }

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

::selection { background: rgba(89, 227, 226, .3); color: var(--cream); }

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--teal);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-variant: small-caps;
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: none; color: var(--bg); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hl { color: var(--cream); }

.text-link {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(89, 227, 226, .35);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.text-link:hover,
.text-link:focus-visible {
  color: var(--teal-bright);
  text-decoration-color: currentColor;
}

.lead {
  color: var(--cream);
  font-size: var(--fs-lead);
  line-height: 1.2;
}

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

.btn {
  --btn-h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 22px;
  line-height: 1;
  letter-spacing: .05em;
  font-variant: small-caps;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease, transform .2s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary {
  color: #0d1717;
  background: linear-gradient(180deg, #7cf0ef 0%, var(--teal) 55%, #3fcfce 100%);
  border-color: rgba(33, 252, 254, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 30px -10px rgba(89, 227, 226, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  color: #071010;
  background: linear-gradient(180deg, #9ffaf9 0%, var(--teal-bright) 60%, #3fe3e2 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 14px 40px -10px rgba(33, 252, 254, .75), inset 0 1px 0 rgba(255, 255, 255, .55);
}

.btn--outline {
  color: var(--teal);
  background: rgba(89, 227, 226, .06);
  border-color: var(--line);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  color: var(--teal-bright);
  background: rgba(89, 227, 226, .12);
  border-color: rgba(33, 252, 254, .7);
  box-shadow: var(--glow);
}

.btn--ghost {
  color: var(--cta-text);
  background: rgba(253, 207, 130, .04);
  border-color: var(--line-warm);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--cream);
  background: rgba(253, 207, 130, .1);
  border-color: rgba(253, 207, 130, .6);
}
.btn--ghost .icon { color: var(--gold); }

.btn--sm { --btn-h: 40px; padding: 0 16px; font-size: 19px; }
.btn--sm .icon { width: 18px; height: 18px; }
.btn--lg { --btn-h: 58px; padding: 0 30px; font-size: 24px; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 21px;
  letter-spacing: .05em;
  font-variant: small-caps;
  white-space: nowrap;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 28px;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0);
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(16, 16, 16, .82);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: calc(1360px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  flex-shrink: 0;
}
.brand:hover { color: var(--cream); }
.brand__mark {
  width: 34px;
  height: 30px;
  color: var(--gold);
  transition: transform .4s var(--ease);
}
.brand__tear { fill: var(--teal); filter: drop-shadow(0 0 4px rgba(89, 227, 226, .7)); }
.brand:hover .brand__mark { transform: rotate(60deg); }
.brand__name {
  font-size: 26px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: var(--text);
  font-size: 21px;
  letter-spacing: .05em;
  font-variant: small-caps;
}
.site-nav__link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.site-nav__link:hover { color: var(--cream); }
.site-nav__link.is-active { color: var(--cream); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }

.site-nav__cta { display: none; }

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: rgba(16, 16, 16, .5);
}
.lang-switch__btn {
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.lang-switch__btn:hover { color: var(--cream); }
.lang-switch__btn[aria-pressed="true"] {
  background: rgba(89, 227, 226, .16);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(89, 227, 226, .35);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease), opacity .2s ease, top .3s var(--ease);
}
.menu-toggle__bar { top: 21px; }
.menu-toggle__bar::before,
.menu-toggle__bar::after { content: ''; left: 0; }
.menu-toggle__bar::before { top: -7px; }
.menu-toggle__bar::after { top: 7px; }
body.menu-open .menu-toggle__bar { background: transparent; }
body.menu-open .menu-toggle__bar::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-toggle__bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 767px) {
  /* backdrop-filter would become the containing block of the fixed menu sheet */
  .site-header.is-scrolled,
  .site-header.is-solid,
  body.menu-open .site-header {
    background: rgba(16, 16, 16, .96);
    border-bottom-color: var(--line-soft);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .menu-toggle { display: block; }
  .site-header__steam { display: none; }
  .site-header__tools { margin-left: auto; }

  .site-nav {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 24px;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0));
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0));
    background: rgba(16, 16, 16, .97);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s;
  }
  body.menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__list li { border-bottom: 1px solid var(--line-muted); }
  .site-nav__link {
    display: flex;
    height: auto;
    padding: 16px 0;
    color: var(--cream);
    font-size: 34px;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link.is-active { color: var(--teal); }

  .site-nav__cta { display: inline-flex; margin-top: auto; }
}

/* ---------- Stage / splash (game launcher) ---------- */

#stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0)) 0 0;
}

body.game-active #stage {
  position: fixed;
  inset: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  z-index: 60;
  padding: 0;
}
#stage.game-active {
  align-items: center;
  padding-top: 0;
}

#viewport {
  position: relative;
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 1280 / 760;
  cursor: pointer;
  isolation: isolate;
}
/* Keeps the launcher inside the first screen on laptops. */
#viewport:not(.game-active) {
  width: min(100%, 1280px, calc((100svh - var(--header-h) - 120px) * 1280 / 760));
  min-width: min(100%, 720px);
}

#viewport.game-active {
  width: 1280px;
  min-width: 0;
  max-width: none;
  height: 720px;
  aspect-ratio: auto;
  transform-origin: center center;
  flex-shrink: 0;
  cursor: default;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

#light-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#light-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#splash {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#container-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

#logo {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  width: 52.6%;
  max-width: 674px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
}

@media (prefers-reduced-motion: no-preference) {
  #logo { animation: logo-float 7s ease-in-out infinite; }
}

@keyframes logo-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 6px)); }
}

.play-cta {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--cta-text);
  font-family: var(--font);
  font-variant: small-caps;
  letter-spacing: .04em;
  user-select: none;
}
.play-cta:hover { color: var(--cta-text); }

#play-button {
  width: clamp(64px, 8.5vw, 112px);
  height: auto;
  transition: transform .25s var(--ease), filter .25s ease;
  transform-origin: center;
  filter: drop-shadow(0 0 0 rgba(89, 227, 226, 0));
}

@media (prefers-reduced-motion: no-preference) {
  .play-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: clamp(64px, 8.5vw, 112px);
    aspect-ratio: 1;
    border-radius: 22%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 0 rgba(89, 227, 226, .45);
    animation: play-pulse 2.6s ease-out infinite;
    pointer-events: none;
  }
}

@keyframes play-pulse {
  0% { box-shadow: 0 0 0 0 rgba(89, 227, 226, .4); }
  70%, 100% { box-shadow: 0 0 0 22px rgba(89, 227, 226, 0); }
}

#viewport:hover #play-button,
.play-cta:focus-visible #play-button {
  transform: scale(1.1);
  filter: drop-shadow(0 0 18px rgba(89, 227, 226, .55));
}

.play-label {
  color: var(--cta-text);
  transition: color .2s ease;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .45);
}
#viewport:hover .play-label,
.play-cta:focus-visible .play-label {
  color: var(--cream);
}

#viewport.game-active #splash,
#viewport.game-active #light-bg {
  display: none;
}
#viewport.game-active #game {
  opacity: 1;
  pointer-events: auto;
}

/* Phones in portrait: a taller launcher so logo and button stay readable. */
@media (max-width: 640px) and (orientation: portrait) {
  #viewport:not(.game-active) {
    aspect-ratio: 5 / 5.4;
    min-width: 0;
  }
  #logo { top: 36%; width: 88%; }
  .play-cta { top: 72%; gap: 12px; }
  #play-button,
  .play-cta::before { width: 78px; }
  .play-label { font-size: 26px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #stage:not(.game-active) {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
  }
  #viewport:not(.game-active) {
    width: auto;
    min-width: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    max-width: none;
  }
  #play-button,
  .play-cta::before { width: min(96px, 15vh); }
  .play-label { font-size: clamp(18px, 5vh, 36px); }
}

/* While playing, only the stage stays on screen. */
body.game-active .site-header,
body.game-active #landing-content,
body.game-active .site-footer,
body.game-active .skip-link {
  display: none;
}

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

#landing-content {
  position: relative;
  z-index: 5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  margin: clamp(-48px, -2.6vw, -4px) auto 0;
  padding: 0 var(--gutter);
}

.page {
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0));
}
.page:focus { outline: none; }
.section--page { padding-top: clamp(40px, 6vw, 80px); }

.section {
  position: relative;
  padding: clamp(56px, 8vw, 112px) 0;
}
.section:focus { outline: none; }

.section--studio { padding-top: clamp(40px, 5vw, 72px); }

.section-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head::after {
  content: '';
  order: 1;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent 85%);
}

.section-head .link-arrow { order: 2; }

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: var(--cream);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  font-variant: small-caps;
}
.section-title::before {
  content: '';
  flex-shrink: 0;
  width: .36em;
  height: .31em;
  background: var(--teal);
  clip-path: var(--hex);
  filter: drop-shadow(0 0 8px rgba(89, 227, 226, .8));
}

.ornament {
  position: relative;
  height: 24px;
  max-width: var(--container);
  margin: 0 auto;
  background:
    linear-gradient(90deg, transparent, var(--line-soft) 30%, var(--line) 50%, var(--line-soft) 70%, transparent) center / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.ornament::before,
.ornament::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  clip-path: var(--hex);
  transform: translate(-50%, -50%);
}
.ornament::before {
  width: 26px;
  height: 22px;
  background: var(--teal);
  opacity: .55;
}
.ornament::after {
  width: 22px;
  height: 18px;
  background: var(--bg);
}

/* ---------- Studio ---------- */

.section--studio::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 45% at 80% 55%, rgba(89, 227, 226, .06), transparent 72%);
  pointer-events: none;
}

.studio {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.studio__main p:last-child { margin-bottom: 0; }

.card {
  position: relative;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--glow);
}

.focus-card__title {
  margin: 0 0 20px;
  color: var(--cream);
  font-size: clamp(26px, 1.1rem + 1vw, 32px);
  line-height: 1;
  font-variant: small-caps;
}

.focus-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.focus-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: clamp(20px, 1.05rem + .3vw, 24px);
  line-height: 1.15;
}

.hex-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 38px;
  clip-path: var(--hex);
  background: linear-gradient(180deg, rgba(89, 227, 226, .32), rgba(89, 227, 226, .12));
  color: var(--teal);
  font-size: 17px;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.studio__quote {
  margin: 28px 0 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--gold);
  color: var(--text);
  font-size: clamp(20px, 1.05rem + .35vw, 24px);
  line-height: 1.25;
}

/* ---------- Contacts ---------- */

.section--contacts::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 45% at 50% 70%, rgba(89, 227, 226, .06), transparent 72%);
  pointer-events: none;
}

.contacts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 32px 20px 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-align: center;
  transition: border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease);
}
.contact-card__icon {
  display: grid;
  place-items: center;
  height: 64px;
  margin-bottom: 12px;
}
.contact-card__icon img {
  width: auto;
  height: 64px;
  transition: transform .3s var(--ease);
}
.contact-card__label {
  color: var(--cream);
  font-size: 24px;
  line-height: 1.1;
  font-variant: small-caps;
  letter-spacing: .03em;
  transition: color .2s ease;
}
.contact-card__hint {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.contact-card__arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  color: var(--teal);
  opacity: .5;
  transition: opacity .2s ease, transform .25s var(--ease);
}
.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--line);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}
.contact-card:hover .contact-card__icon img,
.contact-card:focus-visible .contact-card__icon img { transform: scale(1.06); }
.contact-card:hover .contact-card__label,
.contact-card:focus-visible .contact-card__label { color: var(--teal-bright); }
.contact-card:hover .contact-card__arrow,
.contact-card:focus-visible .contact-card__arrow { opacity: 1; transform: translate(2px, -2px); }

/* ---------- Projects ---------- */

.projects {
  display: grid;
  gap: clamp(14px, 1.8vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.projects--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.projects--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.project-card { scroll-margin-top: calc(var(--header-h) + 24px); }

.project-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: inherit;
  transition: border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease);
}
.project-card__link:hover,
.project-card__link:focus-visible {
  color: inherit;
  border-color: var(--line);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(89, 227, 226, .1), transparent 70%),
    var(--bg-raise);
  border-bottom: 1px solid var(--line-soft);
}
.project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.project-card__link:hover .project-card__media img,
.project-card__link:focus-visible .project-card__media img { transform: scale(1.04); }

/* Placeholder while a project has no cover image */
.project-card__media.is-empty::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 56px;
  background: var(--teal);
  opacity: .18;
  clip-path: var(--hex);
  transform: translate(-50%, -50%);
}
.project-card__media.is-empty::after {
  content: attr(data-name);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--cream);
  font-size: 26px;
  letter-spacing: .08em;
  font-variant: small-caps;
  white-space: nowrap;
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.project-card__type {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.project-card__title {
  margin: 0 0 10px;
  color: var(--cream);
  font-size: clamp(24px, 1.1rem + .6vw, 30px);
  line-height: 1;
  font-variant: small-caps;
  letter-spacing: .02em;
}

.project-card__text {
  margin: 0 0 18px;
  font-size: clamp(18px, 1rem + .2vw, 21px);
  line-height: 1.25;
}

.project-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--teal);
  font-size: 20px;
  letter-spacing: .05em;
  font-variant: small-caps;
  transition: color .2s ease;
}
.project-card__cta .icon { width: 18px; height: 18px; }
.project-card__host {
  color: var(--text);
  opacity: .7;
  font-variant: normal;
  letter-spacing: .02em;
}
.project-card__host::before { content: '\00B7\00A0'; }
.project-card__link:hover .project-card__cta,
.project-card__link:focus-visible .project-card__cta { color: var(--teal-bright); }

.projects--grid .project-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.projects--list .project-card__body { padding: 26px 28px 28px; }
.projects--list .project-card__title { font-size: clamp(28px, 1.2rem + 1.2vw, 40px); }
.projects--list .project-card__text { font-size: var(--fs-body); }

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

.site-footer {
  position: relative;
  padding: 48px 0 calc(28px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 247, 217, .025), transparent 60%);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px 40px;
}

.site-footer__tagline {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 18px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
}
.site-footer__nav a {
  color: var(--text);
  font-size: 20px;
  font-variant: small-caps;
  letter-spacing: .04em;
}
.site-footer__nav a:hover { color: var(--cream); }

.to-top {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 20px;
  font-variant: small-caps;
  letter-spacing: .05em;
}
.to-top .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.to-top:hover .icon { transform: translateY(-3px); }

.site-footer__legal {
  margin-top: 32px;
  color: rgba(181, 174, 148, .7);
  font-size: 17px;
}
.site-footer__legal p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-muted);
}

/* ---------- Reveal on scroll ---------- */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

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

@media (max-width: 1023px) {
  .studio { grid-template-columns: 1fr; }

  .projects--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .site-footer__inner {
    grid-template-columns: 1fr auto;
  }
  .site-footer__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .section-head { gap: 16px; }

  .projects--grid,
  .projects--list { grid-template-columns: 1fr; }

  .hero-actions { margin-top: 8px; }
  .hero-actions .btn,
  .actions .btn { flex: 1 1 100%; }

  .section-head .link-arrow { font-size: 19px; }

  .contact-card { padding: 24px 12px 20px; }
  .contact-card__icon,
  .contact-card__icon img { height: 52px; }
  .contact-card__label { font-size: 21px; }
  .contact-card__hint { font-size: 16px; }

  .site-footer__inner { grid-template-columns: 1fr; }
  .to-top { justify-self: start; grid-row: 3; }
}

@media (max-width: 380px) {
  .brand__name { font-size: 22px; letter-spacing: .12em; }
  .brand__mark { width: 28px; height: 25px; }
  .lang-switch__btn { min-width: 36px; padding: 0 8px; }
}
