/* =========================================================================
   Blondie Madrid — PHP/CSS/JS clone
   Mobile-first. Tokens at the top, layout below, page-specific at the bottom.
   ========================================================================= */

/* ---------- Web fonts ---------- */
@font-face {
  font-family: "Founders Grotesk";
  src: url("../fonts/founders-grotesk-regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Canela";
  src: url("../fonts/canela-light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Canela";
  src: url("../fonts/canela-light-italic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* Visually-hidden but kept available for screen readers and SEO. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Design tokens ---------- */
:root {
  --c-cream:      #C58572;   /* Terracotta (was beige) — primary page bg for home + about + mobile menu drawer */
  --c-yellow:     #E5BBA6;   /* Light terracotta — same hue family as bg, just lighter (was #F0DBA8 gold) */
  --c-dark:       #302A24;
  --c-yellow-fg: #FFFAC6;    /* Bright lemon kept for text-on-dark contrast (moodboard) */
  --c-black:      #0a0a0a;
  --c-text:       #1a1310;   /* slightly darkened for better contrast on terracotta */
  --c-muted:      #5a4036;

  --f-sans:    "Founders Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-serif:   "Canela", "Times New Roman", Georgia, serif;
  --f-body:    "Open Sans", "Founders Grotesk", Arial, sans-serif;

  --letter-wide: 0.125em;
  --nav-height: 56px;
  --max-width: 1440px;
  --gutter: 24px;
}

/* ---------- Resets ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
address { font-style: normal; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Theme: page-wide background and foreground ---------- */
body.theme-cream  { background: var(--c-cream);  color: var(--c-text); }
body.theme-yellow { background: var(--c-yellow); color: var(--c-black); }
body.theme-dark   { background: var(--c-dark);   color: var(--c-yellow-fg); }

/* ===========================================================
   HEADER / NAV
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: inherit;
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
}
.site-header[data-theme="dark"]   { background: var(--c-dark); color: var(--c-yellow-fg); }
.site-header[data-theme="yellow"] { background: var(--c-yellow); color: var(--c-black); }
.site-header[data-theme="cream"]  { background: var(--c-cream); color: var(--c-black); }

/* Home: header floats transparent over the hero (matches Blondie). No background bar. */
body.page-home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 10;
}
/* Home: white nav text + light wordmark logo over the hero. Dark halo for readability
   regardless of whether the underlying photo region is light or dark. */
body.page-home:not(.nav-open) .site-nav__list a,
body.page-home:not(.nav-open) .site-header__ig,
body.page-home:not(.nav-open) .nav-toggle__label {
  color: #faf3e8;
  text-shadow:
    0 0 18px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(0, 0, 0, 0.45),
    0 0 4px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.6);
}
body.page-home:not(.nav-open) .site-nav__logo img,
body.page-home:not(.nav-open) .site-header__logo-mobile img {
  filter:
    drop-shadow(0 0 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 7px rgba(0, 0, 0, 0.45))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-height);
  padding: 0 var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 36px;
}
.site-nav__list--right { justify-content: flex-end; }
.site-nav__list a {
  display: inline-block;
  padding: 8px 0;
  text-transform: none; /* labels are already uppercased in markup */
  white-space: nowrap;
}
.site-nav__list a:hover { opacity: 0.65; }
.site-nav__logo { display: inline-block; line-height: 0; }
.site-nav__logo img { height: 40px; width: auto; max-width: 220px; }
.site-nav__lang { display: inline-flex; align-items: center; gap: 4px; }
.site-nav__lang-opt { letter-spacing: 1.5px; padding: 8px 0; opacity: 0.55; transition: opacity .15s; }
.site-nav__lang-opt:hover { opacity: 1; }
.site-nav__lang-opt.is-active { opacity: 1; font-weight: 600; pointer-events: none; cursor: default; }
.site-nav__lang-sep { opacity: 0.5; }

/* Mobile-only header chrome: IG link (top-left), mobile logo (center), MENU toggle (top-right). */
.site-header__ig,
.site-header__logo-mobile,
.nav-toggle { display: none; }

.nav-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.nav-toggle__label,
.site-header__ig {
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.site-header__logo-mobile { line-height: 0; }
.site-header__logo-mobile img { height: 40px; width: auto; max-width: 200px; display: block; }

@media (max-width: 900px) {
  /* Give the header an explicit height so absolute-positioned children have a
     reference frame — without this, .site-nav becomes the drawer (position:fixed)
     so .site-header collapses to 0 height and items get cut off at top:0. */
  .site-header {
    height: var(--nav-height);
    min-height: var(--nav-height);
  }

  /* Show mobile chrome: IG (left), logo (center), MENU (right). */
  .site-header__ig,
  .site-header__logo-mobile,
  .nav-toggle { display: block; }

  .site-header__ig {
    position: absolute;
    top: 50%; left: var(--gutter);
    transform: translateY(-50%);
    z-index: 70;
  }
  .site-header__logo-mobile {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 65;
    line-height: 0;
  }
  .nav-toggle {
    position: absolute;
    top: 50%; right: var(--gutter); left: auto;
    transform: translateY(-50%);
    z-index: 70;
  }

  /* The whole nav becomes a full-screen drawer (Blondie-style). */
  .site-nav {
    position: fixed;
    inset: 0;
    display: flex !important;            /* override desktop grid */
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100vh;
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--c-cream);          /* terracotta */
    color: var(--c-text);
    padding: calc(var(--nav-height) + 24px) 8vw 32px;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform .4s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
    z-index: 60;
    grid-template-columns: unset;
    gap: 0;
  }
  body.nav-open .site-nav {
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Logo inside drawer is hidden — header bar shows it when drawer closed. */
  .site-nav__logo { display: none; }

  /* Both ul lists are layout-transparent — their <li> children become flex
     children of .site-nav so we can stack and reorder freely. */
  .site-nav__list,
  .site-nav__list--left,
  .site-nav__list--right {
    display: contents;
  }

  /* Each menu row: full-width with horizontal dividers above (creates lines between). */
  .site-nav__list li {
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.35);
    text-align: left;
  }
  /* Last item adds a bottom border too so the closing line shows. */
  .site-nav__list--right li:nth-child(1) { border-bottom: 1px solid rgba(0, 0, 0, 0.35); }

  /* Item text: large serif, generous padding (matches Blondie's mobile menu). */
  .site-nav__list a {
    display: block;
    padding: 26px 0;
    font-family: var(--f-serif);
    font-size: 36px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
  }
  .site-nav__list a:hover { opacity: 1; }

  /* Reorder: ABOUT, SERVICIOS, MOODBOARD, CONTACTO, IDIOMA, INSTAGRAM. */
  .site-nav__list--left  li:nth-child(1) { order: 3; }   /* MOODBOARD */
  .site-nav__list--left  li:nth-child(2) { order: 2; }   /* SERVICIOS */
  .site-nav__list--left  li:nth-child(3) { order: 1; }   /* QUIÉNES SOMOS */
  .site-nav__list--right li:nth-child(2) { order: 4; }   /* CONTACTO */
  .site-nav__list--right li:nth-child(3) { order: 5; }   /* IDIOMA */
  .site-nav__list--right li:nth-child(1) { order: 99; margin-top: 32px; }  /* INSTAGRAM at bottom */

  /* Language toggle: stays inline ES / CAT, but uses serif font scale. */
  .site-nav__lang {
    padding: 26px 0;
    gap: 10px;
    align-items: baseline;
    width: 100%;
  }
  .site-nav__lang-opt {
    font-family: var(--f-serif);
    font-size: 36px;
    letter-spacing: 0;
    padding: 0;
  }
  .site-nav__lang-opt.is-active { font-weight: 500; }
  .site-nav__lang-sep {
    font-family: var(--f-serif);
    font-size: 36px;
    margin: 0 4px;
  }

  /* INSTAGRAM row: smaller sans-serif uppercase at bottom. */
  .site-nav__list--right li:nth-child(1) a {
    font-family: var(--f-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 22px 0;
  }

  /* Make the hamburger always sit on top of the drawer and stay visible. */
  .nav-toggle { z-index: 70; }

  /* When drawer is open, force a transparent header so the drawer's terracotta
     bg shows through without a colored bar on top. */
  body.nav-open .site-header { background: transparent !important; }

  /* Hide IG link and mobile logo when drawer is open (only MENU is needed to close it). */
  body.nav-open .site-header__ig,
  body.nav-open .site-header__logo-mobile { display: none; }

  /* Drawer text sits on solid terracotta — no need for the home-page text halo. */
  body.page-home.nav-open .site-nav__list a,
  body.page-home.nav-open .site-nav__lang-opt,
  body.page-home.nav-open .site-nav__lang-sep,
  body.page-home.nav-open .nav-toggle__label { text-shadow: none; }
  body.page-home.nav-open .site-nav__logo img,
  body.page-home.nav-open .site-header__logo-mobile img { filter: none; }
}

/* ===========================================================
   HOME (hero)
   =========================================================== */
.page-home__main { padding: 0; }
.hero {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}
.hero__pane {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.hero__pane picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Tablet — keep 2 columns side by side (matches Blondie's tablet at 768-980px) */
@media (max-width: 980px) and (min-width: 768px) {
  .hero { height: 100vh; }
}
/* Mobile — show only the left (hair) pane full viewport, matches Blondie's single-image mobile */
@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
  }
  .hero__pane--right { display: none; }
}

/* ===========================================================
   MOODBOARD
   =========================================================== */
.moodboard {
  background: var(--c-dark);
  color: var(--c-yellow-fg);
  padding: 40px var(--gutter) 80px;
}
.moodboard__intro {
  text-align: center;
  padding: 24px 0 56px;
}
.moodboard__title {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: 30px;
  letter-spacing: 0.5px;
}
.moodboard__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.moodboard__col {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.tile { margin: 0; }
.tile picture {
  display: block;
  width: 100%;
}
.tile__img {
  width: 100%;
  height: auto;
  display: block;
  background: rgba(255, 250, 198, 0.05);
}
.tile__caption {
  margin-top: 14px;
  font-family: var(--f-sans);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.2px;
  color: var(--c-yellow-fg);
}

@media (max-width: 1100px) {
  .moodboard__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .moodboard__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .moodboard__col  { gap: 36px; }
  .moodboard       { padding: 24px var(--gutter) 56px; }
}

/* ===========================================================
   SERVICIOS
   =========================================================== */
.servicios { padding: 80px var(--gutter) 64px; }
.servicios__intro {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.servicios__title {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 24px;
}
.servicios__title em { font-style: italic; font-weight: 300; }
.servicios__lede {
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text);
}
.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service { text-align: center; }
.service__media {
  position: relative;
  width: 100%;
  aspect-ratio: 670 / 1100; /* arch tile */
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.4);
  border-radius: 50% 50% 0 0 / 30% 30% 0 0; /* arch shape */
  background: #e4e1d6;
}
.service__media picture {
  display: block;
  width: 100%;
  height: 100%;
}
.service__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.service__name {
  margin-top: 18px;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--c-black);
}

.products {
  max-width: 720px;
  margin: 88px auto 0;
  text-align: center;
}
.products__title {
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.4px;
  margin-bottom: 24px;
  color: var(--c-black);
}
.products__lede {
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.products__brands img {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .servicios__title { font-size: 30px; }
  .servicios { padding: 56px var(--gutter) 48px; }
}
@media (max-width: 520px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================
   ABOUT
   =========================================================== */
.about {
  background: var(--c-cream);
  padding: 56px var(--gutter) 80px;
}
.about__dome {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--c-yellow);
  border-radius: 50% 50% 0 0 / 35% 35% 0 0;
  border: 1px solid rgba(0,0,0,0.4);
  padding: 320px var(--gutter) 200px;
  overflow: hidden;
}
.about__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--c-black);
}
.about__title {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: 36px;
  margin-bottom: 56px;
}
.about__title em { font-style: italic; }
.about__lede {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 32px;
}
.about__inner p {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 22px;
}
.about__cta {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 500;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .about__dome { padding: 180px var(--gutter) 100px; border-radius: 50% 50% 0 0 / 18% 18% 0 0; }
  .about__title { font-size: 28px; }
  .about__lede  { font-size: 22px; }
}
@media (max-width: 560px) {
  .about__dome { padding: 120px 16px 80px; border-radius: 50% 50% 0 0 / 12% 12% 0 0; }
  .about__title { font-size: 24px; margin-bottom: 32px; }
  .about__lede  { font-size: 18px; }
}

/* ===========================================================
   CONTACTO
   =========================================================== */
.contacto {
  padding: 72px var(--gutter) 96px;
  text-align: center;
  color: var(--c-black);
}
.contacto__title {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: 38px;
  margin-bottom: 48px;
}
.contacto__block { margin: 0 0 56px; }
.contacto__label {
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}
.contacto__block p, .contacto__block address {
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 6px;
}
.contacto__block a:hover { text-decoration: underline; }
/* Location card: side-by-side info + map on desktop, stacked on mobile.
   Alternates side per location for a richer editorial rhythm. */
.contacto__location {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 40px;
  max-width: 980px;
  margin: 0 auto 64px;
  text-align: left;
}
.contacto__location:last-child { margin-bottom: 0; }
.contacto__location:nth-child(even) {
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
}
.contacto__location:nth-child(even) .contacto__location-info { order: 2; }
.contacto__location:nth-child(even) .contacto__map { order: 1; }

.contacto__location-info p,
.contacto__location-info address { margin: 0 0 8px; }
.contacto__location-name {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.contacto__location-phone { margin-top: 10px; }
.contacto__location-phone a { font-weight: 500; }

/* Map: large, soft-edged, color-graded to blend with terracotta palette.
   No visible border, deep but soft shadow gives it weight without bolted-on borders. */
.contacto__map {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  line-height: 0;
  box-shadow:
    0 1px 2px rgba(70, 35, 22, 0.08),
    0 12px 28px -12px rgba(70, 35, 22, 0.22);
  /* Warm desaturation: pulls Google's vivid blues/greens toward the page palette
     without losing legibility (street names, markers stay readable). */
  filter: saturate(0.6) contrast(0.95) brightness(1.02);
  -webkit-filter: saturate(0.6) contrast(0.95) brightness(1.02);
}
.contacto__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contacto__map-link {
  margin: 18px 0 0;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.contacto__map-link a {
  position: relative;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: opacity .15s ease;
}
.contacto__map-link a:hover { opacity: 0.6; }

@media (max-width: 720px) {
  .contacto__location,
  .contacto__location:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }
  .contacto__location:nth-child(even) .contacto__location-info { order: 1; }
  .contacto__location:nth-child(even) .contacto__map { order: 2; }
  .contacto__map { aspect-ratio: 4 / 3; border-radius: 10px; }
}

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
  background: var(--c-cream);
  color: var(--c-black);
  padding: 56px var(--gutter) 32px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-family: var(--f-sans);
  font-size: 13px;
  line-height: 1.7;
}
body.theme-dark   .site-footer { background: var(--c-dark); color: var(--c-yellow-fg); border-color: rgba(255,250,198,0.1); }
body.theme-yellow .site-footer { background: var(--c-yellow); }
.site-footer__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
.site-footer__title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.site-footer__list li { margin-bottom: 4px; }
.site-footer__list a:hover, .site-footer__col a:hover { text-decoration: underline; }
.site-footer__col--center {
  text-align: center;
}
.site-footer__brand { display: inline-block; line-height: 0; margin-bottom: 20px; }
.site-footer__brand img { height: 48px; width: auto; max-width: 220px; margin: 0 auto; }
.site-footer__hours { margin: 14px 0 0; }
.site-footer__address { font-style: normal; margin: 0 0 14px; }
.site-footer__address:last-of-type { margin-bottom: 14px; }
.site-footer__location { margin: 0 0 12px; }
.site-footer__copy {
  text-align: center;
  font-size: 12px;
  margin: 56px 0 0;
}

@media (max-width: 1000px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .site-footer__col--center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
}
