/*
Theme Name: Terra Taranta
Theme URI: https://stitch.withgoogle.com/projects/15138528506302989759
Author: Antigravity
Description: Dramatic Minimalism â€” Full replica of the Stitch design system.
Version: 2.0.0
Text Domain: terrataranta
*/

/* ============================================
   IMPORTS
============================================ */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES â€” Design Tokens
============================================ */
:root {
  /* Colors */
  --color-bg:           #131313;
  --color-black:        #000000;
  --color-surface-low:  #1b1b1b;
  --color-surface:      #1f1f1f;
  --color-surface-high: #2a2a2a;
  --color-primary:      #CF2E2E;
  --color-primary-text: #ffb3ac;
  --color-secondary:    #D4AF37;
  --color-cream:        #F5F5DC;
  --color-white:        #ffffff;
  --color-text:         #e2e2e2;
  --color-text-muted:   #e4beba;
  --color-outline:      #5b403d;

  /* Typography */
  --font-serif:   'EB Garamond', Georgia, serif;
  --font-sans:    'Manrope', system-ui, sans-serif;

  /* Spacing */
  --section-gap:  120px;
  --container:    1280px;
  --gutter:       80px;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================
   LAYOUT UTILITIES
============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-gap) 0; }

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(48px, 5.5vw, 72px); font-weight: 600; }
h2 { font-size: clamp(32px, 4vw, 48px);  font-weight: 500; }
h3 { font-size: clamp(24px, 3vw, 32px);  font-weight: 500; }

.label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border: none;
  padding: 14px 28px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background-color: #a82424; color: var(--color-white); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
}
.btn-ghost:hover { background: var(--color-secondary); color: var(--color-black); }

/* ============================================
   SITE HEADER
============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(19, 19, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 245, 220, 0.08);
  transition: background 0.3s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--color-white);
  flex-shrink: 0;
  letter-spacing: 0;
}

.site-nav { display: flex; gap: 36px; align-items: center; }

/* Support both custom nav and WP wp_nav_menu output */
.site-nav a,
.site-nav ul li a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-white);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after,
.site-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}
.site-nav a:hover,
.site-nav ul li a:hover { color: var(--color-primary-text); }
.site-nav a:hover::after,
.site-nav ul li a:hover::after { width: 100%; }

/* Reset WP nav menu styles */
.site-nav ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.site-nav ul ul { display: none; } /* hide submenus for now */
.site-nav .current-menu-item > a,
.site-nav .current-page-ancestor > a { color: var(--color-primary-text); }
.site-nav .current-menu-item > a::after { width: 100%; }

/* ============================================
   HERO SECTION
============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* No padding-top needed â€” header is fixed, hero covers full viewport */
}

/* For all non-hero pages: offset content below the fixed header */
body:not(.home) .page-hero,
body:not(.home) > main:first-of-type,
body:not(.home) section:first-of-type:not(.hero) {
  margin-top: 0; /* page-hero handles its own height */
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1542460839-44e27f07e59c?q=80&w=2070&auto=format');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.45) contrast(1.1);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.1) 40%,
    rgba(19,19,19,0.9) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 0 40px;
}

.hero-content h1 {
  font-size: clamp(52px, 6vw, 80px);
  line-height: 1.05;
  margin-bottom: 40px;
}

.hero-content h1 em {
  font-style: italic;
  color: var(--color-primary-text);
}

/* ============================================
   SECTION: ESENCIA
============================================ */
.section-esencia {
  padding: var(--section-gap) 0;
}

.esencia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.esencia-text .label { margin-bottom: 16px; }
.esencia-text h2 { margin-bottom: 28px; }

.esencia-text p {
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.esencia-quote {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-primary);
  padding-left: 20px;
  margin-top: 32px;
  line-height: 1.5;
}

.esencia-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.esencia-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.85);
}

/* ============================================
   SECTION: WORKSHOPS
============================================ */
.section-workshops {
  padding: var(--section-gap) 0;
  background: var(--color-black);
}

.workshops-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
}

.workshops-header h2 { line-height: 1; }

.workshops-header a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-white);
  border-bottom: 1px solid var(--color-secondary);
  padding-bottom: 4px;
  transition: color 0.2s;
}
.workshops-header a:hover { color: var(--color-secondary); }

.workshops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.workshop-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
}

.workshop-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7) contrast(1.1);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.workshop-card:hover .workshop-card-bg {
  transform: scale(1.04);
  filter: brightness(0.55) contrast(1.1);
}

.workshop-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.workshop-card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px;
  z-index: 2;
}

.workshop-card-content .label { margin-bottom: 12px; }
.workshop-card-content h3 { color: var(--color-white); margin-bottom: 12px; }
.workshop-card-content p { font-size: 15px; color: var(--color-text); margin-bottom: 24px; line-height: 1.5; }

/* ============================================
   SECTION: EVENTS STRIP
============================================ */
.section-events-strip {
  padding: var(--section-gap) 0;
}

.events-list { border-top: 1px solid var(--color-outline); }

.event-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-outline);
  transition: background 0.2s;
}
.event-row:hover { padding-left: 8px; }

.event-date {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  line-height: 1.2;
}

.event-date span { display: block; font-size: 28px; color: var(--color-primary); font-weight: 700; }

.event-info h4 { font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--color-white); margin-bottom: 4px; }
.event-info p  { font-size: 13px; color: var(--color-text-muted); }

.event-location {
  font-size: 13px;
  color: var(--color-secondary);
  text-align: right;
}

/* ============================================
   SECTION: NEWSLETTER
============================================ */
.section-newsletter {
  background: var(--color-surface-low);
  padding: 100px 0;
  border-top: 1px solid rgba(245,245,220,0.05);
}

.newsletter-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-inner h2 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 16px; }
.newsletter-inner p  { font-size: 16px; color: var(--color-text-muted); margin-bottom: 48px; }

.newsletter-form {
  display: flex;
  gap: 0;
  align-items: flex-end;
}

.newsletter-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.newsletter-field label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 8px;
  text-align: left;
}

.newsletter-field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245,245,220,0.3);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-field input::placeholder { color: rgba(226,226,226,0.3); }
.newsletter-field input:focus { border-bottom-color: var(--color-primary); }

.newsletter-form .btn { margin-left: 16px; height: 45px; flex-shrink: 0; }

/* ============================================
   SITE FOOTER
============================================ */
.site-footer {
  background: var(--color-black);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(245,245,220,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand .site-logo { font-size: 22px; margin-bottom: 16px; }
.footer-brand p { font-size: 13px; color: var(--color-text-muted); line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--color-text);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--color-white); }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(245,245,220,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p { font-size: 12px; color: var(--color-text-muted); }

/* ============================================
   PAGE HERO (inner pages)
============================================ */
.page-hero {
  position: relative;
  height: 60vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 64px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) contrast(1.1);
}

.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, transparent 60%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero-content .label { margin-bottom: 12px; }
.page-hero-content h1 { font-size: clamp(40px, 5vw, 64px); }

/* ============================================
   GALLERY GRID
============================================ */
.gallery-masonry {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 3px;
}

.gallery-item { overflow: hidden; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.1) brightness(0.85);
  transition: filter 0.4s ease, transform 0.5s ease;
}
.gallery-item:hover img { filter: grayscale(0%) contrast(1.1) brightness(0.9); transform: scale(1.03); }

.gallery-item--large { grid-row: 1 / 3; aspect-ratio: 2/3; }
.gallery-item--small { aspect-ratio: 4/3; }

/* ============================================
   EVENTS PAGE
============================================ */
.events-section { padding: var(--section-gap) 0; }

.event-row-full {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-outline);
  transition: padding-left 0.2s;
}
.event-row-full:hover { padding-left: 8px; }

/* ============================================
   HISTORIA PAGE
============================================ */
.historia-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding: var(--section-gap) 0;
}

.historia-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.historia-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.1) brightness(0.8);
}

.historia-images img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/9;
}

/* ============================================
   CONTACT SECTION
============================================ */
.contact-section {
  padding: var(--section-gap) 0;
  background: var(--color-black);
}

.contact-form {}

.form-field {
  margin-bottom: 40px;
}

.form-field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245,245,220,0.2);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field textarea:focus { border-bottom-color: var(--color-primary); }

.form-field textarea { min-height: 120px; resize: none; }

/* ============================================
   MOBILE MENU
============================================ */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-white);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--color-white);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--color-primary-text); }

.mobile-menu-close {
  position: absolute;
  top: 28px; right: 40px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 32px;
  cursor: pointer;
}

/* WP nav_menu list inside mobile curtain */
.mobile-menu .mobile-menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
}

.mobile-menu .mobile-menu-list li a {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--color-white);
  transition: color 0.2s;
  display: block;
  padding: 12px 0;
  text-align: center;
}
.mobile-menu .mobile-menu-list li a:hover { color: var(--color-primary-text); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  :root { --gutter: 40px; --section-gap: 80px; }
  .esencia-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; --section-gap: 64px; }

  .site-nav, .site-header .btn { display: none; }
  .menu-toggle { display: flex; }

  .workshops-grid { grid-template-columns: 1fr; }
  .gallery-masonry { grid-template-columns: 1fr; }
  .gallery-item--large { grid-row: auto; aspect-ratio: 4/3; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 20px; } .footer-brand { grid-column: 1 / -1; }
  .historia-content { grid-template-columns: 1fr; }
  .newsletter-form { display: block; }
  .newsletter-form .btn { margin-left: 0; width: 100%; }
  .event-row { grid-template-columns: 60px 1fr; }
  .event-location, .event-row .btn { display: none; }
}

/* ---- Logo imagen ---- */
.site-logo { display:flex; align-items:center; text-decoration:none; }
.site-logo-img { height:52px; width:auto; display:block; object-fit:contain; }

/* ---- Hero Video Background ---- */
.hero { position: relative; overflow: hidden; }
.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero-video-iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* 16:9 — ensure it always covers the hero */
  width: 100vw;
  height: 56.25vw; /* 100 / (16/9) */
  min-height: 100%;
  min-width: 177.78vh; /* 100 * (16/9) */
}
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(10,5,0,0.55) 50%,
    rgba(19,19,19,0.85) 100%
  );
}
.hero-content { position: relative; z-index: 2; }
