/* ==========================================================================
   Susan Rossman — Portfolio
   Editorial, typography-forward, light + dark.
   All colour, type and spacing tokens live at the top so they're easy to tune.
   ========================================================================== */

:root {
  /* Palette — warm paper + ink + a single confident accent */
  --paper:      #f6f2ea;
  --paper-2:    #efe9dd;
  --card:       #fffdf9;
  --ink:        #201d1a;
  --ink-soft:   #55504a;
  --line:       #ddd5c7;
  --accent:     #b5502f;   /* terracotta — warm, editorial */
  --accent-2:   #7a8b6f;   /* muted sage, for small touches */
  --highlight:  #f4d58d;   /* "highlighter" for selection */

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Rhythm */
  --wrap: 74rem;
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section-y: clamp(2.5rem, 5vw, 4.5rem);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(32, 29, 26, .05), 0 12px 30px -18px rgba(32, 29, 26, .28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #16130f;
    --paper-2:   #1d1913;
    --card:      #211c16;
    --ink:       #f3ece0;
    --ink-soft:  #b7ab99;
    --line:      #362f26;
    --accent:    #e08a63;
    --accent-2:  #9fb08f;
    --highlight: #4a3d1f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -20px rgba(0,0,0,.7);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, .55vw + .9rem, 1.12rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1rem; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--wrap); margin: 0 auto;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.15rem;
  text-decoration: none; line-height: 1.15;
  display: flex; flex-direction: column;
}
.nav__brand-sub {
  font-family: var(--font-body);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 2px;
}

.nav__menu {
  list-style: none; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem);
  margin: 0; padding: 0;
}
.nav__menu a { text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav__menu a:hover { color: var(--accent); }

.nav__resume {
  border: 1.5px solid var(--ink);
  padding: .4rem .85rem; border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav__resume:hover { background: var(--ink); color: var(--paper); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: .4rem;
}
.nav__toggle span {
  width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem clamp(1rem, 4vw, 2.5rem) 1.25rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .22s, opacity .22s;
  }
  .nav__menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__menu li { width: 100%; padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .nav__menu li:last-child { border-bottom: 0; }
  .nav__resume { display: inline-block; }
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
main > section { max-width: var(--wrap); margin: 0 auto; padding: var(--section-y) clamp(1rem, 4vw, 2.5rem); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head__title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head__intro { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 82%, black); border-color: color-mix(in srgb, var(--accent) 82%, black); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: clamp(1rem, 2.5vw, 2rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero__gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem;
}
.hero__gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain; object-position: center;
  background: var(--paper-2);
  display: block; border-radius: 12px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero__gallery .hero__feature {
  grid-row: span 2; aspect-ratio: auto; height: 100%; object-fit: cover;
}
.hero__gallery img.hero__fill { object-fit: cover; object-position: center 22%; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero__gallery { margin-top: .5rem; }
}
.hero__eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
}
.hero__heading {
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  font-weight: 600; margin-bottom: 1.5rem;
}
.hero__line { display: block; }
.hero__lede {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: var(--ink-soft);
  max-width: 46ch; margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 0; }

.hero__stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  border-top: 1px solid var(--line); padding-top: 2rem;
  max-width: 44rem;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
.hero__stats span { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 620px) {
  .hero__stats { grid-template-columns: 1fr; gap: 1rem; }
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2.5rem;
}
.filters__btn {
  font-family: var(--font-body); font-size: .88rem; font-weight: 500;
  color: var(--ink-soft); cursor: pointer;
  background: transparent; border: 1.5px solid var(--line);
  padding: .45rem .9rem; border-radius: 999px;
  transition: background .18s, color .18s, border-color .18s;
}
.filters__btn:hover { border-color: var(--ink); color: var(--ink); }
.filters__btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Work grid
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: var(--gap);
}

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.work-card__open {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; color: inherit; font: inherit;
  padding: 1.6rem 1.5rem 1.7rem;
}

.work-card__tag {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: .9rem;
}
.work-card__title { font-size: 1.3rem; margin-bottom: .5rem; }
.work-card__client { font-size: .82rem; color: var(--ink-soft); margin-bottom: .85rem; font-weight: 500; }
.work-card__teaser { font-size: .96rem; color: var(--ink-soft); margin-bottom: 1.1rem; }
.work-card__role { font-size: .85rem; color: var(--ink-soft); margin: 0 0 1.1rem; }
.work-card__role strong { color: var(--ink); }
.work-card__cue { font-size: .88rem; font-weight: 600; color: var(--accent); }

.work-card[hidden] { display: none; }

.work__empty { text-align: center; color: var(--ink-soft); padding: 2rem 0; }

/* Visual cards (those with a thumbnail image) */
.work-card--visual .work-card__open { padding: 0; }
.work-card__body { display: block; padding: 1.6rem 1.5rem 1.7rem; }
.work-card__media { display: block; overflow: hidden; }
.work-card__media img {
  display: block; width: 100%; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: center top;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  transition: transform .35s ease;
}
.work-card--visual:hover .work-card__media img { transform: scale(1.03); }
/* Center the crop when the subject sits in the middle of a tall image */
.work-card__media--center img { object-position: center center; }
/* Show the whole (landscape) image without cropping the sides */
.work-card__media--fit img { object-fit: contain; object-position: center; }

/* Full creative shown inside the reading panel */
.detail__figure { margin: 0 0 1.4rem; }
.detail__figure img {
  display: block; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid var(--line);
}
.detail__figure--tall img { max-width: 21rem; margin-inline: auto; }
.detail__collage {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 1.4rem;
}
.detail__collage img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); display: block;
}

/* --------------------------------------------------------------------------
   Reading panel (modal)
   -------------------------------------------------------------------------- */
.reader[hidden] { display: none; }
.reader {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.reader__backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  backdrop-filter: blur(3px);
  animation: fade .2s ease;
}
.reader__panel {
  position: relative; z-index: 1;
  background: var(--card); color: var(--ink);
  width: min(46rem, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 3rem);
  animation: pop .25s cubic-bezier(.2,.9,.3,1);
}
.reader__close {
  position: sticky; top: 0; float: right; margin: -.5rem -.5rem 0 0;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink);
  width: 2.2rem; height: 2.2rem; border-radius: 999px; font-size: 1.4rem;
  line-height: 1; cursor: pointer;
}
.reader__close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Detail content typography */
.detail__meta { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .4rem; }
.detail__meta strong { color: var(--ink); }
.detail__rule { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.detail__video { margin: 1.5rem 0; }
.detail__video video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; border-radius: 10px;
  background: #000; box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
.detail__video--portrait video {
  max-width: 20rem; margin-inline: auto; aspect-ratio: 9 / 16;
}
.detail__embed { margin: 1.5rem 0; }
.detail__embed iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: 10px; background: #000; box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
.detail__label {
  font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin: 1.5rem 0 .5rem;
}
.reader__content h3 { font-size: 1.7rem; margin-bottom: 1.2rem; }
.detail__line {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  line-height: 1.3; margin: 0 0 1rem;
}
.detail__script { margin: 0 0 .6rem; font-size: .98rem; }
.detail__list { margin: 0 0 1rem; padding-left: 1.2rem; }
.detail__list li { margin-bottom: .5rem; }
.detail__cta { margin: 1.4rem 0; }
.detail__note {
  font-size: .82rem; color: var(--ink-soft); font-style: italic;
  border-left: 3px solid var(--highlight); padding-left: .9rem; margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about { background: var(--paper-2); max-width: none; }
.about__inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about__photo {
  aspect-ratio: 1; width: 100%; border-radius: var(--radius);
  object-fit: cover; object-position: center top; display: block;
  box-shadow: var(--shadow);
}
.about__portrait { position: sticky; top: 6rem; }
.about__lead {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 500; line-height: 1.35; color: var(--ink); margin-bottom: 1.2rem;
}
.about__body p { color: var(--ink-soft); }
.about__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
@media (max-width: 720px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 12rem; }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--gap);
}
.service {
  padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
.service h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.service p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--paper); max-width: none; }
.contact__inner { max-width: var(--wrap); margin: 0 auto; }
.contact .section-head__title { font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 18ch; color: var(--paper); }
.contact__intro { color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: 1.15rem; max-width: 44ch; margin-bottom: 2.5rem; }
.contact__methods { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact__link {
  text-decoration: none; color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--paper) 25%, transparent);
  border-radius: var(--radius); padding: 1rem 1.4rem; min-width: 14rem;
  display: flex; flex-direction: column; transition: background .2s, border-color .2s;
}
.contact__link:hover { background: color-mix(in srgb, var(--paper) 10%, transparent); border-color: var(--accent); }
.contact__label {
  font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .25rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  max-width: var(--wrap); margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  color: var(--ink-soft); font-size: .9rem; flex-wrap: wrap;
}
.site-footer__top { text-decoration: none; font-weight: 500; }
.site-footer__top:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Scroll-reveal (added by JS; safe no-op without it)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
