/* ==========================================================================
   Your Name — Portfolio
   ========================================================================== */

:root {
  --bg: #f3efe7;
  --bg-soft: #ece5d6;
  --ink: #2b2a26;
  --muted: #8a8578;
  --line: rgba(43, 42, 38, 0.12);
  --accent: #c2922f;
  --accent-soft: #e0a95a;

  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* old Edge/IE */
}
html::-webkit-scrollbar {
  display: none;
} /* Chrome/Safari */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

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

/* subtle paper grain so flat colour fields don't look dead */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Custom cursor
   ========================================================================== */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    width 0.35s var(--ease-out-expo),
    height 0.35s var(--ease-out-expo),
    margin 0.35s var(--ease-out-expo),
    background-color 0.35s ease;
  will-change: transform;
}
.cursor span {
  opacity: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.cursor.is-hover {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: var(--ink);
}
.cursor.is-hover span {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  mix-blend-mode: difference;
  color: #f3efe7;
}

.logo {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}

.main-nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out-expo);
}
.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.hero-scroll-space {
  position: relative;
  height: 400vh; /* JS overwrites this once slide count/width are known */
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--header-h) 0 60px;
  gap: 18px;
  overflow: hidden;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* -- image slider ------------------------------------------------- */

.slider-viewport {
  position: relative;
  width: 100%;
  /* The poster's on-screen height is computed in JS as this box's actual
     rendered clientHeight minus VERTICAL_HEADROOM (js/hero-slider.js), so
     it always fits with margin to spare — including on shorter viewports,
     where .hero's flex layout shrinks this box below the height requested
     here to make everything fit within 100vh. */
  height: min(72vh, 720px);
  touch-action: pan-y;
}

.slider-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

/* -- centred-slide caption ----------------------------------------- */

.slider-caption {
  width: 100%;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slider-caption-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 0;
  text-align: center;
}
.slider-caption-title span {
  display: inline-block;
  opacity: 0;
}
.slider-caption.is-visible .slider-caption-title span {
  animation: caption-letter-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes caption-letter-bounce {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.6);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.slider-caption-year {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s ease 0.15s,
    transform 0.4s ease 0.15s;
}
.slider-caption.is-visible .slider-caption-year {
  opacity: 1;
  transform: translateY(0);
}

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

.site-footer {
  padding: 28px clamp(20px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.socials {
  display: flex;
  gap: 20px;
}
.socials a:hover {
  color: var(--ink);
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-main {
  padding: calc(var(--header-h) + 40px) clamp(20px, 4vw, 56px) 0;
}

.about-hero {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding-bottom: 140px;
}

.about-portrait {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.about-copy h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  margin: 0 0 28px;
}
.about-copy h1 em {
  font-style: italic;
  font-weight: 500;
}

.about-lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 52ch;
  margin: 0 0 56px;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.about-facts h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.about-facts p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.about-cta {
  display: inline-block;
  font-size: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}
.about-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.about-clients {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 120px;
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
.about-clients ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.about-clients li {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--muted);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 860px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-portrait {
    position: static;
  }
  .about-facts {
    grid-template-columns: 1fr;
  }
  .about-clients ul {
    grid-template-columns: repeat(2, 1fr);
  }
}
