/* ============================================================
   FreemiumStudio — styles.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:  #2a295f;
  --teal:  #11a99f;
  --teal-text: #0d837c; /* darker teal for text-on-white — meets WCAG AA (4.6:1), --teal fails at 2.9:1 */
  --white: #FFFFFF;
  --light: #F4F7FB;
  --gray:  #6B7280;
  --dark:  #111827;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(30, 40, 100, 0.10);
  --transition: 0.25s ease;
  --max-width: 1160px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
:focus-visible {
  outline: 2px solid var(--teal-text);
  outline-offset: 2px;
}
body {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Utilities ─────────────────────────────────────────────── */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}
.section { padding: 80px 0; }
.section--light { background: var(--light); }
.section--navy { background: var(--navy); color: var(--white); }
.section--teal { background: var(--teal); color: var(--white); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 12px;
}
.section--navy .section-label,
.section--teal .section-label {
  color: rgba(255,255,255,0.7);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 16px;
}
.section--navy .section-title,
.section--teal .section-title { color: var(--white); }

.section-desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 600px;
}
.section--navy .section-desc,
.section--teal .section-desc { color: rgba(255,255,255,0.80); }

.text-teal { color: var(--teal-text); }
.text-center { text-align: center; }
.text-center .section-desc { margin: 0 auto; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-primary:hover {
  background: transparent;
  color: var(--teal-text);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: transparent;
  color: var(--navy);
}

/* ── Navigation ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(42,41,95,0.08);
  height: 72px;
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
}
.navbar-logo img { height: 40px; width: auto; }
.navbar-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.navbar-links a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  transition: color var(--transition);
}
.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--teal-text); }
.navbar-links a:hover::after,
.navbar-links a.active::after { transform: scaleX(1); }
.navbar-links .btn { margin-left: 8px; }

@media (max-width: 1100px) and (min-width: 769px) {
  .navbar-links { gap: 22px; }
  .navbar-links a { font-size: 0.78rem; }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(42,41,95,0.12);
    padding: 24px 0;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a {
    padding: 14px 32px;
    width: 100%;
    border-bottom: 1px solid var(--light);
  }
  .navbar-links a::after { display: none; }
  .navbar-links .btn { margin: 16px 32px 0; }
}

/* ── Page header (pages other than index) ──────────────────── */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 140px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header .section-label { color: rgba(255,255,255,0.6); }
.page-header .section-title { color: var(--white); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.75); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* Subtle background image — ghosted behind the title, never competes with text */
.page-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  z-index: 0;
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .page-header-bg { animation: none; }
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42,41,95,0.88) 0%, rgba(42,41,95,0.94) 100%);
  z-index: 0;
}
.page-header .container { position: relative; z-index: 1; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(42,41,95,0.14);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(17, 169, 159, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; stroke: var(--teal); fill: none; stroke-width: 1.8; }
.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.65;
}

/* ── Grid layouts ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
.footer-bottom span { color: rgba(255,255,255,0.45); }
.footer-bottom a { color: var(--teal); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 4px;
  background: var(--teal);
  border-radius: 4px;
  margin: 16px 0 32px;
}
.text-center .divider { margin: 16px auto 32px; }

/* ── Fade-in animation ─────────────────────────────────────────
   Visible by default (no JS dependency). Only hidden-then-revealed
   when html.js is present (set by an inline script in <head>), so
   content never ships blank if JS fails, is slow, or never runs
   (crawlers, headless renders, print). ────────────────────────── */
.fade-in { opacity: 1; transform: none; }
html.js .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
html.js .fade-in.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Staggered reveal — opt-in via .stagger alongside .fade-in ──
   Pairs with the IntersectionObserver in script.js: it already adds
   .visible to the .fade-in element, .stagger just fans that out to
   direct children with an increasing delay. ────────────────────── */
.stagger > * { opacity: 1; transform: none; }
html.js .stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
html.js .stagger.visible > * { opacity: 1; transform: none; }
html.js .stagger.visible > *:nth-child(1) { transition-delay: 0.03s; }
html.js .stagger.visible > *:nth-child(2) { transition-delay: 0.09s; }
html.js .stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
html.js .stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
html.js .stagger.visible > *:nth-child(5) { transition-delay: 0.27s; }
html.js .stagger.visible > *:nth-child(n+6) { transition-delay: 0.33s; }
@media (prefers-reduced-motion: reduce) {
  html.js .stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ── Quote block ───────────────────────────────────────────── */
.quote-block {
  position: relative;
  overflow: hidden;
  padding: 40px 44px;
  background: rgba(17,169,159,0.07);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.6;
}
.quote-block p { position: relative; z-index: 1; }
.quote-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  opacity: 0.16;
  z-index: 0;
  animation: kenburns 26s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .quote-bg { animation: none; }
}

/* ── Rental cards ──────────────────────────────────────────── */
.rental-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: background var(--transition);
}
.rental-card:hover { background: rgba(255,255,255,0.14); }
.rental-card .icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}
.rental-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.rental-card p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.70);
  line-height: 1.6;
}

/* ── Contact form ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--teal); }
.form-group textarea { resize: vertical; min-height: 140px; }

/* ── Page offset for fixed navbar ──────────────────────────── */
.page-content { padding-top: 72px; }

/* ── FAQ accordion ─────────────────────────────────────────────
   grid-template-rows 0fr→1fr instead of max-height: no layout
   thrash, and the trigger is a real <button> for keyboard/SR use. */
.faq-question {
  margin-bottom: 0;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.faq-question.open::after { content: '−'; }
.faq-question.open { color: var(--teal-text); }
.faq-answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq-question.open + .faq-answer-wrap { grid-template-rows: 1fr; }
.faq-answer {
  overflow: hidden;
  min-height: 0;
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.75;
  padding-right: 32px;
}


/* ── Pilares quote layout ──────────────────────────────────── */
.pilares-quote { margin-top: 48px; }

/* ── Events gallery ────────────────────────────────────────── */
.events-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 48px;
}
.events-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.92);
  cursor: pointer;
}
.events-gallery img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}
.events-gallery img.wide { grid-column: span 2; height: 320px; }
@media (max-width: 768px) {
  .events-gallery { grid-template-columns: repeat(2, 1fr); }
  .events-gallery img.wide { grid-column: span 1; height: 200px; }
  .events-gallery img      { height: 200px; }
}
@media (max-width: 480px) {
  .events-gallery { grid-template-columns: 1fr; }
  .events-gallery img.wide { grid-column: span 1; }
}

/* ── Studio photo ──────────────────────────────────────────── */
.studio-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  opacity: 0.88;
}
