/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ffffff;
  --bg-2:      #f3f7ff;
  --bg-3:      #eaf1ff;
  --ink:       #0a1630;
  --mute:      #55627a;
  --mute-2:    #93a1ba;
  --line:      rgba(10,22,48,0.12);
  --line-soft: rgba(10,22,48,0.07);

  --accent:    #1d4ed8;   /* primary blue */
  --accent-2:  #3b82f6;   /* mid blue */
  --accent-3:  #93c5fd;   /* pale blue */

  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
  --mx: 50%;
  --my: 40%;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--display); }
::selection { background: var(--accent); color: #fff; }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

.mono { font-family: var(--mono); }

.kicker {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1rem;
}

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

.link-underline {
  position: relative;
  font-family: var(--mono);
  font-size: .9rem;
  padding-bottom: .2rem;
}
.link-underline::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--ink);
  transition: right .4s var(--ease-out);
}
.link-underline:hover::after { right: 0; }

.btn-invert {
  position: relative;
  display: inline-block;
  padding: .95rem 1.9rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
  overflow: hidden;
  isolation: isolate;
}
.btn-invert::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.btn-invert:hover { color: #fff; }
.btn-invert:hover::before { transform: translateY(0); }

.btn-solid {
  display: inline-block;
  padding: .95rem 1.9rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  transition: background .35s var(--ease-out), transform .35s var(--ease-out);
}
.btn-solid:hover { background: #163fb0; transform: translateY(-2px); }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(255,255,255,.88), rgba(255,255,255,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-logo-mark {
  border-radius: 50%;
  display: block;
  border: 1.5px solid var(--line);
  background: #fff;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2.2rem;
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a { position: relative; color: var(--ink); }
.nav-links a:not(.nav-x)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 1px; background: var(--accent);
  transition: right .35s var(--ease-out);
}
.nav-links a:not(.nav-x):hover::after { right: 0; }
.nav-x { display: flex; align-items: center; color: var(--mute); transition: color .3s var(--ease-out); }
.nav-x:hover { color: var(--accent); }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px;
}
.nav-toggle span {
  display: block; width: 100%; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 1.6rem;
  padding-inline: 2rem;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  transform: translateY(-100%);
  transition: transform .5s var(--ease-out);
}
.nav-mobile.is-open { transform: translateY(0); }
.nav-mobile a:last-child { font-family: var(--mono); font-size: 1rem; color: var(--mute); }

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* =============================================================
   5. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  padding-block: calc(var(--nav-h) + 2rem) 4rem;
  overflow: clip;
  text-align: center;
}

.hero-inner {
  max-width: 62rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(29,78,216,.22), 0 0 0 2px var(--accent-3);
  transform: rotate(-6deg);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-size: clamp(3.2rem, 16vw, 12rem);
  font-weight: 700;
  line-height: .9;
  margin-block: 1rem 1.4rem;
  color: var(--ink);
}
.hero-word { display: block; }

.hero-tagline {
  font-family: var(--display);
  font-weight: 500;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }

/* -- Cartoon stickers: Pr / Ae / mini timeline -- */
.hero-stickers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.8rem);
  flex-wrap: wrap;
  margin-top: clamp(2.6rem, 6vw, 4rem);
}

.sticker {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border-radius: 20px;
  border: 3px solid var(--accent);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  box-shadow: 0 12px 22px rgba(29,78,216,.16);
  transition: scale .35s var(--ease-bounce), background-color .3s var(--ease-out), color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.sticker:hover {
  scale: 1.15;
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 18px 32px rgba(29,78,216,.35);
}
.sticker-pr { transform: rotate(-8deg); }
.sticker-ae { transform: rotate(7deg); }

/* -- Floating editing-themed icons filling the hero's side margins -- */
.hero-deco {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-deco .sticker,
.contact-deco .sticker { pointer-events: auto; cursor: default; }
.sticker-icon {
  position: absolute;
  width: 84px; height: 84px;
  padding: 20px;
  color: var(--accent);
  animation: heroFloat 4s var(--ease-soft) infinite alternate;
}
.sticker-icon svg { width: 100%; height: 100%; }

.deco-clapper    { top: 16%;  left: 6%;   transform: rotate(-10deg); animation-delay: 0s; }
.deco-wave       { top: 22%;  right: 6%;  transform: rotate(8deg);   animation-delay: .5s; }
.deco-scissors   { bottom: 20%; left: 8%; transform: rotate(7deg);   animation-delay: 1s; }
.deco-play       { bottom: 16%; right: 7%; transform: rotate(-9deg); animation-delay: .3s; }

@keyframes heroFloat {
  from { translate: 0 -8px; }
  to   { translate: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sticker-icon { animation: none; }
}

@media (min-width: 1180px) {
  .hero-deco { display: block; }
}

/* -- Cursor-reactive Premiere-style timeline (hero background strip) -- */
.hero-cursor-timeline {
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: clamp(2.8rem, 7vw, 4.5rem);
  padding-block: 1.1rem;
  background: var(--bg-2);
  border-block: 1px solid var(--line-soft);
}
.hct-clips {
  height: 22px;
  margin-inline: clamp(1.25rem, 4vw, 3rem);
  border-radius: 6px;
  background-image: repeating-linear-gradient(
    to right,
    var(--accent-3) 0, var(--accent-3) 64px,
    var(--bg-3) 64px, var(--bg-3) 128px
  );
}
.hct-ruler {
  height: 14px;
  margin-inline: clamp(1.25rem, 4vw, 3rem);
  margin-top: .5rem;
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 1px,
    transparent 1px, transparent 22px
  );
}
.hct-playhead {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--hct-x, 50%);
  width: 2px;
  background: var(--accent);
  pointer-events: none;
}
.hct-playhead::before {
  content: "";
  position: absolute; top: -3px; left: 50%;
  width: 12px; height: 10px;
  background: var(--accent);
  border-radius: 3px;
  transform: translateX(-50%);
}

.hero-scroll-cue {
  position: absolute; bottom: 2.2rem; left: clamp(1.25rem, 4vw, 3rem);
  width: 1px; height: 46px;
  background: var(--line);
  overflow: hidden;
}
.hero-scroll-cue span {
  display: block; width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollCue 2.2s var(--ease-soft) infinite;
}
@keyframes scrollCue {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue span { animation: none; opacity: .5; }
}

/* =============================================================
   6. Work grid
   ============================================================= */
.work { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 6rem); }

.work-heading {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  color: var(--accent);
  letter-spacing: -0.01em;
  text-align: center;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.work-grid {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}

.work-card { display: block; }

.work-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid transparent;
  box-shadow: 0 4px 10px rgba(10,22,48,.08);
  transition: transform .4s var(--ease-bounce), box-shadow .4s var(--ease-out), border-color .3s var(--ease-out);
}
.work-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.work-card:nth-child(odd):hover .work-embed { transform: translateY(-8px) rotate(-1.1deg); }
.work-card:nth-child(even):hover .work-embed { transform: translateY(-8px) rotate(1.1deg); }
.work-card:hover .work-embed {
  box-shadow: 0 22px 40px rgba(29,78,216,.22);
  border-color: var(--accent);
}
.work-card:hover .work-poster { transform: scale(1.07); }
.work-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.work-play {
  position: absolute; inset: 0;
  margin: auto;
  width: 4.2rem; height: 4.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(10,22,48,.18);
  transition: transform .3s var(--ease-bounce), background .3s var(--ease-out), box-shadow .3s var(--ease-out);
  animation: playPulse 2.6s ease-in-out infinite;
}
.work-card:hover .work-play { transform: scale(1.12); }
.work-play:hover { background: #fff; }

@keyframes playPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(10,22,48,.18); }
  50%      { box-shadow: 0 8px 28px rgba(29,78,216,.38); }
}
@media (prefers-reduced-motion: reduce) {
  .work-play { animation: none; }
}

@media (min-width: 720px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
}

/* =============================================================
   7. Contact
   ============================================================= */
.contact {
  position: relative;
  padding-block: clamp(5rem, 14vw, 10rem);
  border-top: 1px solid var(--line-soft);
  text-align: center;
  background: var(--bg-2);
  overflow: clip;
}
.contact-inner { padding-inline: clamp(1.25rem, 4vw, 3rem); }

.contact-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(29,78,216,.2), 0 0 0 2px var(--accent-3);
  transform: rotate(6deg);
  margin: 0 auto 1.4rem;
}

.contact-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 2.4rem;
  color: var(--accent);
}

.contact-link {
  position: relative;
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  padding: 1.25rem 2.8rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(29,78,216,.28);
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s var(--ease-bounce), box-shadow .3s var(--ease-out);
}
.contact-link:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(29,78,216,.36); }
.contact-arrow { transition: transform .3s var(--ease-out); }
.contact-link:hover .contact-arrow { transform: translate(3px, -3px); }

/* -- Floating icons echoing the hero's cartoon-sticker style -- */
.contact-deco {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.contact-deco .sticker-icon {
  animation: heroFloat 4.4s var(--ease-soft) infinite alternate;
}
.deco-chat  { top: 22%; left: 9%;  transform: rotate(-9deg); animation-delay: .2s; }
.deco-heart { bottom: 20%; right: 9%; transform: rotate(8deg); animation-delay: .6s; }

@media (min-width: 1180px) {
  .contact-deco { display: block; }
}

/* =============================================================
   8. Footer
   ============================================================= */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.4rem;
  border-top: 1px solid var(--line-soft);
  font-size: .85rem;
  color: var(--mute);
}
.footer a { transition: color .3s var(--ease-out); }
.footer a:hover { color: var(--accent); }

/* =============================================================
   9. Responsive helpers
   ============================================================= */
@media (min-width: 960px) {
  .hero-title { letter-spacing: -0.01em; }
}
