/* Edwin Cabrera — site styles. Mobile first; desktop from 760px / 960px. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-normal-300-600.woff2") format("woff2");
  font-style: normal; font-weight: 300 600; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic-300-600.woff2") format("woff2");
  font-style: italic; font-weight: 300 600; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-normal-400-700.woff2") format("woff2");
  font-style: normal; font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-italic-400-700.woff2") format("woff2");
  font-style: italic; font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-normal-400.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-normal-500.woff2") format("woff2");
  font-style: normal; font-weight: 500; font-display: swap;
}

:root {
  --cream: #f6f3ec;
  --sand: #eae6da;
  --ink: #201f1d;
  --ink-band: #242320;
  --ink-soft: #3b3a36;
  --red: #ac3826;
  --red-deep: #8f2c1c;
  --line: #201f1d;
  --line-soft: #8d897f;

  --serif: "Newsreader", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "DejaVu Sans Mono", monospace;

  --pad: clamp(1.25rem, 5.5vw, 4.5rem);
  --max: 74rem;
  --band-y: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--cream); }
* { touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure, ol, ul { margin: 0; }
cite { font-style: italic; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- focus, skip link ---------- */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.band--red :focus-visible, .band--ink :focus-visible { outline-color: var(--cream); }
main:focus { outline: none; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1.1rem;
  background: var(--ink); color: var(--cream);
  font-weight: 600; text-decoration: none; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- type primitives ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: clamp(.8125rem, 1.2vw, .9375rem);
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.eyebrow--rule { display: flex; align-items: center; gap: .9rem; }
.eyebrow--rule::before {
  content: ""; flex: none; width: 1.75rem; height: 2px; background: var(--red);
}
.section-title, .way-title, .story-title, .work-body h3, .about-title, .display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.section-title { font-size: clamp(2.5rem, 7.2vw, 4.25rem); }

.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .28em;
}
.text-link:hover { color: var(--red); }
.text-link--strong { font-weight: 700; }
.block-link { display: table; margin-top: 1.25rem; padding-block: .35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem;
  padding: .8rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--red-deep); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--cream:hover { background: #fff; }
.btn--outline-cream { color: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }
.btn--outline-cream:hover { background: rgba(246, 243, 236, .12); }

.mono-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem;
  font-family: var(--mono);
  font-size: clamp(.8125rem, 1.1vw, .875rem);
  line-height: 1.5;
}

/* ---------- header ---------- */
.site-header {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  background: var(--cream);
  z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em;
  padding-block: .5rem;
  min-width: 0;
}
.brand img { width: 2.5rem; height: 2.5rem; flex: none; }
.brand span { white-space: nowrap; }

.nav-toggle { display: none; }
.js .nav-toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 2.75rem; padding: .5rem 1rem;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 600 1rem/1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}
/* The bars box is a full line tall so it sits on the same line box as the label. */
.nav-toggle-bars {
  position: relative; display: block; flex: none;
  width: 1.1rem; height: 1.2em;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 1px; top: calc(50% - 1px);
}
.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background-size: 0 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }

.site-nav ul { list-style: none; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1.0625rem; }
.site-nav a:hover { color: var(--red); }

/* Small screens: with JS the nav collapses behind the toggle; without JS it wraps under the brand. */
@media (max-width: 759.98px) {
  .header-inner { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; padding-bottom: .75rem; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }

  .js .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 14px 24px -18px rgba(32, 31, 29, .45);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul {
    display: block; padding: .25rem var(--pad) 1.25rem;
  }
  .js .site-nav li + li { border-top: 1px solid rgba(32, 31, 29, .15); }
  .js .site-nav a { display: flex; min-height: 3.25rem; font-size: 1.25rem; font-family: var(--serif); letter-spacing: -0.01em; }
  .js .site-nav .nav-cta { color: var(--red); font-weight: 500; }
}
@media (min-width: 760px) {
  .nav-toggle { display: none !important; }
  .site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.75rem); }
  .site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .site-nav .nav-cta {
    padding: .55rem 1.6rem;
    border: 1.5px solid var(--ink); border-radius: 999px;
    font-weight: 700; white-space: nowrap;
  }
  .site-nav .nav-cta:hover { background: var(--ink); color: var(--cream); }
  .header-inner { min-height: 5.25rem; }
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(2.75rem, 8vw, 7.5rem) clamp(3.5rem, 8vw, 5.5rem);
  border-bottom: 1px solid var(--line-soft);
}
.hero-grid { display: grid; gap: 3rem; }
.display {
  font-size: clamp(5rem, 22vw, 7.75rem);
  line-height: .9;
  letter-spacing: -0.045em;
  margin: 1.25rem 0 1.75rem;
}
.display span { display: block; }
.display-last {
  font-style: italic; color: var(--red);
  /* italic overhang: keep the C from being clipped at the left edge */
  margin-left: -.02em; padding-right: .05em;
}
.lede { font-size: clamp(1.125rem, 2.4vw, 1.3125rem); line-height: 1.55; max-width: 34rem; }
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem;
  margin-top: 2rem;
}
.hero-actions .text-link { padding-block: .6rem; font-size: 1.0625rem; }

.hero-portrait { width: 100%; max-width: 34rem; }
.hero-portrait picture {
  display: block;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #b98e66;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait figcaption { margin-top: 1rem; }

@media (min-width: 600px) and (max-width: 959.98px) {
  .hero-portrait { max-width: 30rem; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: clamp(3rem, 7vw, 7rem); }
  .hero-text { padding-top: clamp(1.5rem, 4vw, 3.5rem); }
  .hero-portrait { justify-self: end; max-width: 36rem; }
  .display { font-size: clamp(6.5rem, 9.4vw, 9rem); }
}

/* ---------- bands ---------- */
.band { padding-block: var(--band-y); }
.band--sand { background: var(--sand); }
.band--ink { background: var(--ink-band); color: var(--cream); }
.band--red { background: var(--red); color: var(--cream); }

/* services */
.ways { display: grid; gap: 3.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.way { border-top: 1.5px solid var(--line); padding-top: 1.75rem; max-width: 42rem; }
.way-title { font-size: clamp(2rem, 4.6vw, 2.75rem); margin-bottom: 1.1rem; }
.way-intro { margin-bottom: 1.5rem; }
.way h4 { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; margin: 2rem 0 .45rem; }
.way p + p { margin-top: 1rem; }
.way > p { color: var(--ink); }
@media (min-width: 760px) {
  .ways { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
}

/* community storytelling */
.band--story { padding-top: 0; border-bottom: 1px solid var(--line-soft); }
.story-grid { display: grid; gap: 1.75rem; }
.story-grid::before {
  content: ""; display: block; height: 0; border-top: 1.5px solid var(--line);
  grid-column: 1 / -1; margin-bottom: clamp(.75rem, 3vw, 1.75rem);
}
.story-title { font-size: clamp(2.25rem, 4.4vw, 2.875rem); }
.story-body p + p { margin-top: 1.1rem; }
.story-body { max-width: 50rem; }
@media (min-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2.5rem, 6vw, 6rem); }
}

/* selected work */
.work-list { list-style: none; padding: 0; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.work-item {
  display: grid; gap: .9rem;
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 2.75rem);
}
.work-item:last-child { padding-bottom: 0; }
.work-cat {
  font-family: var(--mono); font-size: clamp(.8125rem, 1.2vw, .9375rem); letter-spacing: .12em; text-transform: uppercase;
  line-height: 1.5; color: var(--red-deep);
}
.work-body h3 { font-size: clamp(2rem, 4.6vw, 2.75rem); margin-bottom: 1.1rem; }
.work-body { max-width: 50rem; }
.work-body p { max-width: 48rem; }
@media (min-width: 760px) {
  .work-item { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 2.5rem; }
  .work-cat { padding-top: .9rem; color: var(--ink); }
}

/* about */
.split { display: grid; gap: 1.25rem; }
.about-title { font-size: clamp(2.5rem, 6.4vw, 4.25rem); margin-bottom: 2.25rem; }
.about-body p { font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.65; max-width: 52rem; }
.about-body p + p { margin-top: 1.35rem; }
@media (min-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 2.5rem; }
  .split > .eyebrow { padding-top: 1.1rem; }
}

/* contact */
.band--red .section-title { margin-bottom: 1.5rem; }
.contact-lede { font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.55; max-width: 56rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.contact-actions:not(:has(> :not([hidden]))) { display: none; }

/* footer */
.site-footer { padding-block: 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- video facades (thumbnail + play button; iframe only after a click) ---------- */
.video { margin-top: 1.75rem; max-width: 40rem; }
.video-pair { display: grid; gap: 0 1.5rem; }
@media (min-width: 1100px) { .video-pair { grid-template-columns: 1fr 1fr; } }
.video-link, .video-frame {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; border-radius: 4px; overflow: hidden;
  background: var(--ink-band);
}
.video-link { position: relative; color: var(--cream); }
.video-link img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; left: 50%; top: 50%;
  width: 4.25rem; height: 4.25rem; margin: -2.125rem 0 0 -2.125rem;
  border-radius: 50%; background: var(--red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background-color .15s ease;
}
.video-play::after {
  content: ""; position: absolute; left: 54%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: .7rem 0 .7rem 1.15rem;
  border-color: transparent transparent transparent var(--cream);
}
.video-link:hover .video-play { transform: scale(1.06); background: var(--red-deep); }
.video figcaption {
  margin-top: .7rem;
  font-family: var(--mono); font-size: .8125rem; line-height: 1.5; letter-spacing: .02em;
}
.video-src { opacity: 1; color: inherit; }
.video-src::before { content: "· "; }
.band--ink .video-link { outline-color: var(--cream); }

.link-list { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin-top: 1.25rem; }
.link-list > a { padding-block: .45rem; }
.link-list:not(:has(> :not([hidden]))) { display: none; }

.contact-noscript { margin-top: 1.5rem; font-weight: 700; }
