/* ============================================================
   STUDIO TB — portfolio · Apple-clean redesign
   ============================================================ */
:root {
  --bg:    #ffffff;
  --bg-2:  #f5f5f7;
  --ink:   #1d1d1f;
  --muted: #6e6e73;
  --blue:  #0066cc;
  --line:  #d2d2d7;
  --dark:  #161617;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 22px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body { background: transparent; color: var(--ink); font-family: var(--sans); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; letter-spacing: -0.01em; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3 { font-weight: 600; line-height: 1.06; letter-spacing: -0.022em; }
a { color: inherit; text-decoration: none; }
::selection { background: #b3d4fc; }

/* shared section intro */
.sec-intro { max-width: 820px; margin: 0 auto; text-align: center; padding: 0 1.5rem; }
.sec-eyebrow { font-size: 0.92rem; font-weight: 600; color: var(--blue); letter-spacing: 0; margin-bottom: 0.8rem; }
.sec-intro h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.sec-sub { color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.35rem); margin-top: 1.1rem; max-width: 40ch; margin-left: auto; margin-right: auto; }

h2 { font-size: clamp(2rem, 5vw, 3.4rem); }

.link-arrow { color: var(--blue); font-size: 1.15rem; font-weight: 400; display: inline-flex; align-items: center; transition: opacity 0.25s; }
.link-arrow::after { content: "›"; margin-left: 0.3rem; transition: transform 0.25s var(--ease); }
.link-arrow:hover { opacity: 0.7; }
.link-arrow:hover::after { transform: translateX(3px); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.d1{transition-delay:.08s}.d2{transition-delay:.18s}.d3{transition-delay:.28s}

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 52px; background: rgba(255,255,255,0.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,0.07); }
.nav__inner { max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 1.4rem; display: flex; align-items: center; justify-content: space-between; }
.nav__brand { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }
.nav__brand span { color: var(--muted); font-weight: 500; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a { font-size: 0.86rem; color: #1d1d1f; opacity: 0.85; transition: opacity 0.25s; }
.nav__links a:hover { opacity: 1; }
.nav__cta { font-size: 0.82rem; background: var(--blue); color: #fff; padding: 0.42rem 0.95rem; border-radius: 100px; transition: background 0.25s; }
.nav__cta:hover { background: #0055b3; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: 0.4s var(--ease); }
.nav__toggle.is-open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2){ transform: translateY(-0px) rotate(-45deg); }

/* ---------- full-site aurora background ---------- */
.site-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.7; will-change: transform; }
.blob--1 { width: 44vw; height: 44vw; max-width: 560px; max-height: 560px; left: 1%; top: 2%; background: radial-gradient(circle at 35% 35%, #6db1ff, #a9d2ff 70%); animation: drift1 22s var(--ease) infinite alternate; }
.blob--2 { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; right: 1%; top: 8%; background: radial-gradient(circle at 60% 40%, #c39bff, #ddc7ff 72%); animation: drift2 26s var(--ease) infinite alternate; }
.blob--3 { width: 38vw; height: 38vw; max-width: 500px; max-height: 500px; left: 8%; bottom: 6%; background: radial-gradient(circle at 50% 50%, #ffb38a, #ffd2b8 72%); animation: drift3 24s var(--ease) infinite alternate; }
.blob--4 { width: 34vw; height: 34vw; max-width: 440px; max-height: 440px; right: 6%; bottom: 10%; background: radial-gradient(circle at 50% 50%, #79e6b3, #b6f2d6 74%); animation: drift4 28s var(--ease) infinite alternate; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(22%, 28%) scale(1.18); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-20%, 24%) scale(0.9); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(24%, -22%) scale(1.15); } }
@keyframes drift4 { from { transform: translate(0,0) scale(0.95); } to { transform: translate(-22%, -26%) scale(1.12); } }
/* faint grid for depth */
.site-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px); background-size: 54px 54px; -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 20%, transparent 80%); }
/* soft uniform veil so text stays crisp across the whole page */
.site-bg::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.42); }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: clamp(9rem, 18vh, 13rem) 1.5rem clamp(5rem, 10vw, 8rem); max-width: 980px; margin: 0 auto; }
.hero__over { color: var(--muted); font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 500; margin-bottom: 1rem; }
.hero__title { font-size: clamp(3rem, 9vw, 6.4rem); font-weight: 600; letter-spacing: -0.03em; }
.hero__lead { color: var(--muted); font-size: clamp(1.15rem, 2.2vw, 1.6rem); max-width: 30ch; margin: 1.6rem auto 0; line-height: 1.4; }
.hero__links { margin-top: 2.4rem; display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }

/* ---------- work ---------- */
.work { padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 3vw, 1.5rem); }
.work .sec-intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.work__grid { max-width: 1024px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.8rem, 1.5vw, 1.2rem); }
.tile { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; position: relative; min-height: 280px; transition: transform 0.5s var(--ease); }
.tile:hover { transform: translateY(-4px); }
.tile--lg { grid-column: 1 / -1; min-height: 310px; }
.tile--dark { background: var(--dark); color: #f5f5f7; }
.tile--light { background: var(--bg-2); color: var(--ink); }
.tile__head { text-align: center; padding: 1.5rem 1.5rem 0.8rem; }
.tile__cat { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; opacity: 0.6; margin-bottom: 0.7rem; }
.tile__head h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.tile--lg .tile__head h3 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.tile__sub { font-size: clamp(0.98rem, 1.5vw, 1.2rem); margin-top: 0.5rem; opacity: 0.82; max-width: 34ch; margin-left: auto; margin-right: auto; }
.tile__link { display: inline-block; margin-top: 1rem; color: var(--blue); font-size: 1.05rem; }
.tile--dark .tile__link { color: #2997ff; }
.tile:hover .tile__link { text-decoration: underline; text-underline-offset: 3px; }
.tile__img { flex: 1; margin-top: 0.5rem; overflow: hidden; }
.tile__img img { transition: transform 0.7s var(--ease); }
.tile:hover .tile__img img { transform: scale(1.04); }

/* ---------- about ---------- */
.about { padding: clamp(4rem, 9vw, 7rem) 1.5rem; }
.about .sec-sub { font-size: 0.98rem; max-width: 50ch; line-height: 1.65; text-wrap: balance; }
.about__media { max-width: 1024px; margin: clamp(2.5rem, 5vw, 4rem) auto 0; overflow: hidden; aspect-ratio: 16/9; background: transparent; }
.about__media img { transition: transform 0.9s var(--ease); object-fit: contain; }
.about__media:hover img { transform: scale(1.03); }
.about__stats { max-width: 1024px; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.about__stats strong { display: block; font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; letter-spacing: -0.02em; }
.about__stats span { color: var(--muted); font-size: 0.92rem; }

/* ---------- services ---------- */
.services { padding: clamp(4rem, 9vw, 7rem) 1.5rem; background: rgba(245,245,247,0.55); }
.services .sec-intro { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.services__grid { max-width: 1024px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.svc { background: var(--bg); border-radius: 18px; padding: clamp(1.8rem, 3vw, 2.6rem); transition: transform 0.4s var(--ease); }
.svc:hover { transform: translateY(-3px); }
.svc h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.svc p { color: var(--muted); font-size: 1rem; }

/* ---------- contact ---------- */
.contact { text-align: center; padding: clamp(5rem, 11vw, 9rem) 1.5rem; }
.contact h2 { font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 600; letter-spacing: -0.03em; }
.contact__lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.4rem); margin: 1.2rem auto 2.2rem; max-width: 36ch; }
.contact__email { color: var(--blue); font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 500; letter-spacing: -0.02em; transition: opacity 0.25s; }
.contact__email:hover { opacity: 0.7; }
.contact__socials { margin-top: 2.4rem; display: flex; gap: 2rem; justify-content: center; }
.contact__socials a { color: var(--ink); font-size: 1rem; opacity: 0.8; transition: color 0.25s, opacity 0.25s; }
.contact__socials a:hover { color: var(--blue); opacity: 1; }

/* ---------- footer ---------- */
.footer { background: rgba(245,245,247,0.6); border-top: 1px solid var(--line); padding: 2.2rem 1.5rem; }
.footer__inner { max-width: 1024px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; color: var(--muted); font-size: 0.82rem; }
.footer__copy a { color: var(--muted); }
.footer__copy a:hover { color: var(--blue); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav__links { position: fixed; inset: 52px 0 auto 0; flex-direction: column; gap: 0; background: rgba(255,255,255,0.96); backdrop-filter: blur(20px); padding: 0.5rem 0; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.45s var(--ease); }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 1rem 1.6rem; font-size: 1.05rem; border-bottom: 1px solid rgba(0,0,0,0.05); }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .work__grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .tile, .tile--lg { min-height: 300px; }
  .tile__head { padding: 1.5rem 1.2rem 0.8rem; }
  .tile--lg .tile__head h3, .tile__head h3 { font-size: 1.6rem; }
  .tile__sub { font-size: 0.95rem; }
  .services__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
}
@media (max-width: 480px) {
  .hero__links { flex-direction: column; gap: 1rem; }
  .footer__inner { flex-direction: column; }
  .tile, .tile--lg { min-height: 250px; }
  .tile__head { padding: 1.2rem 1rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
