/* Ismael OB — Colorist portfolio
   Design tokens (locked spec): bg #0C0C0C, accent olive #8A9A5B */

:root {
  --bg: #0C0C0C;
  --bg-raised: #131311;
  --fg: #ECECE6;
  --fg-dim: #8C8C86;
  --fg-faint: #55554F;
  --accent: #8A9A5B;
  --line: #232320;
  --grid-gap: 1px;
  --display: "Space Grotesk", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Language toggling — English is default, French shown when body has .lang-fr */
[data-fr] { display: none; }
body.lang-fr [data-en] { display: none; }
body.lang-fr [data-fr] { display: inline; }
body.lang-fr [data-fr].block { display: block; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 48px);
  background: rgba(12, 12, 12, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

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

.wordmark span { color: var(--accent); }

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

.nav-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

@media (max-width: 640px) {
  .nav-eyebrow { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a { opacity: 0.75; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--accent); }

#lang-toggle {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
#lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 73px);
  padding: 20px clamp(20px, 4vw, 48px);
}

.reel-frame {
  position: relative;
  width: 100%;
  max-width: 1400px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.reel-frame::before,
.reel-frame::after,
.corner-tl, .corner-br {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  opacity: 0.7;
}
.reel-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.reel-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.reel-embed { position: relative; padding-top: 56.25%; }
.reel-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ---------- Work grid ---------- */
#work,
#contact {
  scroll-margin-top: 88px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(28px, 6vw, 56px) clamp(20px, 4vw, 48px) 18px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-card {
  position: relative;
  background: var(--bg);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}

.work-card .thumb {
  position: absolute;
  inset: 0;
  background: var(--bg-raised);
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.work-card:hover .thumb { transform: scale(1.04); }

.work-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,12,12,0) 55%, rgba(12,12,12,0.94) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.work-card:hover::after { opacity: 1; }

.work-card-meta {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.work-card:hover .work-card-meta { opacity: 1; transform: translateY(0); }

/* Touch devices have no hover: keep captions visible */
@media (hover: none) {
  .work-card::after,
  .work-card-meta { opacity: 1; transform: none; }
}

.work-card .type {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.work-card .title {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}

.work-card .client {
  display: none;
}

/* ---------- Contact ---------- */
.contact {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.contact-title {
  font-size: clamp(26px, 4vw, 40px);
  max-width: 16ch;
  margin-bottom: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  font-size: 13px;
}

.contact-grid dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

.contact-grid dd {
  margin: 0;
  font-size: 15px;
}

.contact-grid a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
  .nav-links span.sep { display: none; }
}

/* ---------- Project template ---------- */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-raised);
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

@media (max-width: 900px) {
  .project-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .project-gallery { grid-template-columns: 1fr; }
}

.project-info {
  padding: clamp(28px, 6vw, 48px) clamp(20px, 4vw, 48px);
}

.project-back {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: inline-block;
  margin-bottom: 20px;
}
.project-back:hover { color: var(--accent); }

.project-title { font-size: clamp(22px, 3.5vw, 32px); max-width: 24ch; margin-bottom: 18px; }

.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 12px;
}
.credits dt {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 4px;
}
.credits dd { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(20px, 6vw, 64px);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: clamp(20px, 4vw, 48px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 14px;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Intake form ---------- */
.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 72px) clamp(20px, 4vw, 48px);
}

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 90px; }

.submit-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #0C0C0C;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.submit-btn:hover { opacity: 0.85; }
