/* Dolf Design — premium B&W studio portfolio */

:root {
  --bg: #050505;
  --bg-elevated: #0a0a0a;
  --fg: #f2f2f2;
  --fg-muted: #8a8a8a;
  --fg-dim: #5c5c5c;
  --line: rgba(242, 242, 242, 0.12);
  --line-strong: rgba(242, 242, 242, 0.28);
  --white: #ffffff;
  --black: #000000;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 4.5rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1400px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  cursor: auto;
}

body.has-cursor { cursor: none; }
body.has-cursor a,
body.has-cursor button { cursor: none; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad);
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Noise */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom cursor */
.cursor {
  display: none;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
}
body.has-cursor .cursor { display: block; }
.cursor-dot,
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--white);
  z-index: 2;
}
.cursor-follower {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  z-index: 1;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), background 0.35s ease, border-color 0.35s ease;
}
body.cursor-hover .cursor-follower {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.intro.is-done { pointer-events: none; }
.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.intro-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  line-height: 1;
}
.intro-line {
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--fg);
  transform-origin: left center;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.45s var(--ease-out), border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 5, 5, 0.82);
}
.site-header.is-hidden { transform: translateY(-110%); }

.nav {
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  line-height: 1;
}
.wordmark .logo {
  display: block;
  height: 1.25rem;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--fg); }
.nav-cta {
  color: var(--fg) !important;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--line-strong);
}

.nav-toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-content: center;
  gap: 6px;
  position: relative;
  z-index: 860;
}
.nav-toggle-bar {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
body.nav-open { overflow: hidden; }
body.nav-open .nav-toggle-bar:first-child { transform: translateY(3.75px) rotate(45deg); }
body.nav-open .nav-toggle-bar:last-child { transform: translateY(-3.75px) rotate(-45deg); }

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

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--bg);
  padding: calc(var(--header-h) + 2rem) var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-email {
  font-size: 0.95rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  word-break: break-all;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-h) + clamp(2.5rem, 8vh, 5rem)) var(--pad) clamp(3rem, 8vh, 5rem);
  margin: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-color: #0a0a0a;
  background-image: url("assets/covers/hero-abstract-3d.webp");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;
  transform: scale(1.08);
  filter: brightness(0.72) contrast(1.08);
  will-change: transform;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 35%, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.55) 55%, transparent 75%),
    linear-gradient(
      to top,
      var(--bg, #0a0a0a) 0%,
      rgba(10, 10, 10, 0.96) 12%,
      rgba(10, 10, 10, 0.72) 32%,
      rgba(10, 10, 10, 0.35) 55%,
      rgba(10, 10, 10, 0.2) 75%,
      rgba(10, 10, 10, 0.35) 100%
    );
}


.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 52rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.35rem, 3vh, 2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow-line {
  width: 2.5rem;
  height: 1px;
  background: var(--fg-muted);
  flex-shrink: 0;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.85rem, 1.9rem + 5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 15ch;
  margin: 0 auto;
  text-wrap: balance;
}
.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.hero-line-inner {
  display: block;
  will-change: transform;
}

.hero-sub {
  color: var(--fg-muted);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  max-width: 36ch;
  margin: 0 auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  justify-content: center;
}


.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 1.35rem;
  border: 1px solid transparent;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}
.btn-primary {
  background: var(--white);
  color: var(--black);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.btn-arrow { font-size: 1rem; line-height: 1; }

.hero-index {
  position: absolute;
  right: var(--pad);
  bottom: clamp(2rem, 6vh, 4rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  user-select: none;
  display: none;
}
@media (min-width: 1100px) {
  .hero-index { display: block; }
}

/* Sections shared */
.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--pad);
}
.section-head-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--fg-muted);
  max-width: 38ch;
  font-size: 1rem;
}

/* Work — Bento grid */
.work {
  padding: clamp(5rem, 12vh, 9rem) 0 clamp(4rem, 10vh, 7rem);
}

.bento {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.85rem, 1.5vw, 1.15rem);
}

/* True 2×2 — every tile same size, aspect locked to cover ratio */
@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-item--lg,
  .bento-item--wide {
    grid-column: auto;
  }
}

.bento-item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0c0c0c;
  border: 1px solid var(--line);
  isolation: isolate;
}

.bento-media {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 808 / 632;
  overflow: hidden;
  background: #111;
}

.bento-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.01);
  transform-origin: center center;
  transition: transform 1.1s var(--ease-out);
  will-change: transform;
}

.bento-item:hover .bento-media img,
.bento-item:focus-visible .bento-media img {
  transform: scale(1.04);
}

.bento-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.15rem 1.2rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.4) 55%, transparent 100%);
  pointer-events: none;
}
.bento-item .bento-media {
  /* meta overlays the image */
}

.bento-meta .work-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  transition: transform 0.45s var(--ease-out);
}

.bento-item:hover .work-title,
.bento-item:focus-visible .work-title {
  transform: translateX(0.25rem);
}

.bento-meta .work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.45rem;
}

.bento-meta .work-tags span {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.72);
}

.work-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 0.55rem;
}

.work-tags span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* Approach */
.approach {
  padding: clamp(5rem, 12vh, 9rem) 0;
}

.section-head--plain {
  grid-template-columns: 1fr;
}

.approach-steps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .approach-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

.approach-step {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

@media (min-width: 900px) {
  .approach-step {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 100%;
  }
}

.approach-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
}

.approach-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.65rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
}
.approach-body p {
  color: var(--fg-muted);
  max-width: 36ch;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* About */
.about {
  padding: clamp(5rem, 12vh, 9rem) 0;
}

.about-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(280px, 360px) 1fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 6rem);
  }
}

.about-portrait {
  width: 100%;
  max-width: 420px;
}

.about-portrait-frame {
  overflow: hidden;
  background: #151515;
  aspect-ratio: 1 / 1;
  width: min(100%, 420px);
  border: 1px solid var(--line-strong);
}
.about-portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: none;
}

.about-lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 1.35rem;
}
.about-copy p + p { margin-top: 1rem; }
.about-copy p:not(.about-lead):not(.about-location) {
  color: var(--fg-muted);
  max-width: 42ch;
}
.about-location {
  margin-top: 2rem !important;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* Contact */
.contact {
  padding: clamp(5rem, 14vh, 10rem) 0;
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
.contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}
.contact-line {
  margin-top: 2rem;
  color: var(--fg-muted);
  max-width: 28ch;
  font-size: 1.05rem;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad) 2.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--fg-dim);
  font-size: 0.8125rem;
}
.wordmark--footer {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* Focus */
:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .intro { display: none !important; }
  .noise { display: none; }
  body.has-cursor { cursor: auto; }
  body.has-cursor .cursor { display: none !important; }
  .bento-media img { transform: none !important; }
}

/* Reveal helpers (JS sets initial state; CSS fallback) */
.js-ready .hero-line-inner,
.js-ready .intro-wordmark,
.js-ready [data-work],
.js-ready [data-approach],
.js-ready .section-head,
.js-ready .about-layout,
.js-ready .contact-inner {
  visibility: visible;
}


body:has(.intro:not(.is-done)) { overflow: hidden; }


/* Contact CTA (no visible email) */
.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.contact-inner .contact-label {
  margin-bottom: 0;
}
.contact #contact-heading,
.contact-inner > h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.65rem, 1.2rem + 2vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
  margin: 0;
  text-wrap: balance;
}
.btn-contact {
  margin-top: 0.5rem;
  min-width: 10rem;
  justify-content: center;
}
button.btn {
  font: inherit;
  cursor: pointer;
  appearance: none;
}
button.btn-primary {
  background: var(--white);
  color: var(--black);
  border: 1px solid transparent;
}
button.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line-strong);
}
button.mobile-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.contact-hint {
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.75rem 1.15rem;
  background: #fff;
  color: #0a0a0a;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
