/* ============================================================
   Benjamin Fuvie — Portfolio
   Design tokens per handoff: warm white bg, amber accent,
   Newsreader (serif display) + Space Grotesk (sans body).
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --ink: #171412;
  --muted: #A79E93;
  --label: #7A7268;
  --label-2: #8A8178;
  --accent: #D98E4B;
  --hairline: rgba(16, 14, 12, .12);
  --hairline-14: rgba(16, 14, 12, .14);
  --img-bg: #1A1713;
  --cream: #ECE6DC;
}

/* ---- Fonts (self-hosted; Newsreader & Space Grotesk are variable fonts) ---- */

@font-face {
  font-family: 'Fashion';
  src: url('../fonts/Fashion.ttf') format('truetype');
  font-display: block;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/newsreader-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ---- Base ---- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@keyframes pageFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: pageFade 1.2s ease both;
}
body.fade-out {
  animation: none;
  opacity: 0;
  transition: opacity .5s ease;
}

::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
input, textarea { font-family: inherit; }

@media (pointer: fine) {
  body, a, button, input, textarea { cursor: none; }
}

.wrap { position: relative; width: 100%; overflow: hidden; }

/* ---- Custom cursor ring (desktop only) ---- */

#cursor-ring {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width .25s cubic-bezier(.2,.8,.2,1), height .25s cubic-bezier(.2,.8,.2,1), background .25s;
  will-change: transform;
}
@media (pointer: fine) { #cursor-ring { display: block; } }
#cursor-ring.big {
  width: 58px; height: 58px;
  background: rgba(217, 142, 75, .18);
}

/* ---- Nav ---- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 48px;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
}
.site-nav.scrolled {
  background: rgba(250, 247, 242, .6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(16, 14, 12, .08);
}
.site-nav .logo {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  letter-spacing: -.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.site-nav .logo span {
  font-family: 'Fashion', 'Newsreader', serif;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: .04em;
  font-size: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav-links a.active { color: var(--accent); }
.nav-links a.nav-contact { font-size: 12px; }

/* ---- Footers ---- */

.site-footer {
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--label);
}

/* ---- Home ---- */

.hero { padding: 130px 48px 70px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy h1 {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(30px, 3.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
.hero-copy h1 .accent { font-style: italic; color: var(--accent); }
.hero-copy h1 .quiet { font-style: italic; color: var(--ink); }
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 12px 26px;
  border: 1px solid rgba(217, 142, 75, .45);
  border-radius: 40px;
  background: rgba(217, 142, 75, .08);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.pill-btn .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.pill-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.socials {
  display: flex;
  gap: 2px;
  align-items: center;
}
.hero-copy .socials { margin-top: 90px; }
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  color: var(--ink);
}
.hero-photo {
  position: relative;
  height: 78vh;
  border-radius: 8px;
  overflow: hidden;
}
.hero-photo img {
  position: absolute;
  top: -15%; left: 0;
  width: 100%; height: 130%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(.15) contrast(1.02);
  will-change: transform;
}

/* ---- Works ---- */

.works-header { padding: 190px 48px 60px; }
.works-header .kicker {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--label-2);
  margin-bottom: 28px;
}
.works-header h1 {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 130px);
  line-height: .94;
  letter-spacing: -.03em;
  margin: 0;
}
.works-header h1 em { font-style: italic; color: var(--accent); }
.works-header p {
  margin: 30px 0 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.6;
}
.gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
  width: 100%;
}
.tile {
  position: relative;
  display: block;
  width: 100%;
  height: 384px;
  overflow: hidden;
}
.tile img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.12) contrast(1.05);
}
.tile .ov {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 12, 0);
  transition: background .5s ease;
  pointer-events: none;
}
.tile .name {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
  transition: opacity .5s ease;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
  pointer-events: none;
}
.tile:hover .ov { background: rgba(16, 14, 12, .5); }
.tile:hover .name { opacity: 1; }
.works-footer { padding: 80px 48px 48px; }

/* ---- Project detail ---- */

.project-main { padding: 120px 60px 0; }
.project-hero {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 44vh;
  overflow: hidden;
  background: var(--img-bg);
}
.project-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.08) contrast(1.04);
}
.project-body { max-width: 940px; margin: 0 auto; }
.project-intro { padding: 70px 0 40px; }
.project-intro h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 26px;
  color: var(--ink);
}
.project-intro p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
  max-width: 88ch;
}
.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.shot {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--img-bg);
  padding: 0;
  border: none;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.08) contrast(1.04);
}
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 0 80px;
  max-width: 940px;
  margin: 0 auto;
  font-size: 14px;
  letter-spacing: .06em;
}
.project-nav .back { color: var(--muted); }
.project-nav .next { color: var(--accent); }
.project-footer { padding: 60px 48px 48px; }

/* ---- Lightbox ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 9, 8, .96);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 88vw;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
}
.lightbox button {
  opacity: 1;
  transition: opacity .5s ease;
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
  padding: 8px;
}
.lightbox.controls-hidden button { opacity: 0; }
.lightbox .close { top: 28px; right: 36px; font-size: 34px; }
.lightbox .prev, .lightbox .next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: rgba(236, 230, 220, .75);
  padding: 14px;
}
.lightbox .prev { left: 24px; }
.lightbox .next { right: 24px; }

/* ---- Services ---- */

.services { padding: 170px 48px 120px; }
.services h1 {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 84px);
  margin: 0 0 70px;
  letter-spacing: -.02em;
  text-align: center;
}
.cap-frame {
  border-top: 1px solid var(--hairline-14);
  border-bottom: 1px solid var(--hairline-14);
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--hairline-14);
  gap: 1px;
}
.cap-card {
  background: var(--bg);
  padding: 46px 44px 56px;
  display: flex;
  flex-direction: column;
}
.cap-card .num {
  font-size: 13px;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.cap-card h3 {
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 40px);
  margin: 64px 0 22px;
  letter-spacing: -.01em;
}
.cap-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.services-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 64px;
}
.services-cta .line {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -.02em;
}
.services-cta .line em { font-style: italic; color: var(--accent); }
.dark-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 40px;
  padding: 16px 30px;
  font-size: 15px;
  font-weight: 500;
}
.kind-words {
  padding: 100px 48px;
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.kind-words .inner { max-width: 980px; margin: 0 auto; }
.kind-words .label {
  font-family: 'Newsreader', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 22px;
}
.kind-words blockquote {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.28;
  letter-spacing: -.02em;
  margin: 28px 0 34px;
  text-wrap: balance;
}
.kind-words .attribution { font-size: 14px; color: var(--muted); }
.kind-words .attribution strong { color: var(--ink); font-weight: 400; }
.services-footer { padding: 30px 48px 40px; }

/* ---- About & Contact ---- */

.photo-strip { padding: 120px 48px 0; }
.photo-strip .frame {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 52vh;
  overflow: hidden;
  background: var(--img-bg);
}
.photo-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(.3) contrast(1.03);
}

.bio {
  padding: 100px 48px 120px;
  display: flex;
  justify-content: center;
}
.bio .inner { max-width: 900px; margin: 0 auto; text-align: left; width: 100%; }
.bio h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 34px;
}
.bio p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 32px;
}
.bio p:last-child { margin-bottom: 0; }
.about-footer { padding: 40px 48px 48px; }

.contact-grid {
  padding: 90px 48px 100px;
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 60px;
  align-items: center;
  align-content: center;
  max-width: 1240px;
  margin: 0 auto;
}
.contact-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact-intro .badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--label-2);
  margin-bottom: 30px;
}
.contact-intro .badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.contact-intro h1 {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 68px);
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0;
}
.contact-intro h1 em { font-style: italic; color: var(--accent); }
.contact-intro > p {
  max-width: 420px;
  margin: 26px auto 40px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.contact-details { display: grid; gap: 26px; justify-items: center; }
.contact-details .field-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 8px;
}
.contact-details .email {
  font-family: 'Newsreader', serif;
  font-size: 26px;
}

.form-card {
  background: var(--bg);
  border: 1px solid rgba(16, 14, 12, .1);
  border-radius: 12px;
  padding: 28px;
  max-width: 460px;
  width: 100%;
  justify-self: center;
}
.form-fields { display: grid; gap: 22px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-card label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 10px;
}
.form-card label .req { color: var(--accent); }
.form-card input,
.form-card textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(16, 14, 12, .25);
  color: var(--ink);
  font-size: 17px;
  padding: 8px 0;
  resize: none;
}
.form-card input::placeholder,
.form-card textarea::placeholder { color: #6A6258; }
.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-error {
  display: none;
  font-size: 13px;
  color: var(--accent);
}
.form-error.show { display: block; }
.form-card .submit {
  margin-top: 8px;
  background: var(--accent);
  color: #100E0C;
  border: none;
  border-radius: 40px;
  padding: 16px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
.form-success {
  min-height: 420px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.form-success .thanks {
  font-size: 40px;
  color: var(--accent);
  font-family: 'Newsreader', serif;
  font-style: italic;
}
.form-success p { color: var(--muted); max-width: 32ch; margin: 0; }
.form-card.sent .form-fields { display: none; }
.form-card.sent .form-success { display: flex; }

/* ---- Mobile ---- */

@media (max-width: 860px) {
  .site-nav { padding: 18px 24px; }
  .site-nav .logo span { font-size: 20px; }
  .nav-links { gap: 16px; font-size: 11px; }
  .nav-links a.nav-contact { font-size: 11px; }

  .hero { padding: 120px 24px 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { height: 62vh; }
  .hero-copy .socials { margin-top: 56px; }

  .works-header { padding: 150px 24px 48px; }
  .tile { height: 260px; }
  .tile .name { left: 24px; }
  .works-footer { padding: 60px 24px 40px; }

  .project-main { padding: 100px 24px 0; }
  .project-hero { max-height: 34vh; }
  .shot-row { grid-template-columns: 1fr; }

  .services { padding: 140px 24px 90px; }
  .cap-grid { grid-template-columns: 1fr; }
  .cap-card { padding: 38px 28px 46px; }
  .cap-card h3 { margin-top: 40px; }
  .kind-words { padding: 80px 24px; }
  .services-footer, .about-footer, .project-footer { padding-left: 24px; padding-right: 24px; }

  .photo-strip { padding: 100px 24px 0; }
  .photo-strip .frame { aspect-ratio: 2 / 1; }
  .bio { padding: 70px 24px 90px; }

  .contact-grid {
    grid-template-columns: 1fr;
    padding: 60px 24px 80px;
    gap: 48px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
  }
  .site-nav .logo span { font-size: 18px; white-space: nowrap; }
  .nav-links { gap: 14px; font-size: 10px; }
  .nav-links a.nav-contact { font-size: 10px; }

  .hero { padding: 140px 20px 50px; }
  .works-header { padding: 140px 20px 40px; }
  .services { padding: 130px 20px 80px; }
  .photo-strip { padding: 90px 20px 0; }
}
