/* ---------- Tokens ---------- */
:root {
  --bg-primary: #FAF8F4;
  --bg-secondary: #F0ECE3;
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-tertiary: #8A8AAA;
  --accent: #8B2C2C;
  --accent-warm: #C4B99A;
  --dark-bg: #1A1A2E;
  --dark-text: #FAF8F4;
  --hairline: rgba(26, 26, 46, 0.1);
  --hairline-dark: rgba(250, 248, 244, 0.15);

  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;

  --container-max: 1320px;
  --container-pad: 40px;
  --section-pad: 72px;
  --gallery-gap: 6px;
}

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

html {
  scroll-behavior: auto;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

em, i {
  font-style: italic;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 28px;
  border-radius: 0;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--text-primary);
  color: var(--text-primary);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--hairline);
}

.site-header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-pad) 0;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
  max-width: 12ch;
}

.hero-text h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-subhead {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
}

.hero-image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 24px 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Offer ---------- */
.offer {
  background: var(--bg-secondary);
  padding: 88px 0;
  text-align: center;
}

.offer-inner h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.3;
  max-width: 760px;
  margin: 0 auto;
}

.offer-inner h2 em {
  color: var(--accent);
  font-style: italic;
}

.offer-inner p {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 20px auto 0;
}

.offer-inner .offer-capabilities {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  margin-top: 20px;
}

/* ---------- Sections (generic) ---------- */
section {
  padding: var(--section-pad) 0;
}

.section-heading {
  margin-bottom: 48px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
}

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Selected Assignments ---------- */
.assignment {
  padding-bottom: var(--section-pad);
}

.assignment + .assignment {
  border-top: 1px solid var(--hairline);
  padding-top: var(--section-pad);
}

.assignment-text {
  max-width: 640px;
  margin-bottom: 32px;
}

.assignment-text h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 16px;
}

.assignment-text p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
}

.assignments-section {
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Galleries (justified rows, native aspect ratio) ---------- */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
}

.gallery-row {
  display: flex;
  gap: var(--gallery-gap);
  width: 100%;
}

.gallery-tile {
  flex-grow: var(--ratio);
  flex-shrink: 1;
  flex-basis: 0;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  min-width: 0;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Selected Work ---------- */
.selected-work .section-heading {
  text-align: left;
}

/* ---------- About (dark section) ---------- */
.about {
  background: var(--dark-bg);
  color: var(--dark-text);
  padding: 48px 0;
}

.about .container {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--container-pad);
  align-items: center;
}

.about-image {
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-copy h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 24px;
}

.about-copy h2 em {
  color: var(--accent-warm);
  font-style: italic;
}

.about-copy p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--dark-text);
}

.about-copy p + p {
  margin-top: 20px;
}

/* ---------- Contact ---------- */
.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--container-pad);
}

.contact-copy h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 24px;
}

.contact-copy h2 em {
  color: var(--accent);
  font-style: italic;
}

.contact-copy p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 480px;
}

.contact-copy p + p {
  margin-top: 16px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.contact-details .btn {
  align-self: flex-start;
}

.contact-email {
  text-transform: none;
}

/* ---------- Mobile (~768px) ---------- */
@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
    --section-pad: 48px;
  }

  .site-header .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px var(--container-pad);
    row-gap: 12px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
    text-align: center;
  }

  .header-actions {
    gap: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-image {
    width: calc(100% + 2 * var(--container-pad));
    margin-top: 0;
    margin-bottom: 0;
    margin-left: calc(-1 * var(--container-pad));
  }

  .hero-text h1 {
    font-size: 30px;
    max-width: none;
  }

  .gallery-row {
    display: contents;
  }

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

  .gallery-tile {
    width: 100%;
    height: auto;
  }

  .gallery-liberty .gallery-tile,
  .gallery-yrno .gallery-tile,
  .gallery-selected-work .gallery-tile {
    order: var(--mobile-order, 0);
  }

  .gallery-tile--mobile-full {
    grid-column: 1 / -1;
  }

  .about .container,
  .contact .container {
    grid-template-columns: 1fr;
  }

  .about-image {
    aspect-ratio: 4 / 5;
  }

  .contact-details {
    margin-top: 8px;
  }
}
