/* =========================================================
   ebi-yaa kwaw — homepage
   Layout/type values measured 1:1 from the reference design
   at the 1200px desktop breakpoint.
   ========================================================= */

:root {
  --bg: #141414;
  --fg: #ece8df;
  --fg-strong: #f6f4f0;
  --rule: rgba(236, 232, 223, 0.12);
  --pad: 28px;
  --nav-h: 48px;
  /* content column caps at 1440 total (1384 + two 28px gutters) */
  --col: 1384px;
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Funnel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }

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

/* ---------- custom cursor ----------
   Cream disc composited with mix-blend-mode: difference, so it reads dark
   over light imagery and light over the page ground. 48px idle, 96px over
   work media with a "see more" label. */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--fg);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 13;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition:
    width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}
.custom-cursor.is-active { opacity: 1; }
.custom-cursor span {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--bg);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.2s ease 0.06s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.06s;
}
.custom-cursor.cursor-work { width: 96px; height: 96px; }
.custom-cursor.cursor-work span { opacity: 1; transform: scale(1); }
body.cursor-none,
body.cursor-none a,
body.cursor-none button { cursor: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  height: var(--nav-h);
  padding: 12px var(--pad);
  background: var(--bg);
  display: flex;
  align-items: center;
}
.nav-inner {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-inner a {
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--fg-strong);
  transition: opacity 0.25s ease;
}
.nav-inner a:hover { opacity: 0.6; }
.nav-toggle { display: none; }
/* on desktop/tablet the wrapper is invisible to layout, so nav-inner's
   flex children are still: logo, Work, About me, Let's talk — identical
   to the original unwrapped markup. */
.nav-links { display: contents; }

/* ---------- shared ---------- */
.wrap {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
}

.fit-line {
  display: block;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--fg);
}

/* ---------- hero ---------- */
.s-hero {
  padding: 0 var(--pad) 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 96px;
}
.s-hero .wrap {
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.hero {
  padding-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}
.hero-name { line-height: 1; width: 100%; }
.hero-sub {
  width: 600px;
  max-width: 100%;
  opacity: 0.7;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* ---------- work grid ---------- */
.work {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.work-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.work-card {
  flex: var(--f, 1) 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.work-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 1.1);
  border-radius: 8px;
  overflow: hidden;
  background: #1c1c1c;
}
.work-media img,
.work-media canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-media canvas { opacity: 0; transition: opacity 0.2s ease; }
.work-media.px-ready canvas { opacity: 1; }
.work-media.px-ready img { opacity: 0; }
.work-cap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-cap .wt {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.work-cap .ws {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  opacity: 0.7;
}

/* ---------- about ---------- */
.s-about {
  padding: 80px var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  overflow: hidden;
}
.s-about .wrap {
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.reveal-text {
  font-size: 72px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.05em;
}
.reveal-text .w {
  display: inline-block;
  opacity: 0.4;
  will-change: opacity;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 355 / 384;
  border-radius: 6px;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-col {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.about-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about-label {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  opacity: 0.7;
}
.about-body {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  background: var(--fg);
  color: var(--bg);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.btn:hover { opacity: 0.82; transform: translateY(-1px); }

/* ---------- get in touch ---------- */
.s-cta {
  padding: 140px var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cta {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
}
/* word : media : word tracks measured at 36.85% / 26.3% / 36.85% */
.cta-word {
  flex: 1.401 1 0;
  min-width: 0;
  font-size: 168px;
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.06em;
  white-space: nowrap;
}
.cta-word:last-child { text-align: right; }
.cta-media {
  display: block;
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 1.2545;
  border-radius: 8px;
  overflow: hidden;
  background: #1c1c1c;
}
/* discrete frame swap — reads like a gif, not a scrolling track */
.cta-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.cta-media img.on { opacity: 1; }

/* ---------- footer ---------- */
.site-footer {
  padding: 80px var(--pad) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.foot-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.foot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.foot-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.foot-contact p {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.foot-links {
  display: flex;
  gap: 76px;
}
.foot-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-group h5 {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  opacity: 0.9;
  margin: 0;
}
.foot-group a {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.04em;
  transition: opacity 0.25s ease;
}
.foot-group a:hover { opacity: 0.6; }
/* line-height 1 (the reference uses .9, but that name has no descender) */
.foot-wordmark { line-height: 1; width: 100%; }
.foot-bottom-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.foot-rule { height: 1px; background: var(--rule); }
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0.81;
}
.foot-bottom span {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* =========================================================
   tablet — 810 to 1199
   ========================================================= */
@media (max-width: 1199px) {
  .hero-sub { width: 100%; }
  .reveal-text { font-size: 52px; }
  .cta-word { font-size: 108px; }
  .s-cta { padding: 90px var(--pad); }
  .foot-links { gap: 48px; }
}

/* =========================================================
   mobile — up to 809
   ========================================================= */
@media (max-width: 809px) {
  :root { --pad: 20px; }

  .custom-cursor { display: none; }

  .nav-inner { gap: 20px; }
  .nav-inner a { font-size: 16px; }
  .nav-inner a.nav-logo { margin-right: auto; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg-strong);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 32px 20px 40px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .s-hero { gap: 56px; padding-bottom: 56px; }
  .s-hero .wrap { gap: 48px; }
  .hero { padding-top: 48px; align-items: flex-start; gap: 14px; }
  .hero-sub { font-size: 18px; }

  .work { gap: 40px; }
  .work-row { flex-direction: column; gap: 40px; }
  .work-card { --ar: 1.1; width: 100%; }
  .work-media { aspect-ratio: 1.1; }
  .work-cap .wt { font-size: 20px; }

  .s-about { padding: 56px var(--pad); gap: 48px; }
  .s-about .wrap { gap: 48px; }
  .reveal-text { font-size: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-body { font-size: 20px; }

  .s-cta { padding: 60px var(--pad); }
  .cta { flex-direction: column; gap: 20px; align-items: stretch; }
  .cta-word { font-size: 68px; flex: 0 0 auto; }
  .cta-word:last-child { text-align: left; }
  .cta-media { flex: 0 0 auto; width: 100%; }

  .site-footer { padding: 56px var(--pad) 20px; gap: 48px; }
  .foot-top { flex-direction: column; gap: 32px; }
  .foot-contact p { font-size: 16px; }
  .foot-group a { font-size: 16px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-text .w { opacity: 1 !important; }
  * { transition-duration: 0.01ms !important; }
}
