/* =============================================
   SALINAS — Oficina de Arquitectura
   Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&family=Montserrat:wght@300;400;500&display=swap');

@font-face {
  font-family: 'Flatline';
  src: url('../fonts/Flatline-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

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

:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #888888;
  --light-gray: #f0f0f0;
  --nav-font: 'Montserrat', sans-serif;
  --title-font: 'Cormorant Garamond', serif;
  --transition: 0.4s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--nav-font);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

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

/* =============================================
   HEADER / NAV
   ============================================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  mix-blend-mode: normal;
  transition: background var(--transition);
}

header.on-slider {
  background: transparent;
}

header.on-white {
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.logo-text {
  font-family: 'Flatline', serif;
  font-weight: normal;
  font-size: clamp(28px, 3.2vw, 46px);
  letter-spacing: 0.08em;
  color: var(--white);
  line-height: 1;
  transition: color var(--transition);
}

header.on-white .logo-text {
  color: var(--black);
}

/* Nav links */
nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

nav a {
  font-family: var(--nav-font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: none;
  position: relative;
  transition: color var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

header.on-white nav a {
  color: var(--black);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: all 0.3s ease;
}

header.on-white .hamburger span {
  background: var(--black);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--title-font);
  font-size: 34px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
}

.mobile-close {
  position: absolute;
  top: 28px;
  right: 48px;
  font-size: 28px;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* =============================================
   HERO SLIDER
   ============================================= */

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Subtle dark vignette */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,0.35) 100%
  );
}

/* Slide indicator dots */
.slider-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
}

.dot.active {
  background: rgba(255,255,255,0.95);
}

/* Project caption (optional) */
.slide-caption {
  position: absolute;
  bottom: 64px;
  left: 48px;
  z-index: 10;
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.slide.active .slide-caption {
  opacity: 1;
  transform: translateY(0);
}

.slide-caption .caption-title {
  font-family: var(--title-font);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 300;
  letter-spacing: 0.05em;
}

.slide-caption .caption-location {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.7;
}

/* =============================================
   PAGE SECTIONS (shared)
   ============================================= */

.page-section {
  min-height: 100vh;
  padding: 120px 48px 80px;
}

.page-section--profile {
  min-height: unset;
  padding-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--black);
  padding-bottom: 16px;
}

.section-title {
  font-family: var(--title-font);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.section-count {
  font-family: var(--nav-font);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gray);
}

/* =============================================
   WORK / PROJECTS GRID
   ============================================= */

#work {
  background: var(--white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.project-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--light-gray);
  cursor: pointer;
}

.project-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
  display: block;
}

.project-item:hover img {
  transform: scale(1.04);
}

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  color: var(--white);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-item:hover .project-info {
  opacity: 1;
  transform: translateY(0);
}

.project-name {
  font-family: var(--title-font);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 300;
  letter-spacing: 0.03em;
}

.project-meta {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.8;
}

/* Wide item spans 2 columns */
.project-item.wide {
  grid-column: span 2;
  aspect-ratio: 16 / 7;
}

/* =============================================
   PROFILE
   ============================================= */

#profile {
  background: var(--white);
}

.profile-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}

.profile-text h2 {
  font-family: var(--title-font);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}

.profile-text p {
  font-family: var(--nav-font);
  font-size: 14px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 20px;
}

.profile-image {
  width: 380px;
  max-height: calc(100vh - 180px);
  overflow: hidden;
  background: var(--light-gray);
  flex-shrink: 0;
}

.profile-image img {
  width: 380px;
  max-height: calc(100vh - 180px);
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* =============================================
   NEWS
   ============================================= */

#news {
  background: var(--white);
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr 320px;
  gap: 40px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: background 0.2s ease;
}

.news-item:hover {
  background: var(--light-gray);
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 -16px;
}

.news-date {
  font-family: var(--nav-font);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gray);
  padding-top: 4px;
}

.news-title {
  font-family: var(--title-font);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.news-tag {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  padding-top: 6px;
  text-align: right;
}

.news-btn {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
  border: 1px solid var(--black);
  padding: 6px 14px;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
  transition: background 0.2s, color 0.2s;
}
.news-btn:hover {
  background: var(--black);
  color: var(--white);
}

/* =============================================
   CONTACT
   ============================================= */

#contact {
  background: var(--black);
  color: var(--white);
}

#contact .section-header {
  border-bottom-color: rgba(255,255,255,0.2);
}

.contact-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 48px 80px;
}

.contact-centered-inner {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.contact-offices {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.contact-office {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.office-label {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 10px;
}

.contact-office p {
  font-family: var(--nav-font);
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--black);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.contact-links a {
  font-family: var(--nav-font);
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 300;
  color: var(--black);
  letter-spacing: 0.02em;
}

.contact-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-block h3 {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}

.contact-block p,
.contact-block a {
  font-family: var(--title-font);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--white);
}

.contact-block a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.form-field input,
.form-field textarea {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding: 10px 0;
  color: var(--white);
  font-family: var(--nav-font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--white);
}

.form-field textarea {
  resize: none;
  height: 100px;
}

.btn-submit {
  align-self: flex-start;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-family: var(--nav-font);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.btn-submit:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* =============================================
   FOOTER
   ============================================= */

footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--title-font);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
}

.footer-copy {
  font-family: var(--nav-font);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  header {
    padding: 20px 24px;
  }

  nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .page-section {
    padding: 100px 24px 60px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-item.wide {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }

  .project-info {
    opacity: 1;
    transform: translateY(0);
  }

  .profile-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .news-tag {
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .slide-caption {
    left: 24px;
    bottom: 56px;
  }
}
