/* ==========================================================================
   oo.studio — premium minimalist dark theme
   ========================================================================== */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  --pad-x: clamp(20px, 6vw, 72px);
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.85rem;
  transition: top 0.25s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.nav__logo span {
  color: var(--muted);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}

.nav__links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.nav__links a:hover {
  color: var(--fg);
}

.nav__cta {
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg) !important;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.nav__cta:hover {
  background: var(--fg);
  color: var(--bg) !important;
  border-color: var(--fg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--pad-x) clamp(84px, 13vh, 150px);
  overflow: hidden;
  touch-action: pan-y; /* touch can scatter particles while page still scrolls */
}

#loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none; /* let the cursor reach the particles through the type */
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vh, 14px);
  font-weight: 650;
  line-height: 1;
}

.hero__brand {
  font-size: clamp(3.2rem, 10vw, 7.75rem);
  letter-spacing: -0.05em;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.22);
}

.hero__sep {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--faint);
}

.hero__tag {
  font-size: clamp(1.35rem, 3.4vw, 2.4rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.82);
}

.hero__sub {
  max-width: 46ch;
  margin: clamp(18px, 3vh, 28px) auto 0;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--muted);
}

.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(20px, 3.4vh, 34px);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero__hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: hint-pulse 2.4s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s var(--ease);
}

.hero__scroll:hover {
  color: var(--fg);
}

.hero__scroll-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--fg), transparent);
  overflow: hidden;
  animation: scroll-drift 2.2s var(--ease) infinite;
}

@keyframes scroll-drift {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 30s linear infinite;
}

.marquee__track span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee__track i {
  font-style: normal;
  color: var(--faint);
  font-size: 1.1rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(96px, 15vh, 170px) var(--pad-x);
}

.section__head {
  margin-bottom: clamp(48px, 8vh, 88px);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--fg);
}

.section h2 {
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.section__intro {
  max-width: 44ch;
  margin-top: 22px;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--muted);
}

/* reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services__list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1.05fr 1fr 40px;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  padding: clamp(36px, 5vh, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.service__index {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-top: 0.9em;
  transition: color 0.4s var(--ease);
}

.service h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  transition: transform 0.5s var(--ease);
}

.service__lede {
  margin-top: 12px;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: rgba(255, 255, 255, 0.78);
}

.service__desc {
  font-size: 0.98rem;
  color: var(--muted);
}

.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  list-style: none;
}

.service__tags li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.service__arrow {
  justify-self: end;
  padding-top: 0.55em;
  font-size: 1.5rem;
  color: var(--faint);
  transition: transform 0.45s var(--ease), color 0.45s var(--ease);
}

.service:hover .service__index { color: var(--fg); }
.service:hover h3 { transform: translateX(10px); }
.service:hover .service__arrow {
  transform: translate(6px, -6px);
  color: var(--fg);
}
.service:hover .service__tags li {
  border-color: var(--line-strong);
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Work
   ========================================================================== */

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 32px);
  row-gap: clamp(36px, 5vw, 56px);
}

.card--feature {
  grid-column: 1 / -1;
}

.card--feature .card__media {
  aspect-ratio: 21 / 9;
}

.card {
  --ox: 70%;
  --oy: 18%;
  --os: 58%;
  --rx: 24%;
  --ry: 72%;
  --rs: 34%;
}

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 130% at 15% 0%, #17171a 0%, #050506 55%, #000 100%);
  transition: border-color 0.5s var(--ease), transform 0.6s var(--ease);
}

/* glowing orb */
.card__media::before {
  content: "";
  position: absolute;
  left: var(--ox);
  top: var(--oy);
  width: var(--os);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(210, 218, 235, 0.08) 45%, transparent 70%);
  filter: blur(18px);
  transition: transform 0.8s var(--ease);
}

/* thin mathematical ring */
.card__media::after {
  content: "";
  position: absolute;
  left: var(--rx);
  top: var(--ry);
  width: var(--rs);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.8s var(--ease);
}

/* ambient scene canvas: under the number and Visit pill */
.card__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card__num {
  position: absolute;
  right: 22px;
  bottom: 4px;
  font-size: clamp(4.4rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  transition: color 0.5s var(--ease);
}

/* the box is the button: "Visit" pill revealed on hover / focus */
.card__visit {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.card__visit i {
  font-style: normal;
  font-size: 0.9rem;
  transition: transform 0.35s var(--ease);
}

.card:hover .card__media {
  border-color: var(--line-strong);
  transform: translateY(-6px);
}
.card:hover .card__media::before { transform: translate(-50%, -50%) scale(1.25); }
.card:hover .card__media::after { transform: translate(-50%, -50%) scale(0.82); }
.card:hover .card__num { color: rgba(255, 255, 255, 0.12); }

.card__media:hover .card__visit,
.card__media:focus-visible .card__visit {
  opacity: 1;
  transform: none;
}

.card__visit:hover i,
.card__media:hover .card__visit i {
  transform: translate(2px, -2px);
}

/* touch has no hover: keep the pill visible so the button reads as one */
@media (hover: none) {
  .card__visit {
    opacity: 1;
    transform: none;
  }
}

/* linked project titles */
.card__meta h3 a {
  transition: opacity 0.3s var(--ease);
}
.card__meta h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

/* per-card composition */
.card--feature { --ox: 76%; --oy: 30%; --os: 42%; --rx: 20%; --ry: 62%; --rs: 44%; }
.card:nth-child(2) { --ox: 22%; --oy: 70%; --os: 64%; --rx: 76%; --ry: 24%; --rs: 30%; }
.card:nth-child(3) { --ox: 50%; --oy: 40%; --os: 52%; --rx: 50%; --ry: 40%; --rs: 58%; }
.card:nth-child(4) { --ox: 16%; --oy: 24%; --os: 50%; --rx: 82%; --ry: 78%; --rs: 26%; }
.card:nth-child(5) { --ox: 76%; --oy: 68%; --os: 54%; --rx: 22%; --ry: 26%; --rs: 28%; }
.card:nth-child(6) { --ox: 80%; --oy: 78%; --os: 60%; --rx: 22%; --ry: 22%; --rs: 26%; }
.card:nth-child(7) { --ox: 50%; --oy: 46%; --os: 46%; --rx: 84%; --ry: 30%; --rs: 22%; }

.card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 6px 0;
}

.card__meta h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__meta p {
  margin-top: 3px;
  font-size: 0.92rem;
  color: var(--muted);
}

.card__desc {
  margin-top: 14px;
  padding: 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.card--feature .card__desc {
  max-width: 72ch;
}

.card__tag {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.contact__email {
  display: inline-block;
  margin-top: clamp(28px, 4vh, 44px);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  background-image: linear-gradient(var(--fg), var(--fg));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: 6px;
  transition: opacity 0.3s var(--ease);
}

.contact__email:hover {
  opacity: 0.7;
}

.contact__form {
  display: grid;
  gap: 30px;
  padding-top: 10px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.05rem;
  resize: vertical;
  transition: border-color 0.35s var(--ease);
}

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

.field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.button {
  justify-self: start;
  padding: 16px 40px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.button:hover {
  background: transparent;
  color: var(--fg);
}

.form__note {
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ==========================================================================
   Legal pages (privacy policy)
   ========================================================================== */

.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(130px, 18vh, 190px) var(--pad-x) clamp(80px, 12vh, 130px);
}

.legal h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.legal__updated {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--faint);
}

.legal section {
  margin-top: clamp(36px, 6vh, 54px);
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 10px;
}

.legal p {
  color: var(--muted);
  margin-bottom: 12px;
}

.legal strong {
  color: rgba(255, 255, 255, 0.8);
}

.legal ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  padding-left: 22px;
  color: var(--muted);
}

.legal a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.3s var(--ease);
}

.legal a:hover {
  text-decoration-color: var(--fg);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 44px var(--pad-x) 34px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer__ack {
  max-width: 68ch;
  margin-bottom: 28px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

.footer__acn {
  white-space: nowrap;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.footer__links a {
  transition: color 0.3s var(--ease);
}

.footer__links a:hover {
  color: var(--fg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

  .card--feature .card__media {
    aspect-ratio: 16 / 9;
  }

  .service {
    grid-template-columns: 48px 1fr 40px;
  }

  .service__aside {
    grid-column: 2 / 3;
    grid-row: 2;
    margin-top: 18px;
  }

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

@media (max-width: 700px) {
  .nav {
    padding: 14px 20px;
  }

  .nav__logo {
    font-size: 1.25rem;
  }

  .nav__cta {
    padding: 9px 16px;
    white-space: nowrap;
  }

  .nav__links {
    gap: 16px;
  }

  .nav__links a:not(.nav__cta) {
    display: none; /* single-page anchors; keep mobile nav to logo + CTA */
  }

  .service {
    grid-template-columns: 36px 1fr;
  }

  .service__arrow {
    position: absolute;
    top: clamp(36px, 5vh, 56px);
    right: 0;
  }

  .service__aside {
    grid-column: 2 / 3;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee__track,
  .hero__hint-dot,
  .hero__scroll-line {
    animation: none;
  }
}
