/* ==========================================================================
   Sergio Salinas portfolio
   One stylesheet for every page. Change the variables below to restyle
   the whole site.
   ========================================================================== */


@font-face {
  font-family: "Satoshi-Variable";
  src: url("../font/Satoshi-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}


:root {
  /* Colors */
  --bg: #f2f2f0;          /* page background */
  --ink: #111111;         /* main text, rules */
  --muted: #666666;       /* labels, secondary text */
  --soft: #333333;        /* body copy on project rows */
  --line: #d4d4d0;        /* light divider lines */
  --accent: #e8590c;      /* the orange period, hover color */
  --panel: #e2e2de;       /* image placeholder color while loading */
  --pill: #e6e6e2;        /* nav pill background */
  --pill-hover: #dcdcd7;  /* nav pill hover */
  --quiet: #85847e;       /* grey words in the intro paragraph */
  --hairline: #c9c8c2;    /* thin rules on project page headers */

  /* Type */
  --font: "Satoshi-Variable", "Helvetica Neue", Arial, sans-serif;
  --heavy: 700;           /* weight for big type: headlines, numbers, titles */

  /* Layout */
  --max: 1360px;          /* max content width */
  --pad: 40px;            /* side padding */
  --gap: 24px;            /* grid gutter */
  --section: 200px;       /* space between big sections */
}

/* ---------- Reset and base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

/* 12-column grid used across pages */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.dot { color: var(--accent); }

.label {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 10;
}

/* ---------- Header (plain text menu, scrolls away with the page) ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 32px;
  padding: 40px 0;
}

.brand {
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.site-nav { display: flex; gap: 36px; font-size: 16px; }

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover { color: var(--ink); }

/* Current page: dark text with a small orange square before it */
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -2px;
  background: var(--accent);
}

/* ---------- Big type ---------- */

.display {
  font-weight: var(--heavy);
  font-size: clamp(52px, 8.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.lede {
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ---------- Homepage hero ---------- */

.hero {
  padding: 22vh 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Email (left) and small caps line (right) under the headline */
.hero-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hero-sub .kicker { text-align: right; }

/* Small all-caps labels */
.kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Copy-to-clipboard email */
.copy-email {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 17px;
  color: var(--muted);
  cursor: pointer;
}

.copy-email:hover { color: var(--ink); }

.copy-hint {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Intro: two-tone paragraph + expertise ---------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 72px 96px;
  align-items: end;
  padding: 240px 0 220px;
}

.intro-text {
  font-weight: 400;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* All one color: the sentence carries it */
.intro-text strong { font-weight: 400; }

.expertise .kicker {
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.expertise ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.expertise li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

/* ---------- Section titles (big caps left, small label right) ---------- */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ink);
}

.section-title h2 {
  font-weight: var(--heavy);
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

/* ---------- Text list rows that flip to black on hover ---------- */

.list-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 4fr) minmax(0, 5fr) auto;
  gap: 8px 24px;
  align-items: baseline;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.lr-num { font-size: 15px; color: var(--muted); }

.lr-title {
  transition: color 0.2s;
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lr-desc { font-size: 17px; color: var(--muted); }

.lr-cta {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Hover: a thin orange line draws in under the row */
.list-row { position: relative; }

.list-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.list-row:hover { color: var(--ink); }
.list-row:hover::after { transform: scaleX(1); }
.list-row:hover .lr-title { color: var(--accent); }
.list-row:hover .lr-cta { color: var(--accent); }

.hero .display { max-width: none; }

/* Keeps the homepage headline on two lines at desktop sizes:
   "I design and produce" / "motion for broadcast." Phones wrap normally. */
.hero .nobr { white-space: nowrap; }

/* Small label/value columns (homepage and project pages) */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  font-size: 15px;
  line-height: 1.4;
}

.facts div,
.facts a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

.facts span:first-child { color: var(--muted); }

/* ---------- Video ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel { padding-bottom: 240px; }

/* ---------- Work list (homepage) ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.section-head h2 { font-size: 14px; font-weight: 500; }
.section-head span { color: var(--muted); }

.work { padding-bottom: 200px; }

.project {
  padding: 72px 0 96px;
  border-bottom: 1px solid var(--line);
  row-gap: 20px;
  align-items: start;
  text-decoration: none;
}

.project:hover { color: inherit; }
.project:hover .project-title { color: var(--accent); }

.project-num {
  grid-column: 1 / 3;
  font-weight: var(--heavy);
  font-size: clamp(56px, 6vw, 96px);
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.project-text {
  grid-column: 3 / 8;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

.project-title {
  font-weight: var(--heavy);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

.project-desc {
  font-size: 16px;
  line-height: 1.45;
  color: var(--soft);
  max-width: 380px;
}

.project-meta { font-size: 13px; color: var(--muted); }

.project-img {
  grid-column: 8 / 13;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--panel);
}

/* Smaller text-only rows under the featured work */
.more { margin-top: 200px; }

.work .section-title { margin-bottom: 0; }

.more-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.more-row strong {
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.more-row span { font-size: 14px; color: var(--muted); }

/* ---------- Text sections (label left, copy right) ---------- */

.split-text {
  padding-bottom: var(--section);
  row-gap: 20px;
}

.split-text > .label { grid-column: 1 / 3; }

.split-text > .body {
  grid-column: 3 / 10;
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 19px;
  line-height: 1.6;
}

.big-about {
  grid-column: 3 / 12;
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

/* ---------- Hand kerning ----------
   At ExtraBold with tight letter spacing, a few letter pairs touch.
   These add a hair of space after the first letter of the pair only.
   Usage: Ale<span class="kp-rt">r</span>t   Luc<span class="kp-ky">k</span>y */
.kp-rt { margin-right: 0.03em; }
.kp-ky { margin-right: 0.065em; }

/* ---------- Project page header ----------
   Thin rules, spaced-out caps label, giant title, one-line description,
   underlined links, and a caps detail line at the bottom. */

.masthead {
  margin-top: 10vh;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.6;
  text-transform: uppercase;
}

.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

.masthead-title {
  margin: 120px 0 0;
  font-weight: var(--heavy);
  font-size: clamp(64px, 11vw, 168px);
  line-height: 1; /* tighter than 1 lets descenders (y, p, g) touch the next line */
  letter-spacing: -0.05em;
}

.masthead-tag {
  margin: 56px 0 0;
  max-width: 900px;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.3;
  letter-spacing: 0.005em;
}

.masthead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  margin: 96px 0 0;
}

.ulink {
  display: inline-flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  min-width: 180px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.ulink:hover { color: var(--ink); border-color: var(--accent); }
.ulink span { transition: transform 0.25s; }
.ulink:hover span { transform: translate(2px, -2px); }

.masthead-foot {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

.project-page .project-video { padding-top: 96px; }

/* ---------- Project page ---------- */

.project-hero {
  padding: 14vh 0 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.back { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted); }

.project-hero .titles { display: flex; flex-direction: column; gap: 28px; }

.project-hero .lede { max-width: 820px; }

.project-page .display { font-size: clamp(56px, 9vw, 140px); line-height: 0.9; }

.project-facts {
  padding: 28px 0 72px;
  border-top: 1px solid var(--ink);
}

.project-video { padding-bottom: var(--section); }

.frames {
  padding-bottom: 160px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.frames-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.frames-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--panel);
}

.pager {
  border-top: 1px solid var(--ink);
  padding: 40px 0 120px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.pager a { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.pager .next { align-items: flex-end; text-align: right; }
.pager .prev strong { font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
.pager .next strong {
  font-weight: var(--heavy);
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

/* ---------- About page ---------- */

.about {
  padding: 14vh 0 var(--section);
  row-gap: 56px;
  align-items: start;
}

.about-head { grid-column: 1 / 6; }

.about-head .display { font-size: clamp(48px, 6vw, 96px); }

.about-body {
  grid-column: 7 / 13;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 10px;
}

.about-body .copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 20px;
  line-height: 1.5;
}

.about-body .copy p:first-child {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.fact-list {
  border-top: 1px solid var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.fact-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt { color: var(--muted); }

/* ---------- About page (same header style as project pages) ---------- */

.about-title {
  max-width: 1100px;
  font-size: clamp(48px, 7.4vw, 116px);
  line-height: 1;
}

.about-copy {
  padding: 220px 0 0;
  row-gap: 24px;
}

.about-label { grid-column: 1 / 4; color: var(--muted); padding-top: 8px; }

.about-text {
  grid-column: 5 / 12;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.about-facts { padding: 220px 0 200px; }

.about-facts dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 32px;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.about-facts dt {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-facts dd { margin: 0; font-size: 17px; line-height: 1.6; }

/* ---------- Footer (big email) ---------- */

.site-footer {
  border-top: 1px solid var(--ink);
  padding: 72px 0 48px;
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.foot-label { color: var(--muted); }

.foot-email {
  font-weight: var(--heavy);
  font-size: calc((min(100vw, var(--max)) - 2 * var(--pad)) * 0.086);
  line-height: 1;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}

.foot-email:hover { color: var(--accent); }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 80px;
}

.footer-links { display: flex; align-items: baseline; gap: 32px; font-size: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

.copy-plain { font-size: 16px; }
.copy-plain .copy-hint {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.copy-plain:hover .copy-hint { color: var(--ink); }

.site-footer .fine { font-size: 13px; color: var(--muted); }

/* ---------- Tablet and phone ---------- */

@media (max-width: 820px) {
  .hero .display { line-height: 1; } /* headline wraps to 4 lines on phones */
  .hero .nobr { white-space: normal; }
  .desk-break { display: none; }

  :root { --pad: 24px; --section: 100px; }

  .hero { gap: 64px; padding-bottom: 96px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }

  .project-num,
  .project-text,
  .project-img,
  .split-text > .label,
  .split-text > .body,
  .big-about,
  .about-head,
  .about-body { grid-column: 1 / 13; }

  .frames-grid { grid-template-columns: 1fr; }
  .masthead-title { margin-top: 72px; }
  .masthead-links, .masthead-foot { margin-top: 64px; }
  .eyebrow { letter-spacing: 0.12em; }
  .intro { grid-template-columns: 1fr; padding: 140px 0 120px; }
  .about-label, .about-text { grid-column: 1 / 13; }
  .about-copy { padding-top: 140px; }
  .about-facts { padding: 140px 0 120px; }
  .about-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel { padding-bottom: 140px; }
  .project { padding: 48px 0 64px; }
  .more { margin-top: 140px; }
  .site-header { padding: 28px 0; }
  .site-nav { gap: 28px; }
  .list-row { grid-template-columns: 48px minmax(0, 1fr); }
  .lr-desc, .lr-cta { grid-column: 2; }
  .pager .next { align-items: flex-start; text-align: left; }
}

@media (max-width: 560px) {

  .hero-sub .kicker { text-align: left; }
  .fact-list div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Grain texture ---------- */
body {
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../images/grain.png") repeat;
  opacity: 0.5;   /* grain strength: 0.3 = barely there, 1 = heavy */
}
