/* ============================================================
   Endira Projects — Site Stylesheet
   Design system from the Proposition & Website Brief
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&family=Inter:wght@400;500;600&display=swap');

/* Design tokens
   ---------------------------------------------------- */
:root {
  --ink: #0E1F2D;
  --bone: #F4F1EB;
  --stone: #DDD6CB;
  --bronze: #B68955;
  --bronze-hover: #9F7444;
  --body: #2A2A2A;
  --muted: #6F6F6F;
  --hairline: #C9C2B6;
  --hairline-on-ink: rgba(244, 241, 235, 0.18);
  --white: #FFFFFF;
  --error: #A33A2C;

  --container-max: 1280px;
  --reading-max: 720px;
  --section-py: 80px;
  --section-py-lg: 140px;

  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset
   ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* contain full-bleed children that use 100vw */
}

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

/* Typography
   ---------------------------------------------------- */
.serif {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-variation-settings: 'opsz' 144;
}

h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-variation-settings: 'opsz' 144;
  color: var(--ink);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(36px, 6.5vw, 72px); font-weight: 300; line-height: 1.05; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; font-weight: 400; letter-spacing: -0.005em; }
h3 { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.25; font-weight: 400; letter-spacing: 0; }
h4 { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: 0; }

p { font-size: 17px; line-height: 1.65; max-width: 70ch; }
/* Adjacent body paragraphs get clear vertical separation. */
p + p { margin-top: 1.15em; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ink); }
.lead + p { margin-top: 1.15em; }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 20px;
}
.eyebrow--muted { color: var(--muted); }

/* Layout
   ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 40px; } }
@media (min-width: 1024px) { .container { padding: 0 64px; } }

.section { padding: var(--section-py) 0; }
@media (min-width: 1024px) { .section { padding: var(--section-py-lg) 0; } }
.section--tight { padding: 60px 0; }
.section--ink { background: var(--ink); color: var(--bone); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--bone); }
.section--ink p { color: rgba(244, 241, 235, 0.85); }
.section--ink .eyebrow { color: var(--bronze); }
.section--stone { background: var(--stone); }

.divider, hr { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

.reading { max-width: var(--reading-max); }

/* Grids
   ---------------------------------------------------- */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (min-width: 1024px) {
  .grid-3 { gap: 48px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.split { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 5fr 7fr; gap: 80px; }
  .split--40-60 { grid-template-columns: 4fr 6fr; }
  .split--60-40 { grid-template-columns: 6fr 4fr; }
  .split--reverse { direction: rtl; }
  .split--reverse > * { direction: ltr; }
}

/* Header / nav
   ---------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 235, 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.header__logo {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.header__nav {
  display: none;
  gap: 36px;
  align-items: center;
}
@media (min-width: 1024px) { .header__nav { display: flex; } }

.header__nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: color 200ms var(--easing);
  position: relative;
}
.header__nav a:hover { color: var(--bronze); }
.header__nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 1px;
  background: var(--bronze);
}

.header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
}
@media (min-width: 1024px) { .header__menu-btn { display: none; } }
.header__menu-btn svg { width: 22px; height: 22px; }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bone);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 24px;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__top { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.mobile-nav__close { font-size: 28px; line-height: 1; color: var(--ink); padding: 8px; }
.mobile-nav__list {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
}
.mobile-nav__list a {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: 32px;
  font-weight: 300;
  color: var(--ink);
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: -0.01em;
}
.mobile-nav__list a:hover { color: var(--bronze); }

body.menu-open { overflow: hidden; }

/* Buttons
   ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: background 200ms var(--easing), color 200ms var(--easing), transform 200ms var(--easing);
  cursor: pointer;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.btn--primary { background: var(--ink); color: var(--bone); }
.btn--primary:hover { background: #1B2D3D; }
.btn--on-ink { background: var(--bone); color: var(--ink); }
.btn--on-ink:hover { background: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--bronze); gap: 6px; }
.btn--ghost:hover { color: var(--bronze); }
.btn--ghost-on-ink { background: transparent; color: var(--bone); padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--bronze); gap: 6px; }
.btn--ghost-on-ink:hover { color: var(--bronze); }
.btn .arrow { transition: transform 200ms var(--easing); }
.btn:hover .arrow { transform: translateX(4px); }

/* Cards
   ---------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 200ms var(--easing);
}
@media (min-width: 768px) { .card { padding: 40px; } }
.card:hover { border-color: var(--ink); }
.card--recommended { border-top: 4px solid var(--bronze); padding-top: 28px; }
@media (min-width: 768px) { .card--recommended { padding-top: 36px; } }
.card .eyebrow { margin-bottom: 16px; }
.card h3 { margin-bottom: 12px; }
.card .card__sub { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
.card .card__price { font-family: 'Fraunces', serif; font-size: 22px; color: var(--ink); margin-bottom: 8px; }
.card .card__meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; letter-spacing: 0.02em; }
.card ul.card__list { list-style: none; margin-bottom: 32px; flex: 1; }
.card ul.card__list li {
  padding: 8px 0 8px 20px;
  font-size: 15px;
  color: var(--body);
  position: relative;
  line-height: 1.5;
}
.card ul.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 1px;
  background: var(--bronze);
}
.card .btn--ghost { align-self: flex-start; }

/* Hero
   ---------------------------------------------------- */
.hero {
  position: relative;
  padding: 60px 0 80px;
}
@media (min-width: 1024px) {
  .hero { padding: 80px 0 120px; min-height: 80vh; display: flex; align-items: center; }
  .hero--full { min-height: 90vh; }
}
.hero__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 80px; }
}
.hero__content { max-width: 600px; }
.hero__content h1 { margin-bottom: 24px; }
.hero__content .lead { margin-bottom: 32px; max-width: 540px; }
.hero__cta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero__image { aspect-ratio: 4/5; overflow: hidden; }
@media (min-width: 1024px) {
  .hero__image { aspect-ratio: 4/5; max-height: 80vh; }
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* Mobile-only hero treatment: image goes full-bleed at the top, content below.
   Crops the image to 30vh so the headline stays above-the-fold quickly. */
@media (max-width: 1023px) {
  .hero { padding-top: 0; padding-bottom: 56px; }
  .hero__image {
    order: -1;
    aspect-ratio: auto;
    height: 30vh;
    min-height: 220px;
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 8px;
  }
}

.hero--bg {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 80px 0 60px;
  color: var(--bone);
  isolation: isolate;
  overflow: hidden;
}
.hero--bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.hero--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 31, 45, 0.4) 0%, rgba(14, 31, 45, 0.85) 100%);
  z-index: -1;
}
.hero--bg h1, .hero--bg .lead, .hero--bg .eyebrow { color: var(--bone); }
.hero--bg .eyebrow { color: var(--bronze); }
.hero--bg .lead { color: rgba(244, 241, 235, 0.85); }

/* Image / caption
   ---------------------------------------------------- */
.img-wrap, .hero__image, .pillar__img {
  overflow: hidden;
  background: var(--stone); /* fallback if image fails to load */
}
.img-wrap--portrait { aspect-ratio: 4/5; }
.img-wrap--landscape { aspect-ratio: 16/9; }
.img-wrap--square { aspect-ratio: 1/1; }
.img-wrap--3-2 { aspect-ratio: 3/2; }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.caption strong { color: var(--ink); font-family: 'Fraunces', serif; font-weight: 400; font-size: 16px; display: block; margin-bottom: 4px; }

/* Quote / pull quote
   ---------------------------------------------------- */
.quote {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 300;
  line-height: 1.35;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--bronze);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.section--ink .quote { color: var(--bone); }

/* Pillar
   ---------------------------------------------------- */
.pillar { display: flex; flex-direction: column; }
.pillar__num { font-family: 'Fraunces', serif; font-size: 14px; font-weight: 500; color: var(--bronze); letter-spacing: 0.16em; margin-bottom: 16px; }
.pillar__img { aspect-ratio: 4/5; overflow: hidden; margin-bottom: 24px; }
.pillar__img img { width: 100%; height: 100%; object-fit: cover; }
.pillar h4 { margin-bottom: 12px; font-size: 22px; font-weight: 400; }
.pillar p { font-size: 15px; line-height: 1.6; }

/* Tier number (large display numerals)
   ---------------------------------------------------- */
.tier-num { font-family: 'Fraunces', serif; font-size: 56px; font-weight: 300; color: var(--bronze); line-height: 1; margin-bottom: 8px; }

/* Form
   ---------------------------------------------------- */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.form-field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--body);
}
.form-field label .req { color: var(--bronze); }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--body);
  transition: border-color 150ms var(--easing);
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--bronze);
}
.form-field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.form-field .help { font-size: 13px; color: var(--muted); }

.form-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ink);
  flex-shrink: 0;
}
.form-checkbox label { font-size: 14px; color: var(--body); line-height: 1.5; }

.form-success {
  display: none;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--bronze);
}
.form-success.is-visible { display: block; }
.form-success h3 { margin-bottom: 12px; }

/* Process steps
   ---------------------------------------------------- */
.steps { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 40px; } }
.steps--six { grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps--six { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps--six { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .steps--six { grid-template-columns: repeat(6, 1fr); } }
.step { padding-top: 24px; border-top: 1px solid var(--hairline); }
.step__num { font-family: 'Fraunces', serif; font-size: 36px; font-weight: 300; color: var(--bronze); display: block; margin-bottom: 12px; line-height: 1; }
.step h4 { margin-bottom: 8px; }
.step p { font-size: 14px; line-height: 1.55; }

/* Principles list (operating principles)
   ---------------------------------------------------- */
.principle { padding: 40px 0; border-top: 1px solid var(--hairline); display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 768px) { .principle { grid-template-columns: 100px 1fr; gap: 48px; padding: 48px 0; } }
.principle__num { font-family: 'Fraunces', serif; font-size: 56px; font-weight: 300; color: var(--bronze); line-height: 0.9; }
.principle h3 { margin-bottom: 12px; }

/* Timeline
   ---------------------------------------------------- */
.timeline { display: flex; flex-direction: column; }
.timeline__entry {
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .timeline__entry { grid-template-columns: 220px 1fr; gap: 48px; } }
.timeline__years {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--bronze);
  letter-spacing: 0.01em;
}
.timeline__role {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
}
.timeline__company {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.timeline__entry p { font-size: 15px; line-height: 1.6; max-width: 600px; }

/* Footer
   ---------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 0 24px;
}
.footer__grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 64px; } }
.footer__logo {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: 32px;
  font-weight: 300;
  color: var(--bone);
  margin-bottom: 16px;
  display: block;
  letter-spacing: 0.01em;
}
.footer__tagline {
  font-size: 14px;
  color: rgba(244, 241, 235, 0.7);
  margin-bottom: 32px;
  max-width: 360px;
  line-height: 1.6;
}
.footer__contact {
  font-size: 14px;
  color: rgba(244, 241, 235, 0.7);
  line-height: 1.9;
}
.footer__contact a:hover { color: var(--bronze); }
.footer__heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 235, 0.5);
  margin-bottom: 20px;
}
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a {
  font-size: 14px;
  color: var(--bone);
  transition: color 200ms var(--easing);
}
.footer__nav a:hover { color: var(--bronze); }
.footer__bottom {
  border-top: 1px solid var(--hairline-on-ink);
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.footer__bottom p { font-size: 12px; color: rgba(244, 241, 235, 0.5); }
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { font-size: 12px; color: rgba(244, 241, 235, 0.5); }
.footer__legal a:hover { color: var(--bronze); }

/* Animation
   Fade-in on scroll was tried and removed for reliability. The classname
   remains in HTML so it can be re-enabled later without templating changes.
   ---------------------------------------------------- */
.fade-up { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* CTA section
   ---------------------------------------------------- */
.cta-section { padding: 100px 0; }
.cta-section h2 { margin-bottom: 20px; max-width: 720px; }
.cta-section .lead { margin-bottom: 40px; max-width: 560px; }

/* Utilities
   ---------------------------------------------------- */
.text-center { text-align: center; }
.mt-sm { margin-top: 16px; } .mt-md { margin-top: 32px; } .mt-lg { margin-top: 64px; }
.mb-sm { margin-bottom: 16px; } .mb-md { margin-bottom: 32px; } .mb-lg { margin-bottom: 64px; }
.text-muted { color: var(--muted); }
.text-bronze { color: var(--bronze); }
.no-wrap { white-space: nowrap; }

/* Sidebar (e.g. design management page)
   ---------------------------------------------------- */
.sidebar {
  background: var(--stone);
  padding: 32px;
  border: 0;
}
.sidebar h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 16px;
}
.sidebar ul { list-style: none; }
.sidebar ul li {
  padding: 10px 0 10px 20px;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  line-height: 1.5;
  border-bottom: 1px solid rgba(14, 31, 45, 0.08);
}
.sidebar ul li:last-child { border-bottom: 0; }
.sidebar ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 1px;
  background: var(--bronze);
}

/* Project caption (selected experience)
   ---------------------------------------------------- */
.project-caption strong {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
  display: block;
  margin-top: 14px;
  margin-bottom: 4px;
}
.project-caption span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Selected projects horizontal scroll (mobile)
   ---------------------------------------------------- */
.projects-strip {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .projects-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .projects-strip { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* Page-level helpers
   ---------------------------------------------------- */
.page-intro {
  padding: 60px 0 80px;
}
@media (min-width: 1024px) { .page-intro { padding: 100px 0 120px; } }
.page-intro h1 { margin-bottom: 24px; }
.page-intro .lead { max-width: 720px; }
