:root {
      --cream: #F5EFE0;
      --parchment: #EDE3CC;
      --espresso: #2A1A0E;
      --roast: #4A2C17;
      --caramel: #C07B3A;
      --honey: #D4943A;
      --miel: #E8B86D;
      --sage: #7A8C6E;
      --clay: #9B5E3C;
      --fog: #F9F5EE;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      background: var(--fog);
      color: var(--espresso);
      font-family: 'DM Sans', sans-serif;
      font-weight: 300;
      overflow-x: hidden;
    }

    /* ── NAV ── */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      display: flex; align-items: center; justify-content: space-between;
      padding: 1rem 3rem;
      background: rgba(245,239,224,0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(74,44,23,0.1);
      transition: all .3s;
    }
    .nav-logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.1rem;
      color: var(--roast);
      letter-spacing: 0.05em;
      text-decoration: none;
    }
    /* ── Nav logo alignment ── */
    .nav-logo {
      display: flex;
      align-items: center;
      gap: .6rem;
    }
    .nav-logo img {
      display: block;
      flex-shrink: 0;
    }

    /* ── Hero logo ── */
    .hero-logo {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      object-fit: contain;
      background: rgba(245,239,224,.07);
      border: 1px solid rgba(245,239,224,.15);
      padding: 1rem;
      margin-bottom: 1.5rem;
    }

    /* ── Lightbox overlay ── */
    #lightbox {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 999;
      background: rgba(0,0,0,.92);
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
    }
    #lightbox.active { display: flex; }
    #lightbox img {
      max-width: 92vw;
      max-height: 88vh;
      object-fit: contain;
      border-radius: .5rem;
      box-shadow: 0 24px 80px rgba(0,0,0,.6);
      cursor: default;
    }
    #lightbox-close {
      position: absolute;
      top: 1.25rem;
      right: 1.5rem;
      font-size: 2rem;
      color: rgba(245,239,224,.7);
      cursor: pointer;
      line-height: 1;
      background: none;
      border: none;
      transition: color .2s;
    }
    #lightbox-close:hover { color: #E8B86D; }
    #lightbox-caption {
      position: absolute;
      bottom: 1.5rem;
      left: 50%;
      transform: translateX(-50%);
      font-size: .8rem;
      letter-spacing: .08em;
      color: rgba(245,239,224,.55);
      white-space: nowrap;
    }

    /* ── Gallery items clickable ── */
    .gallery-item { cursor: zoom-in; }
    .nav-links { display: flex; gap: 2rem; list-style: none; }
    .nav-links a {
      font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
      color: var(--roast); text-decoration: none; opacity: .7;
      transition: opacity .2s;
    }
    .nav-links a:hover { opacity: 1; }

    /* ── HERO ── */
    .hero {
      min-height: 100vh;
      background: var(--espresso);
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      text-align: center;
      position: relative;
      overflow: hidden;
      padding: 6rem 2rem 4rem;
    }
    .hero::before {
      content: '';
      position: absolute; inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(192,123,58,.18) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(212,148,58,.12) 0%, transparent 60%);
    }
    .hero-badge {
      font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
      color: var(--miel); border: 1px solid rgba(212,148,58,.4);
      padding: .35rem 1.2rem; border-radius: 2rem;
      margin-bottom: 2rem;
      animation: fadeUp .8s ease both;
    }
    .hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(3.5rem, 9vw, 7rem);
      color: var(--cream);
      line-height: 1.05;
      letter-spacing: -.01em;
      animation: fadeUp .8s .15s ease both;
    }
    .hero-title em {
      font-style: italic;
      color: var(--honey);
    }
    .hero-sub {
      max-width: 560px;
      font-size: 1rem; line-height: 1.7;
      color: rgba(245,239,224,.55);
      margin-top: 1.5rem;
      animation: fadeUp .8s .3s ease both;
    }
    .hero-lot {
      margin-top: 3rem;
      display: flex; align-items: center; gap: 1.5rem;
      animation: fadeUp .8s .45s ease both;
    }
    .lot-tag {
      background: rgba(245,239,224,.06);
      border: 1px solid rgba(245,239,224,.15);
      padding: .6rem 1.4rem;
      border-radius: .4rem;
      font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
      color: var(--miel);
    }
    .lot-divider { width: 1px; height: 2rem; background: rgba(245,239,224,.2); }
    .lot-info { font-size: .8rem; color: rgba(245,239,224,.45); letter-spacing: .05em; }
    .hero-scroll {
      position: absolute; bottom: 2.5rem;
      display: flex; flex-direction: column; align-items: center; gap: .5rem;
      color: rgba(245,239,224,.3); font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
      animation: fadeUp .8s .6s ease both;
    }
    .scroll-line {
      width: 1px; height: 3rem;
      background: linear-gradient(to bottom, rgba(245,239,224,.3), transparent);
      animation: scrollPulse 2s infinite;
    }

    /* ── SECTIONS COMMON ── */
    section { padding: 6rem 0; }
    .container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
    .section-label {
      font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
      color: var(--caramel); margin-bottom: 1rem;
    }
    .section-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(2rem, 4vw, 3rem);
      line-height: 1.15;
      margin-bottom: 1.5rem;
    }
    .divider-line {
      width: 3rem; height: 2px;
      background: var(--honey);
      margin-bottom: 2rem;
    }

    /* ── VARIEDAD ── */
    #variedad {
      background: var(--roast);
    }
    #variedad .section-title { color: var(--cream); }
    #variedad .section-label { color: var(--miel); }
    #variedad p {
      color: rgba(245,239,224,.65);
      line-height: 1.8; font-size: .95rem;
      margin-bottom: 1.4rem;
    }
    .variedad-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
      margin-top: 3rem;
    }
    .cup-profile {
      background: rgba(245,239,224,.06);
      border: 1px solid rgba(245,239,224,.1);
      border-radius: .75rem;
      padding: 2rem;
    }
    .cup-profile h4 {
      font-family: 'Playfair Display', serif;
      color: var(--miel); font-size: 1.1rem;
      margin-bottom: 1.2rem;
    }
    .cup-attr {
      display: flex; flex-direction: column; gap: .8rem;
    }
    .cup-attr-item { display: flex; flex-direction: column; gap: .3rem; }
    .cup-attr-name { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(245,239,224,.4); }
    .cup-bar-track {
      height: 4px; background: rgba(245,239,224,.1); border-radius: 2px; overflow: hidden;
    }
    .cup-bar-fill {
      height: 100%; border-radius: 2px;
      background: linear-gradient(to right, var(--honey), var(--miel));
      transform-origin: left;
      animation: barGrow 1.2s cubic-bezier(.22,1,.36,1) both;
    }
    .cup-attr-value { font-size: .8rem; color: rgba(245,239,224,.55); }

    /* ── PROCESO ── */
    #proceso { background: var(--espresso); }
    #proceso .section-title { color: var(--cream); }
    #proceso .section-label { color: var(--miel); }
    #proceso p {
      color: rgba(245,239,224,.6);
      line-height: 1.8; font-size: .95rem;
      margin-bottom: 1.4rem;
    }
    .proceso-steps {
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem; margin-top: 3rem;
    }
    .step-card {
      background: rgba(245,239,224,.04);
      border: 1px solid rgba(245,239,224,.08);
      border-radius: .6rem;
      padding: 1.5rem 1.2rem;
      text-align: center;
      transition: border-color .3s, background .3s;
    }
    .step-card:hover {
      background: rgba(245,239,224,.08);
      border-color: rgba(212,148,58,.3);
    }
    .step-num {
      font-family: 'Playfair Display', serif;
      font-size: 2rem; color: rgba(212,148,58,.3);
      line-height: 1; margin-bottom: .75rem;
    }
    .step-name {
      font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
      color: var(--miel); margin-bottom: .5rem;
    }
    .step-desc { font-size: .8rem; color: rgba(245,239,224,.4); line-height: 1.6; }

    /* ── CARACTERÍSTICAS ── */
    #caracteristicas { background: var(--cream); }
    #caracteristicas .section-title { color: var(--espresso); }
    .chars-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem; margin-top: 3rem;
    }
    .char-card {
      background: white;
      border: 1px solid rgba(74,44,23,.08);
      border-radius: .75rem;
      padding: 1.8rem 1.4rem;
      text-align: center;
      transition: box-shadow .3s, transform .3s;
    }
    .char-card:hover {
      box-shadow: 0 12px 40px rgba(74,44,23,.1);
      transform: translateY(-3px);
    }
    .char-icon {
      font-size: 1.8rem; margin-bottom: .75rem;
    }
    .char-label {
      font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
      color: var(--caramel); margin-bottom: .4rem;
    }
    .char-value {
      font-family: 'Playfair Display', serif;
      font-size: 1.05rem; color: var(--espresso);
      line-height: 1.3;
    }
    .char-sub { font-size: .8rem; color: rgba(74,44,23,.45); margin-top: .2rem; }

    /* ── VARIABLES AMBIENTALES ── */
    #tendencias { background: var(--fog); }
    #tendencias .section-title { color: var(--espresso); }
    .charts-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem;
    }
    .chart-card {
      background: white;
      border: 1px solid rgba(74,44,23,.07);
      border-radius: .75rem;
      padding: 1.5rem;
      box-shadow: 0 4px 20px rgba(74,44,23,.05);
    }
    .chart-title {
      font-family: 'Playfair Display', serif;
      font-size: 1rem; color: var(--roast);
      margin-bottom: 1rem;
    }
    .chart-canvas { width: 100%; height: 200px; }

    /* ── FOTOS ── */
    #portfolio { background: var(--espresso); padding: 6rem 0; }
    #portfolio .section-title { color: var(--cream); }
    #portfolio .section-label { color: var(--miel); }
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1rem; margin-top: 3rem;
    }
    .gallery-item {
      aspect-ratio: 4/3;
      background: rgba(245,239,224,.06);
      border: 1px dashed rgba(245,239,224,.15);
      border-radius: .5rem;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: .5rem;
      overflow: hidden;
      position: relative;
    }
    .gallery-item img {
      width: 100%; height: 100%; object-fit: cover;
      transition: transform .5s ease;
    }
    .gallery-item:hover img { transform: scale(1.05); }
    .gallery-caption {
      position: absolute; bottom: 0; left: 0; right: 0;
      padding: .75rem 1rem;
      background: linear-gradient(to top, rgba(42,26,14,.8), transparent);
      font-size: .75rem; color: rgba(245,239,224,.85);
      transform: translateY(100%);
      transition: transform .3s ease;
    }
    .gallery-item:hover .gallery-caption { transform: translateY(0); }
    .gallery-placeholder {
      font-size: 2rem; opacity: .2;
    }
    .gallery-placeholder-text {
      font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
      color: rgba(245,239,224,.2);
    }

    /* ── CONTACTO ── */
    #contact {
      background: var(--roast);
      padding: 5rem 0;
      text-align: center;
    }
    #contact .section-title { color: var(--cream); }
    #contact p { color: rgba(245,239,224,.55); font-size: .95rem; margin-bottom: 2.5rem; }
    .contact-cards {
      display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
    }
    .contact-card {
      display: flex; flex-direction: column; align-items: center; gap: .75rem;
    }
    .contact-icon { font-size: 1.8rem; }
    .contact-label {
      font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
      color: var(--miel);
    }
    .contact-value {
      color: rgba(245,239,224,.7); font-size: .9rem; text-decoration: none;
      transition: color .2s;
    }
    .contact-value:hover { color: var(--miel); }

    /* ── FOOTER ── */
    footer {
      background: var(--espresso);
      padding: 2rem;
      text-align: center;
      font-size: .75rem; color: rgba(245,239,224,.25);
      letter-spacing: .05em;
    }

    /* ── ANIMATIONS ── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes scrollPulse {
      0%,100% { opacity: .3; } 50% { opacity: .8; }
    }
    @keyframes barGrow {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }

    /* ── RESPONSIVE ── */
    @media (max-width: 768px) {
      nav { padding: 1rem 1.5rem; }
      .nav-links { display: none; }
      .variedad-grid, .proceso-steps, .chars-grid, .charts-grid { grid-template-columns: 1fr; }
      .gallery-grid { grid-template-columns: 1fr 1fr; }
    }