/* =========================
   CIC Sol Naciente — styles
   Reconstrucción del frame Figma cicsolnacientedepastosgrandes.cl
   ========================= */

/* ===== Fuente personalizada: MADE Tommy Soft =====
   Licencia: PERSONAL USE. Para uso comercial contactar madetypeinfo@gmail.com
   o adquirir licencia en creativemarket.com/MadeType
*/
@font-face {
  font-family: "MADE Tommy Soft";
  src: url("/assets/fonts/MADETommySoft-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MADE Tommy Soft";
  src: url("/assets/fonts/MADETommySoft-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MADE Tommy Soft";
  src: url("/assets/fonts/MADETommySoft-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange:        #E8632B;
  --orange-deep:   #C84A1B;
  --orange-soft:   #F4A270;
  --peach:         #F8D5BC;
  --cream:         #F1ECE3;
  --cream-deep:    #E9E2D5;
  --ink:           #2B2B2B;
  --ink-soft:      #555555;
  --white:         #ffffff;

  --font-display:  "MADE Tommy Soft", "Fraunces", "Georgia", serif;
  --font-brand:    "MADE Tommy Soft", "Montserrat", sans-serif;
  --font-body:     "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
                   Roboto, Helvetica, Arial, sans-serif;

  --container:     1240px;
  --radius:        14px;
  --radius-lg:     22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-weight: 400;
}

a { color: inherit; }

/* =========================
   NAV
   ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 48px);
  background: linear-gradient(
    180deg,
    rgba(232, 99, 43, 0.8) 0%,
    rgba(216, 80, 31, 0.8) 100%
  );
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.nav__logo {
  width: 60px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav__brand-text small {
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 500;
  opacity: 0.95;
}

.nav__brand-text strong {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.nav__menu {
  display: flex;
  gap: clamp(14px, 2.4vw, 38px);
  align-items: center;
}

.nav__menu a {
  text-decoration: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0.95;
  transition: opacity 150ms ease;
}

.nav__menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* =========================
   HERO
   ========================= */
.hero {
  position: relative;
  height: clamp(420px, 70vh, 720px);
  overflow: hidden;
  background: #C84A1B;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero background: photo of Atacama, with a soft vignette for legibility of the logo */
.hero__media {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.25) 100%),
    url("/assets/hero.jpg"),
    linear-gradient(160deg, #E8632B 0%, #A33E13 50%, #5C2207 100%);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center bottom, center;
  background-repeat: no-repeat;
  filter: saturate(1.08) contrast(1.02);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.45);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 150ms ease, transform 150ms ease;
}

.hero__arrow:hover { background: rgba(255,255,255,0.28); transform: translateY(-50%) scale(1.05); }

.hero__arrow--prev { left: 24px; }
.hero__arrow--next { right: 24px; }

.hero__lockup {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}

.hero__logo {
  width: clamp(220px, 32vw, 360px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.25));
}

/* =========================
   CONTENT BLOCKS
   ========================= */
.block {
  position: relative;
  padding: clamp(60px, 9vw, 110px) clamp(20px, 5vw, 48px);
  background: var(--cream);
  overflow: hidden;
}

.block--alt { background: var(--cream); }

.block__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Reverse layout: image on the left, text on the right */
.block__inner--reverse .block__text  { order: 2; }
.block__inner--reverse .block__media { order: 1; }

.block__text { max-width: 540px; }

.block__text p {
  font-size: 15px;
  line-height: 1.75;
  color: #3D3D3D;
  margin: 0 0 16px;
}

.block__text p:last-child { margin-bottom: 0; }

/* Section title — MADE Tommy Soft Black with browser-faked italic */
.section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  color: var(--orange);
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  margin: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  letter-spacing: -0.005em;
}

.section-title__rule {
  display: inline-block;
  height: 3px;
  width: clamp(40px, 8vw, 90px);
  background: var(--orange);
  border-radius: 3px;
  flex-shrink: 0;
  transform: translateY(2px);
}

/* Media: rounded photo */
.block__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
  box-shadow: 0 14px 40px rgba(0,0,0,0.10);
  transform: rotate(-0.6deg);
  background: var(--cream-deep);
}

.block__media-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Different fallback gradients per image; replace with real photos in /assets */
.block__media--valle .block__media-inner {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.18) 100%),
    url("/assets/valle.jpg"),
    linear-gradient(160deg, #C9B89A 0%, #A89674 40%, #6D8A6F 100%);
}

.block__media--comunidad {
  transform: rotate(0.8deg);
}

.block__media--comunidad .block__media-inner {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.18) 100%),
    url("/assets/personas.jpg"),
    linear-gradient(160deg, #D8C7A8 0%, #B89A6E 50%, #6F5C40 100%);
}

.block--alt .block__inner { position: relative; z-index: 1; }

/* =========================
   FULL-BLEED MODIFIERS — image flows to viewport edge
   ========================= */
.block--bleed-right,
.block--bleed-left {
  overflow: hidden;
}

.block--bleed-right { padding-right: 0; }
.block--bleed-left  { padding-left: 0; }

.block--bleed-right .block__inner,
.block--bleed-left .block__inner {
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.25fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.block--bleed-right .block__inner {
  padding-left: max(20px, calc((100vw - var(--container)) / 2 + 20px));
}

.block--bleed-left .block__inner {
  padding-right: max(20px, calc((100vw - var(--container)) / 2 + 20px));
}

/* Bleed images: bigger, cinematic, rounded only on inner edge */
.block--bleed-right .block__media,
.block--bleed-left  .block__media {
  aspect-ratio: 16 / 11;
  transform: none;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.block--bleed-right .block__media { border-radius: 22px 0 0 22px; }
.block--bleed-left  .block__media { border-radius: 0 22px 22px 0; }

/* Make section title's rule extend further on bleed sections */
.block--bleed-right .section-title__rule,
.block--bleed-left  .section-title__rule {
  width: clamp(60px, 14vw, 160px);
}

/* Mobile: restore standard padding, stack normally */
@media (max-width: 960px) {
  .block--bleed-right { padding-right: clamp(20px, 5vw, 48px); }
  .block--bleed-left  { padding-left:  clamp(20px, 5vw, 48px); }

  .block--bleed-right .block__inner,
  .block--bleed-left  .block__inner {
    padding-left: 0;
    padding-right: 0;
    grid-template-columns: 1fr;
  }

  .block--bleed-right .block__media,
  .block--bleed-left  .block__media {
    border-radius: 22px;
    aspect-ratio: 16 / 11;
  }
}

/* =========================
   PULLQUOTE — Declaración de principios
   ========================= */
.pullquote {
  background: var(--cream);
  padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 48px);
  position: relative;
}

.pullquote::before,
.pullquote::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange-soft), transparent);
  max-width: 280px;
  margin: 0 auto;
  opacity: 0.5;
}

.pullquote::before { margin-bottom: clamp(50px, 7vw, 80px); margin-top: -40px; }
.pullquote::after  { margin-top: clamp(50px, 7vw, 80px); margin-bottom: -40px; }

.pullquote__inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.pullquote__mark {
  width: 56px;
  height: auto;
  margin: 0 auto 24px;
  display: block;
  color: var(--orange);
  opacity: 0.85;
}

.pullquote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 38px);
  line-height: 1.3;
  color: var(--orange);
  margin: 0 0 36px;
  letter-spacing: -0.01em;
  quotes: none;
}

.pullquote p {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.8;
  color: #3D3D3D;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.pullquote p strong {
  color: var(--orange);
  font-weight: 700;
}

/* =========================
   NARRATIVE BLOCKS
   ========================= */
.block--narrative .narrative,
.block--narrative .resistance-card {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin: 0 0 14px;
  text-align: center;
}

.section-title--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto 32px;
  gap: 0;
}

.section-title--centered .section-title__rule {
  display: block;
  margin: 16px 0 0;
  width: 80px;
}

.narrative p {
  font-size: 15px;
  line-height: 1.85;
  color: #3D3D3D;
  margin: 0 0 20px;
}

.narrative p strong { color: var(--ink); font-weight: 700; }
.narrative p em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
}

.lead-statement {
  font-size: clamp(17px, 2.1vw, 22px) !important;
  line-height: 1.55 !important;
  color: var(--ink) !important;
  text-align: center;
  margin: 0 0 36px !important;
  font-weight: 500;
}

.lead-statement strong {
  color: var(--orange) !important;
  font-weight: 700;
}

.closing-statement {
  text-align: center;
  font-size: clamp(16px, 1.9vw, 20px) !important;
  color: var(--orange) !important;
  margin-top: 28px !important;
  font-weight: 500;
}

.lead-inline {
  text-align: center;
  font-weight: 600;
  color: var(--ink) !important;
  margin-top: 8px !important;
  margin-bottom: 4px !important;
}

.manual-body {
  font-size: clamp(16px, 1.8vw, 19px) !important;
  line-height: 1.75 !important;
  text-align: center;
  color: #3D3D3D !important;
  max-width: 680px;
  margin: 0 auto !important;
}

/* =========================
   ASPECT LIST — Cards "Cada planta tiene"
   ========================= */
.aspect-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.aspect-list li {
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 4px 4px 0 var(--orange);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.aspect-list li:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--orange);
}

.aspect-list__num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 18px;
  color: var(--orange-soft);
  letter-spacing: 0.05em;
}

.aspect-list li strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  color: var(--orange);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.2;
  display: block;
}

/* =========================
   RESISTANCE CARD — Closing
   ========================= */
.resistance-card {
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: 22px;
  padding: clamp(40px, 6vw, 70px);
  text-align: center;
  box-shadow: 8px 8px 0 var(--orange);
  max-width: 760px;
}

.resistance-card__title { color: var(--orange) !important; }

.resistance-card p {
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.75;
  color: #3D3D3D;
  margin: 0 0 16px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.resistance-card p:last-child { margin-bottom: 0; }
.resistance-card p strong { color: var(--orange); font-weight: 700; }

/* =========================
   NARRATIVE RESPONSIVE
   ========================= */
@media (max-width: 720px) {
  .aspect-list { grid-template-columns: 1fr; }
}

/* =========================
   FOOTER
   ========================= */
.foot {
  background: var(--orange-deep);
  color: var(--white);
  padding: 48px clamp(20px, 5vw, 48px) 32px;
}

.foot__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.foot__inner > div p { margin: 4px 0 0; opacity: 0.9; }
.foot a { color: var(--white); }
.foot small {
  grid-column: 1 / -1;
  display: block;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 12px;
  opacity: 0.85;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 960px) {
  .nav__toggle { display: inline-flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--orange-deep);
    padding: 8px 16px 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease;
  }

  .nav__menu.is-open { max-height: 420px; }

  .nav__menu a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    width: 100%;
  }

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

  .block__media { aspect-ratio: 16 / 11; }

  .hero__arrow { display: none; }

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

@media (max-width: 480px) {
  .nav__brand-text strong { font-size: 15px; }
  .nav__brand-text small { font-size: 8px; }
  .nav__logo { width: 56px; height: 30px; }
}

/* =========================
   404 page — preserved from previous version
   ========================= */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 40px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  text-align: center;
}

.page .eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
  font-weight: 600;
}

.page h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--orange);
}

.page .lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 28px;
}

.page .cta {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.page .cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.page .cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.error .illu { margin: 0 auto 8px; max-width: 320px; width: 70%; }
.error .illu svg { width: 100%; height: auto; display: block; }
