/* Alex Gutierrez portfolio
   Palette pulled from his golden-hour grade: deep pine shadows, sage greens, warm fog highlights, amber sun. */
@font-face { font-family: 'Anton'; src: url('assets/fonts/anton.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('assets/fonts/dmsans.woff') format('woff'); font-weight: 100 1000; font-display: swap; }

:root {
  --pine: #1a2620;      /* page background */
  --moss: #22322a;      /* raised surfaces */
  --moss-2: #2c3f35;    /* borders, hover */
  --fog: #ecebe4;       /* main text */
  --sage: #a8b5ab;      /* secondary text */
  --amber: #f0a83a;     /* sun: play buttons, focus, active states */

  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2.6rem, 6vw, 4.5rem);
  --step-hero: clamp(4.4rem, 9.4vw, 8.75rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1320px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--pine);
  color: var(--fog);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--amber) 70%, transparent); text-underline-offset: .2em; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--pine); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: .92;
  letter-spacing: .01em;
  margin: 0;
}

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background-color .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.solid { background: color-mix(in srgb, var(--pine) 94%, transparent); border-color: var(--moss-2); backdrop-filter: blur(8px); }
.wordmark { font-family: var(--display); font-size: 1.3rem; text-decoration: none; letter-spacing: .03em; text-transform: uppercase; }
.site-header nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); align-items: center; }
.site-header nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-cta { border: 1px solid var(--fog); padding: .35rem .9rem; border-radius: 999px; }
.nav-cta:hover { border-color: var(--amber); }

/* Hero: portrait on the right, name stacked big on the left and overlapping it */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
  align-items: end;
}
.hero-photo { grid-column: 2; grid-row: 1; align-self: stretch; position: relative; }
.hero-photo img { width: 100%; height: 100%; max-height: calc(100svh - var(--header-h) - 5rem); object-fit: cover; object-position: 50% 92%; }
.hero-text { grid-column: 1; grid-row: 1; position: relative; z-index: 2; padding: 0 2rem 1rem 0; }
.hero h1 { font-size: var(--step-hero); text-transform: uppercase; }
.hero h1 span { display: block; }
.hero-line { font-size: var(--step-1); max-width: 30ch; margin: 1.5rem 0 1.75rem; color: var(--fog); text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-contact { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1.75rem 0 0; font-size: .95rem; color: var(--sage); }
.hero-contact a { color: var(--fog); }


.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--amber); color: #1a1408; }
.btn-solid:hover { background: var(--fog); color: var(--pine); }
.btn-line { border-color: var(--fog); }
.btn-line:hover { border-color: var(--amber); color: var(--amber); }

/* Reel band: silent loop in a letterbox frame, swaps to the real reel on play */
.reel { background: #000; }
.reel-frame { position: relative; aspect-ratio: 2.39 / 1; overflow: hidden; max-height: 82svh; margin: 0 auto; }
.reel-frame.playing { aspect-ratio: 16 / 9; max-width: calc(82svh * 16 / 9); }
.reel-loop, .reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.reel-overlay {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 2rem var(--gutter);
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}
.reel-title { font-size: var(--step-3); text-transform: uppercase; }
.play-btn {
  display: inline-flex; align-items: center; gap: .8rem; cursor: pointer;
  background: rgba(20, 28, 23, .55); border: 1px solid rgba(236,235,228,.6);
  padding: .55rem 1.2rem .55rem .55rem; border-radius: 999px; font-weight: 600; backdrop-filter: blur(6px);
}
.play-btn:hover { border-color: var(--amber); }
.play-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--amber); position: relative; flex: none; }
.play-icon::after { content: ''; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: .5rem 0 .5rem .8rem; border-color: transparent transparent transparent #1a1408; }
.muted-text { color: var(--sage); font-weight: 400; margin-left: .25rem; }

/* Sections */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: 2.5rem; }
.section-title { font-size: var(--step-3); text-transform: uppercase; }
.section-intro { max-width: 52ch; color: var(--sage); margin: 0; }
.sub-title { font-weight: 600; font-size: var(--step-1); letter-spacing: -.005em; margin: 0 0 1.25rem; }
.sub-head { display: flex; justify-content: space-between; align-items: end; margin-top: clamp(3.5rem, 7vw, 5rem); }
.sub-head .sub-title { margin: 0; }
.sub-intro { color: var(--sage); margin: .5rem 0 1.5rem; max-width: 60ch; font-size: .95rem; }

/* Long-form: featured vertical piece beside a grid of YouTube work */
.longform { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 12fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.longform-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.longform-grid .work-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.longform-grid .work-meta { padding-top: 0; }
@media (min-width: 901px) { .longform > .work-card.vertical { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.work-card { display: block; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; width: 100%; }
.work-thumb { position: relative; overflow: hidden; background: var(--moss); aspect-ratio: 16 / 9; }
.work-card.vertical .work-thumb { aspect-ratio: 9 / 16; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-card:hover .work-thumb img { transform: scale(1.03); }
.work-thumb .play-icon { position: absolute; left: 1rem; bottom: 1rem; }
.work-card:hover .play-icon, .work-card:focus-visible .play-icon { background: var(--fog); }
.work-meta { padding-top: .9rem; }
.work-title { font-weight: 600; font-size: 1.08rem; margin: 0; line-height: 1.35; }
.work-client { color: var(--amber); font-size: .9rem; margin: .15rem 0 .4rem; }
.work-note { color: var(--sage); font-size: .92rem; margin: 0; max-width: 46ch; }
.work-role { color: var(--sage); font-size: .82rem; margin: .5rem 0 0; opacity: .85; }

/* Short-form strip */
.strip-controls[hidden] { display: none; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, calc((100% - 4rem) / 5)); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; scrollbar-color: var(--moss-2) transparent; }
.strip .work-card { scroll-snap-align: start; }
.strip .work-thumb { aspect-ratio: 4 / 5; }
.strip .work-title { font-size: 1rem; }
.strip-controls { display: flex; gap: .5rem; }
.round-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--moss-2); background: var(--moss); cursor: pointer; font-size: 1.5rem; line-height: 1; display: grid; place-items: center; padding-bottom: .15rem; }
.round-btn:hover { border-color: var(--amber); color: var(--amber); }

/* Photo */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab { background: none; border: 1px solid var(--moss-2); border-radius: 999px; padding: .5rem 1rem; cursor: pointer; font-weight: 500; font-size: .95rem; color: var(--sage); }
.tab:hover { color: var(--fog); border-color: var(--sage); }
.tab[aria-selected="true"] { background: var(--fog); color: var(--pine); border-color: var(--fog); }
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 900px) and (min-width: 601px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--moss); cursor: zoom-in; aspect-ratio: 2 / 3; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery button:hover img { opacity: .88; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1180px) and (min-width: 901px) { .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service { background: var(--moss); padding: 1.5rem 1.4rem 1.6rem; border-top: 2px solid var(--amber); }
.service h3 { margin: 0 0 .6rem; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.service p { margin: 0; color: var(--sage); font-size: .95rem; }
.process-title { margin-top: clamp(3rem, 6vw, 4rem); }
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.process li { counter-increment: step; position: relative; padding-top: 3.2rem; }
.process li::before { content: counter(step); position: absolute; top: 0; left: 0; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--amber); }
.process h4 { margin: 0 0 .4rem; font-size: 1.05rem; font-weight: 600; }
.process p { margin: 0; color: var(--sage); font-size: .95rem; max-width: 36ch; }
.services-cta { margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.call-note { margin: -1rem 0 2rem; max-width: 46ch; color: var(--fog); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.about-photos { position: relative; padding-bottom: 22%; }
.about-main { width: 82%; }
.about-bts { position: absolute; width: 50%; right: 0; bottom: 0; border: 6px solid var(--pine); }
.about-text p { max-width: 62ch; }
.about-text .section-title { margin-bottom: 1.5rem; }
.about-lists { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--moss-2); }
.list-title { font-weight: 600; font-size: 1.05rem; margin: 0 0 .75rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .3rem 0; color: var(--sage); }
.work div { padding: .35rem 0; }
.work dt { font-weight: 600; }
.work dd { margin: 0; color: var(--sage); font-size: .95rem; }
.about-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.25rem 0 0; font-weight: 500; }
.footer-links { display: flex; gap: 1.5rem; }

/* Quotes (hidden for now) */
.quote blockquote { margin: 0; font-size: var(--step-2); line-height: 1.35; max-width: 40ch; }
.quote figcaption { color: var(--sage); margin-top: 1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5.5rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact .section-intro { margin: 1.5rem 0 2rem; }
.contact-list li { color: var(--fog); }
.contact-list a { color: var(--fog); }
.contact-form { background: var(--moss); padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.1rem; align-self: start; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: .35rem; font-size: .9rem; color: var(--sage); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--fog);
  background: var(--pine); border: 1px solid var(--moss-2); border-radius: 6px; padding: .7rem .8rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.field textarea { resize: vertical; }
.contact-form .btn { justify-self: start; border: 0; }
.hp { position: absolute; left: -9999px; }

.site-footer { border-top: 1px solid var(--moss-2); display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--gutter); color: var(--sage); font-size: .9rem; }
.site-footer p { margin: 0; }

/* Viewer dialog */
.viewer { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(8, 12, 10, .96); color: var(--fog); }
.viewer::backdrop { background: rgba(0,0,0,.7); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem var(--gutter); }
.viewer-caption { margin: 0; color: var(--sage); font-size: .95rem; }
.viewer-caption strong { color: var(--fog); font-weight: 600; }
.viewer-close { background: none; border: 1px solid var(--moss-2); border-radius: 999px; padding: .4rem 1rem; cursor: pointer; }
.viewer-close:hover { border-color: var(--amber); }
.viewer-stage { display: grid; place-items: center; padding: 0 var(--gutter) 1.5rem; min-height: 0; }
.viewer-stage img { max-width: 100%; max-height: calc(100dvh - 6rem); width: auto; height: auto; object-fit: contain; }
.viewer-stage .frame-16x9 { width: min(100%, calc((100dvh - 7rem) * 16 / 9)); aspect-ratio: 16 / 9; }
.viewer-stage .frame-vertical { height: calc(100dvh - 7rem); aspect-ratio: 9 / 16; max-width: 100%; }
.viewer-stage .frame-ig { width: min(100%, 420px); height: calc(100dvh - 9rem); max-height: 760px; background: #fff; }
.viewer-stage iframe, .viewer-stage video { width: 100%; height: 100%; border: 0; background: #000; }
.viewer-link { margin-top: .9rem; font-size: .95rem; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--moss-2); background: rgba(26,38,32,.8); font-size: 1.8rem; line-height: 1; cursor: pointer; display: none; padding-bottom: .2rem; }
.viewer-nav:hover { border-color: var(--amber); color: var(--amber); }
.viewer.has-nav .viewer-nav { display: grid; place-items: center; }
.viewer-nav.prev { left: 1rem; }
.viewer-nav.next { right: 1rem; }

/* Tablet and down */
@media (max-width: 900px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  .reel-title { font-size: 2.4rem; }
  .hero { grid-template-columns: 1fr; padding: var(--header-h) 0 2.5rem; min-height: auto; }
  .hero-photo { grid-column: 1; grid-row: 1; }
  .hero-photo img { max-height: none; height: 66svh; width: 100%; }
  .hero-photo::after { content: ''; position: absolute; inset: 78% 0 0 0; background: linear-gradient(to bottom, rgba(26,38,32,0), var(--pine)); }
  .hero-text { grid-column: 1; grid-row: 2; padding: 0 var(--gutter); margin-top: -2.5rem; }
  .reel-frame { aspect-ratio: 16 / 9; }
  .longform { grid-template-columns: 1fr; }
  .longform > .work-card.vertical { max-width: 340px; }
  .about, .contact { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-photos { max-width: 520px; }
}
@media (max-width: 600px) {
  .longform-grid .work-card { grid-template-columns: 1fr; gap: 0; }
  .longform-grid .work-meta { padding-top: .9rem; }
  .service-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .about-lists { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .strip-controls { display: none; }
  .reel-overlay { padding: 1rem var(--gutter); }
  .play-btn { font-size: .9rem; }
}
