/* ============================================================
   Cishots portfolio - main stylesheet
   Edit the variables below to restyle the whole site.
   ============================================================ */

:root {
  --bg: #232323;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --text: #f3f3f1;
  --muted: #9a9a96;
  --accent: #c8a96a;
  --accent-hover: #d9bd83;
  --border: #c8a96a;
  --max-width: 1200px;
  --radius: 6px;
  --font-head: "Baumans", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---------- Layout helpers ---------- */
main {
  min-height: 60vh;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-head {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.see-all {
  color: var(--accent);
  font-size: 0.95rem;
}

.see-all:hover { color: var(--accent-hover); }

/* "Más" dropdown in section head (Fotografía / Vídeo) */
.dropdown--section-more .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown--section-more .dropdown-menu::before {
  left: 0;
  right: 0;
}

.section-more-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: inherit;
}

.section-more-toggle:hover,
.dropdown--section-more:hover .section-more-toggle,
.dropdown--section-more:focus-within .section-more-toggle,
.dropdown--section-more.open .section-more-toggle {
  color: var(--accent-hover);
}

/* Featured strip: optional video cell (not .gallery-item — avoids lightbox) */
.gallery--featured .gallery-featured-video {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.gallery--featured .gallery-featured-video .video-embed {
  min-height: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(35, 35, 35, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  color: var(--text);
}

.brand-mark {
  height: 3.5rem;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.site-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  min-height: 78vh;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(200, 169, 106, 0.12), transparent 60%),
    var(--bg);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin-bottom: 0.75rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.25rem;
  max-width: 52ch;
  margin: 0.4rem auto 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #111;
  border: 1px solid var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Dropdown (hero "Ver trabajo") ---------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-caret {
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}

/* invisible bridge so the menu stays open while moving the cursor into it */
.dropdown-menu::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown:hover .dropdown-caret,
.dropdown:focus-within .dropdown-caret,
.dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  color: var(--text);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--accent);
  color: #111;
  outline: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Page head ---------- */
.page-head {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 1rem;
}

.page-head p {
  color: var(--muted);
  max-width: 60ch;
}


/* ---------- Galleries ---------- */
.gallery--featured {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}

.gallery--masonry {
  columns: 3;
  column-gap: 1rem;
}

.gallery--masonry .gallery-item {
  display: block;
  margin-bottom: 1rem;
  break-inside: avoid;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  transition: transform 0.4s ease, opacity 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  max-width: var(--max-width);
  margin: 2rem auto;
}

.cta-band p { color: var(--muted); margin-bottom: 1.5rem; }

/* ---------- Video ---------- */
.video-list {
  display: grid;
  gap: 3rem;
}

.video-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

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

.video-embed--poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}

/* Looks like a video: overlay + play chip */
.video-embed--poster.is-playable {
  cursor: pointer;
}

.video-embed--poster.is-playable::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.25) 42%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-embed--poster.is-playable::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 4rem;
  height: 4rem;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  background-color: rgba(0, 0, 0, 0.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 44%;
  background-position: 54% 50%;
  background-repeat: no-repeat;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.video-embed--poster.is-playable:hover::after,
.video-embed--poster.is-playable:focus-visible::after {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
}

.video-embed--poster.is-playable img {
  transition: opacity 0.25s, transform 0.4s ease;
}

.video-embed--poster.is-playable:hover img,
.video-embed--poster.is-playable:focus-visible img {
  opacity: 0.88;
  transform: scale(1.02);
}

.video-role {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.75rem;
}

.video-meta p { color: var(--muted); }
.video-meta h3 { color: var(--text); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
}

.about-photo img { border-radius: var(--radius); }

.lead {
  font-size: 1.3rem;
  color: var(--text);
}

.about-text p { color: var(--muted); }
.about-text .lead { color: var(--text); }

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.service-card h3 { color: var(--accent); margin-bottom: 0.5rem; }
.service-card p { color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form .field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.hidden-field { display: none; }

.contact-aside h2 { font-size: 1.3rem; }
.contact-aside p { color: var(--muted); }
.contact-aside a { color: var(--accent); }

.social--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.copyright {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Fullscreen video modal (e.g. index featured video) ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(2rem, 4vw);
  background: rgba(0, 0, 0, 0.92);
}

.video-modal-inner {
  position: relative;
  width: min(96vw, 1200px);
  aspect-ratio: 16 / 9;
  max-height: 86vh;
}

.video-modal-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

.video-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .video-card { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .gallery--featured { grid-template-columns: repeat(2, 1fr); }
  .gallery--masonry { columns: 2; }
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.open { max-height: 320px; }

  .site-nav a {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a.active { border-bottom-color: var(--border); color: var(--accent); }

  .section { padding: 2.5rem 1.25rem; }
}

@media (max-width: 420px) {
  .gallery--featured { grid-template-columns: 1fr; }
  .gallery--masonry { columns: 1; }
}
