/* =========================================================
   ELEGANT END DESIGN — Main Stylesheet
   Aesthetic: Editorial luxury. Obsidian + brushed gold.
   Playfair Display (serif display) + Inter (sans body).
   ========================================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette */
  --ink:          #0a0907;            /* near-black, warm */
  --ink-2:        #13110d;            /* elevated surfaces */
  --ink-3:        #1c1a14;            /* cards / borders */
  --bone:         #efe9de;            /* warm off-white text */
  --bone-mute:    rgba(239, 233, 222, 0.62);
  --bone-faint:   rgba(239, 233, 222, 0.24);
  --bone-hair:    rgba(239, 233, 222, 0.12);

  /* Brushed gold gradient (Fendi-inspired EE monogram) */
  --gold-1:       #d4b06a;
  --gold-2:       #f2dfa4;
  --gold-3:       #a9803d;
  --gold-grad:    linear-gradient(135deg, var(--gold-3) 0%, var(--gold-2) 50%, var(--gold-1) 100%);

  /* Typography */
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  /* Fluid scale */
  --fs-xs:   clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);
  --fs-sm:   clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --fs-base: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
  --fs-lg:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl:   clamp(2rem, 1.6rem + 2vw, 3.25rem);
  --fs-2xl:  clamp(3rem, 2.2rem + 4vw, 6rem);
  --fs-3xl:  clamp(4rem, 2.5rem + 7vw, 9rem);

  /* Spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;
  --sp-7: 9rem;

  /* Layout */
  --container: 1440px;
  --gutter:    clamp(1.25rem, 4vw, 4rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 300;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

/* Global selection */
::selection { background: var(--gold-1); color: var(--ink); }

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: linear-gradient(to bottom, rgba(10,9,7,0.6), rgba(10,9,7,0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__monogram {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.nav__wordmark {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--bone);
  font-weight: 500;
}

.nav__links {
  display: flex;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav__links a {
  color: var(--bone-mute);
  transition: color 0.3s var(--ease-out);
  position: relative;
}

.nav__links a:hover { color: var(--gold-2); }

.nav__cta {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--bone-faint);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.4s var(--ease-out);
}

.nav__cta:hover {
  border-color: var(--gold-1);
  color: var(--gold-2);
  background: rgba(212, 176, 106, 0.06);
}

@media (max-width: 860px) {
  .nav__wordmark { display: none; }
  .nav__links { display: none; }
}

/* ---------- HERO ---------- */
/* The hero is a TALL container (tall scroll area) with a STICKY child.
   As the user scrolls through the tall area, JS updates canvas frames. */
.hero {
  position: relative;
  height: 400vh;       /* 4 viewport-heights of scroll = smooth narrative */
  background: var(--ink);
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero__canvas.is-ready { opacity: 1; }

.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.hero__canvas.is-ready ~ .hero__poster { opacity: 0; }

/* Vignette for text legibility without darkening the imagery too much */
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10,9,7,0.55) 0%, rgba(10,9,7,0.0) 30%, rgba(10,9,7,0.0) 60%, rgba(10,9,7,0.75) 100%),
    radial-gradient(ellipse at center, rgba(10,9,7,0) 40%, rgba(10,9,7,0.35) 100%);
}

.hero__content {
  position: absolute;
  inset: 0;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;  /* let scroll through */
}

.hero__content > * { pointer-events: auto; }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--sp-3);
  animation: fadeUp 1.2s var(--ease-out) 0.3s both;
}

.hero__eyebrow-line {
  width: 3rem;
  height: 1px;
  background: var(--gold-grad);
}

.hero__eyebrow-text {
  font-size: var(--fs-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-3xl);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 14ch;
  margin-bottom: var(--sp-4);
}

.hero__title-line {
  display: block;
  overflow: hidden;
}

.hero__title-line em {
  font-style: italic;
  font-weight: 400;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title-line--accent { padding-left: clamp(2rem, 8vw, 6rem); }

.hero__title-line > * {
  display: inline-block;
  animation: fadeUp 1.4s var(--ease-out) both;
}

.hero__title-line:nth-child(1) { animation: fadeUp 1.4s var(--ease-out) 0.5s both; }
.hero__title-line:nth-child(2) { animation: fadeUp 1.4s var(--ease-out) 0.7s both; }

.hero__caption {
  position: relative;
  height: 1.8em;
  max-width: 40ch;
  margin-top: var(--sp-2);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--bone);
  letter-spacing: 0.005em;
  animation: fadeUp 1.4s var(--ease-out) 0.9s both;
}

.hero__caption-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.hero__caption-state.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero__scroll-hint {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bone-mute);
  animation: fadeUp 1s var(--ease-out) 1.4s both, bob 2.4s var(--ease-io) 2.4s infinite;
  transition: opacity 0.4s ease;
}

.hero__scroll-hint.is-hidden { opacity: 0; }

.hero__scroll-hint-line {
  width: 3rem;
  height: 1px;
  background: var(--bone-mute);
  position: relative;
  overflow: hidden;
}

.hero__scroll-hint-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-grad);
  transform: translateX(-100%);
  animation: slideLine 2.4s var(--ease-io) 2.4s infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@keyframes slideLine {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Progress indicator */
.hero__progress {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeUp 1s var(--ease-out) 1.6s both;
}

.hero__progress-track {
  width: 1px;
  height: 140px;
  background: var(--bone-hair);
  position: relative;
}

.hero__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--gold-grad);
  transition: height 0.1s linear;
}

.hero__progress-labels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.hero__progress-label {
  transition: color 0.4s var(--ease-out);
}

.hero__progress-label.is-active { color: var(--gold-2); }

@media (max-width: 768px) {
  .hero__progress { display: none; }
  .hero__title-line--accent { padding-left: 1.5rem; }
}

/* ---------- SECTION SHARED ---------- */
.philosophy, .work, .process, .contact {
  padding: var(--sp-7) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.philosophy__label, .work__label, .process__label, .contact__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-bottom: var(--sp-3);
}

/* ---------- PHILOSOPHY ---------- */
.philosophy {
  border-top: 1px solid var(--bone-hair);
}

.philosophy__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.philosophy__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.philosophy__heading em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.philosophy__body {
  max-width: 48ch;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--bone-mute);
  font-size: var(--fs-base);
  line-height: 1.7;
}

@media (min-width: 980px) {
  .philosophy__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
    gap: var(--sp-6);
  }
  .philosophy__body { margin-left: 0; }
}

/* ---------- WORK ---------- */
.work {
  border-top: 1px solid var(--bone-hair);
}

.work__header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: var(--sp-5);
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.work__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-xl);
  line-height: 1;
  letter-spacing: -0.02em;
}

.work__heading em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-4);
}

.project {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform 0.6s var(--ease-out);
}

.project:hover { transform: translateY(-6px); }

.project__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
  position: relative;
}

.project__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,9,7,0.3), transparent 40%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.project:hover .project__media::after { opacity: 1; }

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.project:hover .project__media img { transform: scale(1.04); }

.project__meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.project__index {
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  color: var(--gold-2);
}

.project__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}

.project__location {
  margin-left: auto;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-mute);
}

/* ---------- PROCESS ---------- */
.process {
  border-top: 1px solid var(--bone-hair);
}

.process__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.process__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.process__heading em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--bone-hair);
}

.process__step {
  background: var(--ink);
  padding: var(--sp-4) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.4s var(--ease-out);
}

.process__step:hover { background: var(--ink-2); }

.process__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lg);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.process__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}

.process__step p {
  color: var(--bone-mute);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* ---------- CONTACT ---------- */
.contact {
  border-top: 1px solid var(--bone-hair);
  text-align: center;
  padding-bottom: var(--sp-7);
}

.contact__label { text-align: center; }

.contact__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-3xl);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-5);
}

.contact__heading em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact__email {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  letter-spacing: -0.005em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bone-faint);
  transition: all 0.4s var(--ease-out);
}

.contact__email:hover {
  border-bottom-color: var(--gold-1);
  color: var(--gold-2);
}

.contact__meta {
  margin-top: var(--sp-4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bone-mute);
}

.contact__meta-dot {
  color: var(--gold-1);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--bone-hair);
  padding: 2rem var(--gutter);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-mute);
}

.footer__monogram {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- ACCESSIBILITY — reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
