/* Juan Manuel Isola — portfolio */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Colors: bright (default) and dark ---------- */

:root {
  --bg: #F6F3EE;
  --bg-top: #FFFFFF;
  --bg-bottom: #EEE7DB;
  --ink: #141414;
  --muted: #5E5E5A;
  --line: #D6D4CE;
  --tile: #1C1C1C;
  --gap: 12px;
  --pad: clamp(16px, 2.6vw, 40px);
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E0E0D;
  --bg-top: #151514;
  --bg-bottom: #0A0A09;
  --ink: #EDEDE8;
  --muted: #9C9C95;
  --line: #2C2C29;
  --tile: #1A1A19;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-y: scroll; scrollbar-gutter: stable; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease, opacity 0.35s ease;
}
body.is-leaving { opacity: 0; }
main { transition: opacity 0.28s ease; }
main.is-leaving, main.is-entering { opacity: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 10px var(--pad);
  background: color-mix(in srgb, var(--bg-top) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 9%, transparent);
  transition: background-color 0.5s ease, transform 0.45s var(--ease);
}
@media (max-width: 760px) { .site-header.is-hidden { transform: translateY(-100%); } }
.site-header .name { padding: 12px 0; font-weight: 500; }
.site-header .name span { color: var(--muted); font-weight: 400; }
.site-header nav { display: flex; align-items: center; gap: 0 26px; }
.site-header nav a { position: relative; display: flex; align-items: center; min-height: 44px; }
.site-header nav a:not([aria-label])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.site-header nav a:hover::after,
.site-header nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-header nav a:hover { color: var(--ink); }

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 28px;
  margin: 8px 0;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle::before { content: ""; position: absolute; inset: -9px -4px; }
.theme-toggle .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.45s var(--ease), background-color 0.5s ease;
}
:root[data-theme="dark"] .theme-toggle .knob { transform: translateX(24px); }
.theme-toggle svg { width: 12px; height: 12px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }

/* ---------- Home ---------- */

.intro {
  padding: clamp(72px, 12vw, 190px) var(--pad) clamp(40px, 6vw, 88px);
}
.intro p {
  margin: 0;
  max-width: 17em;
  font-size: clamp(24px, 2.8vw, 42px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.intro .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}
.intro .word > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 45ms + 150ms);
}
@keyframes rise { to { transform: translateY(0); } }

.mosaic {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 60px var(--pad) 0;
}
.mosaic .row {
  display: flex;
  gap: var(--gap);
  height: clamp(220px, 23vw, 410px);
}
.tile {
  transition: color 0.5s ease;
  position: relative;
  display: block;
  flex: var(--w, 1) 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tile);
  color: #FFFFFF;
  isolation: isolate;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.1s var(--ease), filter 0.8s ease;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0.85;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.tile:hover, .tile:focus-visible { color: #000000; }
.tile:hover::after, .tile:focus-visible::after { opacity: 0; }
.tile .label {
  position: absolute;
  z-index: 1;
  top: calc(clamp(14px, 1.4vw, 24px) - 3px);
  left: calc(clamp(16px, 1.5vw, 26px) - 8px);
  max-width: calc(100% - 32px);
  font-size: clamp(15px, 1.35vw, 23px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
  transition: text-shadow 0.5s ease;
}
.tile:hover .label, .tile:focus-visible .label { text-shadow: 0 0 0 rgba(0, 0, 0, 0); }
.tile:hover .label span, .tile:focus-visible .label span { background: #FFFFFF; }
.tile .label span { display: table; padding: 3px 8px; background: rgba(255, 255, 255, 0); transition: background-color 0.5s ease; }
.tile .label span + span { margin-top: 4px; color: rgba(255, 255, 255, 0.82); transition: background-color 0.5s ease, color 0.5s ease; }
.tile:hover .label span + span, .tile:focus-visible .label span + span { color: #000000; }
.tile .view {
  position: absolute;
  z-index: 1;
  left: clamp(16px, 1.5vw, 26px);
  bottom: clamp(14px, 1.4vw, 22px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.tile:hover .view, .tile:focus-visible .view { opacity: 1; color: #FFFFFF; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }

/* Studios ticker */
.ticker {
  overflow: hidden;
  margin-top: clamp(56px, 7vw, 100px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  gap: 48px;
  padding-right: 48px;
  font-size: clamp(22px, 2.4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  animation: ticker 45s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; align-items: center; gap: 48px; }
.ticker-track span::after { content: "✦"; font-size: 0.5em; color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-label { margin: 0 var(--pad) 14px; color: var(--muted); font-size: 14px; }

.see-all {
  display: flex;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px) var(--pad) 0;
}
.button-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 500;
  isolation: isolate;
  transition: color 0.45s var(--ease);
}
.button-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.button-link:hover { color: var(--bg); }
.button-link:hover::before { opacity: 1; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s ease, transform 1.1s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Custom cursor over projects ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #111111;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform 0.35s var(--ease);
}
.cursor.is-on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .tile, .has-cursor .work-grid a { cursor: none; }
}

/* ---------- Page titles ---------- */

.page-head {
  padding: 60px var(--pad) clamp(28px, 4vw, 56px);
}
.page-head h1 {
  margin: 0;
  max-width: 18em;
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
}

/* ---------- All work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 36px var(--gap);
  padding: 0 var(--pad);
}
.work-grid a { display: block; }
.work-grid .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.work-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.work-grid .caption { padding-top: 10px; transition: color 0.5s ease; }
.work-grid a:hover .caption, .work-grid a:focus-visible .caption { color: #000000; }
:root[data-theme="dark"] .work-grid a:hover .caption { color: var(--ink); }

/* ---------- Project page ---------- */

.project-body {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 var(--pad);
}
.project-body .text {
  max-width: 44em;
  margin: clamp(16px, 3vw, 40px) 0;
  font-size: clamp(16px, 1.1vw, 18px);
  white-space: pre-line;
}
.project-body figure, .reel-page figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.project-body figure img,
.project-body figure video,
.reel-page figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-row { display: flex; gap: var(--gap); }
.media-row figure { flex: var(--r, 1) 1 0; min-width: 0; height: 100%; }
.embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--tile); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.credits { max-width: 44em; margin: clamp(16px, 3vw, 40px) 0; }
.credits summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
}
.credits p { margin: 8px 0 0; color: var(--muted); font-size: 15px; white-space: pre-line; }

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin: clamp(56px, 8vw, 120px) var(--pad) 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.next-project { display: block; margin-left: auto; text-align: right; }
.prev-project { display: block; }
.prev-project strong {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.05;
  font-weight: 500;
}
.next-project small, .prev-project small { display: block; color: var(--muted); font-size: 15px; }
.next-project strong {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.not-found { padding: 0 var(--pad); }

/* ---------- Lab ---------- */

.lab-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 var(--pad);
}
.lab-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.lab-grid figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: var(--gap);
}

/* ---------- Reel ---------- */

.reel-page { display: flex; flex-direction: column; gap: var(--gap); padding: 0 var(--pad); }
.reel-page .text { max-width: 44em; margin: clamp(16px, 3vw, 40px) 0; font-size: clamp(16px, 1.1vw, 18px); white-space: pre-line; }
.reel-page > :first-child { margin-top: 0; }

/* ---------- Info ---------- */

.info {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--gap);
  padding: 0 var(--pad);
}
.info .photo { grid-column: 1 / span 3; align-self: start; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.info .photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.info .about { grid-column: 4 / span 5; padding-left: clamp(0px, 1.5vw, 24px); }
.info .about p {
  margin: 0 0 1em;
  font-size: 17px;
  line-height: 1.6;
}
.info .side { grid-column: 10 / -1; font-size: 15px; }
@media (max-width: 1100px) {
  .info .photo { grid-column: 1 / span 4; }
  .info .about { grid-column: 6 / -1; }
  .info .side { grid-column: 6 / -1; }
}
.info h2 { margin: 0 0 12px; font-size: 15px; font-weight: 500; color: var(--muted); }
.info ul { margin: 0 0 36px; padding: 0; list-style: none; }
.info li { padding: 2px 0; }
.info .side a { display: inline-block; padding: 6px 0; }
.info .studios { margin: 0; line-height: 1.6; }

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px 48px;
  margin-top: clamp(80px, 10vw, 160px);
  padding: 32px var(--pad) 36px;
  border-top: 1px solid var(--line);
}
.site-footer .cta { margin: 0; font-size: clamp(17.6px, 1.68vw, 25.6px); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.site-footer .cta a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.site-footer .links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .copy { width: 100%; margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .mosaic .row { flex-direction: column; height: auto; }
  .tile { flex: none; aspect-ratio: 16 / 11; }
  .tile .view { opacity: 1; transform: none; }
  .media-row { flex-wrap: wrap; }
  .media-row { aspect-ratio: auto !important; }
  .media-row figure { flex: 1 1 100%; height: auto; aspect-ratio: var(--r, 1); }
  .info .photo, .info .about, .info .side { grid-column: 1 / -1; }
  .info .photo { max-width: 320px; }
}

/* ---------- Maximum width of the whole site ---------- */

.site-header,
main,
.site-footer {
  max-width: 1785px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Less motion when the visitor asks for it ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .intro .word > span { transform: none; }
  .ticker-track { animation: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Every page: 45px between the page title and the content below */
.page-head { padding-bottom: 45px; }
.page-head + * > :first-child, #project-body > :first-child { margin-top: 0; }
.page-head .meta { margin: 45px 0 0; color: var(--muted); }

/* Project info text: full width of the content box, justified */
.project-body .text,
.reel-page .text {
  max-width: none;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.credits { max-width: none; }
.credits h2 { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.credits p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  column-width: 300px;
  column-gap: 40px;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--gap);
  padding: 0 var(--pad);
}
.contact-intro { grid-column: 1 / span 4; font-size: 17px; line-height: 1.6; }
.contact-intro p { margin: 0 0 1.2em; }
.contact-direct { color: var(--muted); }
.contact-direct a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.contact-links a { display: inline-flex; align-items: center; min-height: 44px; }
.contact-form { grid-column: 6 / -1; display: flex; flex-direction: column; gap: 22px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--gap); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field label span { color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-top) 70%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.field textarea { resize: vertical; min-height: 180px; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; }
:root[data-theme="dark"] .field.has-error input, :root[data-theme="dark"] .field.has-error textarea { border-color: #F2B8B5; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-actions .button-link { background: transparent; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.form-actions .button-link:hover { color: var(--bg); }
.form-actions .button-link:disabled { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; font-size: 15px; color: var(--muted); }
.form-status.is-ok { color: var(--ink); }
.form-status.is-error { color: #B3261E; }
:root[data-theme="dark"] .form-status.is-error { color: #F2B8B5; }
@media (max-width: 1100px) {
  .contact-intro { grid-column: 1 / span 5; }
  .contact-form { grid-column: 6 / -1; }
}
@media (max-width: 760px) {
  .contact-intro, .contact-form { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
}

/* Menu wraps on small screens so it never overflows */
.site-header nav { flex-wrap: wrap; }
@media (max-width: 560px) {
  .site-header nav { gap: 0 13px; font-size: 15px; }
}

/* Rollover: soft cream layer (25%) instead of zoom */
.tile::before,
.work-grid .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(246, 238, 222, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.work-grid .thumb { position: relative; }
.tile:hover::before, .tile:focus-visible::before,
.work-grid a:hover .thumb::after, .work-grid a:focus-visible .thumb::after { opacity: 1; }
.tile .label, .tile .view { z-index: 2; }

/* ---------- Lightbox: click an image to see it large ---------- */

.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 56px 72px;
  background: rgba(10, 10, 9, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  transform: scale(0.97);
  transition: transform 0.45s var(--ease), opacity 0.25s ease;
}
.lightbox.is-open img { transform: none; }
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 14px; }
@media (max-width: 760px) {
  .lightbox { padding: 64px 12px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 8px; transform: none; }
}

/* Jota Tools — coming soon */
.coming-soon {
  margin: 0 var(--pad);
  padding: clamp(64px, 12vw, 180px) 0;
  border-top: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.12));
}
.coming-soon-title {
  margin: 0;
  font-size: clamp(40px, 7vw, 112px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.coming-soon-tag {
  margin: 18px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--muted);
}
.coming-soon-tag::after {
  content: "_";
  margin-left: 2px;
  animation: cs-blink 1.1s steps(1) infinite;
}
@keyframes cs-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .coming-soon-tag::after { animation: none; } }

/* separator before Tools in the menu */
.site-header .nav-sep { color: var(--muted); margin: 0 -6px; user-select: none; }

/* availability line above the home mosaic */
.availability {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 60px var(--pad) 0; padding: 4px 11px;
  border: 1px solid currentColor; border-radius: 999px;
  font-size: 12.5px; color: var(--ink); text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.availability .dot { width: 6px; height: 6px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 2px rgba(47, 191, 113, 0.18); }
.availability:hover, .availability:focus-visible { background: var(--ink); color: var(--bg-top); }
.availability + .mosaic { padding-top: 30px; }
.info .side .studios + h2 { margin-top: 44px; }
.availability { white-space: nowrap; max-width: calc(100% - 2 * var(--pad)); }
@media (max-width: 560px) { .availability { font-size: 11px; gap: 6px; padding: 4px 9px; } }

/* project facts under the title */
.facts { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: 28px 0 0; }
.fact { min-width: 0; max-width: 34ch; }
.fact dt { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.fact dd { margin: 0; font-size: 15px; line-height: 1.4; }
.credit { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.credit a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Hover video on home tiles */
.tile video.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.tile.is-playing video.preview { opacity: 1; }

/* ---------- Tools page ---------- */
.tools-intro { margin: 0 var(--pad); padding: 0 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.tools-lead { max-width: 760px; margin: 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.3; letter-spacing: -0.01em; }
.tools-lead strong { font-weight: 500; }
.tools-note { max-width: 640px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tools-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tools-download { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 26px; }
.tools-download .tools-status { margin: 0; }
.tools-status { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.tools-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #A98BFF; box-shadow: 0 0 0 4px color-mix(in srgb, #A98BFF 22%, transparent); }
.tools-tag { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.tools-tag::after { content: "_"; margin-left: 2px; animation: cs-blink 1.1s steps(1) infinite; }
.tools-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tools-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; transition: border-color 0.4s ease; }
.tools-chip:hover { color: var(--ink); border-color: var(--acc); }
.tools-chip .sw { width: 9px; height: 9px; border-radius: 3px; background: var(--acc); }
.tools-chip small { color: var(--muted); font-size: 12px; }

.tools-cat { margin: 0 var(--pad); padding: clamp(48px, 6vw, 88px) 0 0; scroll-margin-top: 70px; }
.tools-cat-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; margin-bottom: 28px; }
.tools-cat-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); }
.tools-cat-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tools-cat-head h2 { margin: 0; font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.tools-cat-head p { grid-column: 2 / 3; margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.tools-count { grid-row: 1 / 3; grid-column: 3; align-self: start; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: var(--acc); }

.tools-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }
@media (max-width: 1100px) { .tools-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
.tool-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; outline: none; }
.tool-art { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); background-color: #1C1C1C; background-image: radial-gradient(rgba(233, 228, 218, 0.13) 0.9px, transparent 1.2px); background-size: 10px 10px; background-position: center; overflow: hidden; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.4s ease; }
.tool-art img { width: 100%; height: 100%; object-fit: cover; }
.tool-card:hover .tool-art, .tool-card:focus-visible .tool-art { box-shadow: inset 0 0 0 2px var(--acc); }
.tool-ico { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Name + description: hidden on the card, shown in a floating box on hover */
.tool-info { display: none; }
.tool-tip { position: fixed; left: 0; top: 0; z-index: 90; max-width: 300px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-top); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
.tool-tip.is-on { opacity: 1; }
.tool-tip h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; }
.tool-tip p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
/* Phones and tablets (no hover): show the name under the image instead */
@media (hover: none) {
  .tool-info { display: block; padding: 8px 2px 0; }
  .tool-info h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 500; }
  .tool-info p { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tools-tag::after { animation: none; } }
