/* ============================================================
   CANNANDES — Investor / B2B brand site
   Design language: deep Andean night + single INTI-gold accent.
   The green lives in the photography, never in the UI chrome.
   ============================================================ */

/* ---- Fonts: Clash Display (display) + Switzer (body), served via Fontshare ---- */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@600,700,500&f[]=switzer@400,500,600&display=swap');

/* ---------------------------------------------------------- */
/* Design tokens                                              */
/* ---------------------------------------------------------- */
:root {
  /* Surface — Andean night */
  --bg:          oklch(0.15 0.012 250);
  --surface:     oklch(0.19 0.014 250);
  --surface-2:   oklch(0.23 0.016 250);
  --line:        oklch(0.30 0.018 250);

  /* Ink */
  --ink:         oklch(0.96 0.006 90);
  --ink-body:    oklch(0.88 0.008 250);
  --ink-muted:   oklch(0.72 0.013 250);

  /* Brand accent — official Cannandes green (#51B848) */
  --sun:         #51b848;
  --sun-bright:  #63c95a;
  --sun-deep:    #2f7a2a;
  --on-sun:      #0c160c;

  /* Type */
  --font-display: 'Clash Display', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Switzer', ui-sans-serif, system-ui, sans-serif;

  /* Fluid type scale (ratio ~1.28) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.28rem, 1.18rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.64rem, 1.45rem + 0.95vw, 2.4rem);
  --step-3:  clamp(2.1rem, 1.7rem + 2vw, 3.4rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.8rem);
  --step-5:  clamp(3.1rem, 2.1rem + 5vw, 5.8rem);

  /* Space */
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 2.5rem);
  --section-y: clamp(5rem, 3.5rem + 7vw, 9rem);
  --maxw: 1240px;

  /* Radius — single soft scale */
  --r: 14px;
  --r-sm: 9px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* Layering */
  --z-nav: 100;
  --z-overlay: 200;

  color-scheme: dark;
}

/* ---------------------------------------------------------- */
/* Reset & base                                               */
/* ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

::selection { background: var(--sun); color: var(--on-sun); }

:focus-visible {
  outline: 2px solid var(--sun-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--sun); color: var(--on-sun);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; z-index: var(--z-overlay);
  transition: top 180ms var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------- */
/* Layout helpers                                             */
/* ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sun);
}
.eyebrow::before {
  content: ""; width: 1.6em; height: 1px; background: var(--sun); opacity: 0.6;
}

.lede { font-size: var(--step-1); color: var(--ink); line-height: 1.45; max-width: 24ch; }
.prose { color: var(--ink-muted); max-width: 60ch; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------- */
/* Buttons                                                    */
/* ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.9em 1.5em;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--step-0);
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn--sun { background: var(--sun); color: var(--on-sun); box-shadow: 0 10px 30px -12px var(--sun-deep); }
@media (hover: hover) and (pointer: fine) {
  .btn--sun:hover { background: var(--sun-bright); transform: translateY(-1px); }
  .btn--ghost:hover { border-color: var(--sun); color: var(--ink); }
}
.btn--ghost { border: 1px solid var(--line); color: var(--ink-body); }
.btn--lg { padding: 1.05em 1.9em; }

.btn .arr { transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .arr { transform: translateX(3px); } }

/* ---------------------------------------------------------- */
/* Navigation                                                 */
/* ---------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  height: 68px;
  display: flex; align-items: center;
  transition: background-color 300ms ease, backdrop-filter 300ms ease, border-color 300ms ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 0.6em; }
.brand-mark { height: 30px; width: auto; flex: none; display: block; }
.brand-word { height: 16px; width: auto; display: block; }
@media (hover: hover) { .brand:hover .brand-mark { transform: translateY(-1px); transition: transform 200ms var(--ease-out); } }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 0.5rem + 1.4vw, 2.2rem); list-style: none; }
.nav-links a { font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.01em; transition: color 180ms ease; }
@media (hover: hover) { .nav-links a:hover { color: var(--ink); } }
.nav-cta { display: inline-flex; }

@media (max-width: 860px) {
  .nav-links .nav-link { display: none; }
}

/* ---------------------------------------------------------- */
/* Hero                                                       */
/* ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding-top: 68px;
  overflow: clip;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 68% 38%, transparent 0%, color-mix(in oklab, var(--bg) 30%, transparent) 55%, var(--bg) 100%),
    linear-gradient(to top, var(--bg) 4%, transparent 42%),
    linear-gradient(to right, color-mix(in oklab, var(--bg) 72%, transparent), transparent 60%);
}
.hero__inner { padding-bottom: clamp(3rem, 1.5rem + 6vw, 6.5rem); max-width: 60rem; }
.hero h1 {
  font-size: var(--step-5);
  font-weight: 600;
  margin-block: 0.5rem 1.4rem;
}
.hero h1 .sun-word { color: var(--sun); font-style: italic; font-weight: 500; padding-bottom: 0.06em; }
.hero__sub { font-size: var(--step-1); color: var(--ink); max-width: 40ch; line-height: 1.42; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.scrollhint { position: absolute; right: var(--gutter); bottom: 1.6rem; z-index: 1;
  font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.14em; text-transform: uppercase;
  writing-mode: vertical-rl; display: flex; align-items: center; gap: 0.8em; }
.scrollhint::after { content: ""; width: 1px; height: 46px; background: linear-gradient(var(--sun), transparent); }
@media (max-width: 700px) { .scrollhint { display: none; } }

/* ---------------------------------------------------------- */
/* The moat — why the Andes                                   */
/* ---------------------------------------------------------- */
.moat__head { display: grid; gap: 1.4rem; max-width: 52rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.moat__head h2 { font-size: var(--step-4); }

.pillars { display: grid; }
.pillar {
  display: grid;
  grid-template-columns: minmax(0,0.7fr) minmax(0,1.3fr);
  gap: clamp(1rem, 0.5rem + 3vw, 4rem);
  align-items: baseline;
  padding-block: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  border-top: 1px solid var(--line);
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar__idx {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-1); color: var(--sun);
  display: flex; align-items: baseline; gap: 0.7rem;
}
.pillar__idx span { font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.1em; }
.pillar h3 { font-size: var(--step-2); margin-bottom: 0.7rem; }
.pillar p { color: var(--ink-muted); max-width: 54ch; }
@media (max-width: 720px) {
  .pillar { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* ---------------------------------------------------------- */
/* Opportunity — figures band                                 */
/* ---------------------------------------------------------- */
.opportunity { position: relative; background: var(--surface); overflow: clip; }
.opportunity::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(80% 120% at 100% 0%, color-mix(in oklab, var(--sun) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.opportunity .wrap { position: relative; z-index: 1; }
.opportunity__grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(2rem,1rem+4vw,5rem); align-items: center; }
.opportunity__copy h2 { font-size: var(--step-3); margin-block: 1rem 1.2rem; }
.figures { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.figure { background: var(--surface-2); padding: clamp(1.4rem,1rem+1.5vw,2.2rem); }
.figure__num { font-family: var(--font-display); font-weight: 600; font-size: var(--step-4); line-height: 1; color: var(--ink); letter-spacing: -0.03em; }
.figure__num .unit { color: var(--sun); }
.figure__label { margin-top: 0.5rem; color: var(--ink-muted); font-size: var(--step--1); letter-spacing: 0.04em; }
@media (max-width: 820px) { .opportunity__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- */
/* The Cannandes Way — method (image + steps)                 */
/* ---------------------------------------------------------- */
.method__grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1.6rem,1rem+3vw,4rem); align-items: center; }
.method__media { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/5; }
.method__media img { width: 100%; height: 100%; object-fit: cover; }
.method__media::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 8%, transparent); border-radius: inherit; }
.method__head h2 { font-size: var(--step-3); margin-block: 1rem 2rem; }
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding-block: 1.15rem; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; }
.step__k { font-family: var(--font-display); font-weight:600; color: var(--sun); font-size: var(--step-0); min-width: 1.5ch; }
.step h3 { font-size: var(--step-1); margin-bottom: 0.25rem; letter-spacing: -0.01em; }
.step p { color: var(--ink-muted); font-size: var(--step-0); max-width: 48ch; }
@media (max-width: 860px) { .method__grid { grid-template-columns: 1fr; } .method__media { aspect-ratio: 16/11; order: -1; } }

/* ---------------------------------------------------------- */
/* Product — plant feature                                    */
/* ---------------------------------------------------------- */
.product { position: relative; overflow: clip; }
.product__grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,0.9fr); gap: clamp(1.6rem,1rem+3vw,4.5rem); align-items: center; }
.product__media { border-radius: var(--r); overflow: hidden; aspect-ratio: 1/1; }
.product__media img { width:100%; height:100%; object-fit: cover; }
.product h2 { font-size: var(--step-3); margin-block: 1rem 1.2rem; }
@media (max-width: 820px) { .product__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- */
/* CTA / mission                                              */
/* ---------------------------------------------------------- */
.mission { position: relative; text-align: center; }
.mission .wrap { max-width: 56rem; }
.mission h2 { font-size: var(--step-4); margin-block: 1.2rem 1.4rem; }
.mission p { color: var(--ink-muted); font-size: var(--step-1); margin-inline: auto; max-width: 50ch; }
.mission__tags { display:flex; flex-wrap:wrap; gap: 0.6rem; justify-content:center; margin-top: 1.8rem; }
.tag { border:1px solid var(--line); color: var(--ink-muted); border-radius: var(--r-pill); padding: 0.45em 1em; font-size: var(--step--1); }
.tag b { color: var(--sun); font-weight: 600; }
.mission__cta { margin-top: 2.4rem; display:flex; justify-content:center; gap: 0.9rem; flex-wrap: wrap; }

/* ---------------------------------------------------------- */
/* Footer                                                     */
/* ---------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: clamp(3rem,2rem+3vw,4.5rem) 2.5rem; }
.footer__grid { display:flex; flex-wrap:wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer .brand-mark { height: 34px; } .footer .brand-word { height: 18px; }
.footer__addr { color: var(--ink-muted); font-size: var(--step--1); margin-top: 1rem; max-width: 30ch; line-height: 1.7; }
.socials { display:flex; gap: 0.7rem; }
.socials a {
  width: 42px; height: 42px; border:1px solid var(--line); border-radius: var(--r-pill);
  display:grid; place-items:center; color: var(--ink-muted);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out);
}
@media (hover:hover){ .socials a:hover { color: var(--sun); border-color: var(--sun); transform: translateY(-2px);} }
.socials svg { width: 18px; height: 18px; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display:flex; flex-wrap:wrap; gap: 0.6rem 1.4rem; justify-content: space-between; color: var(--ink-muted); font-size: var(--step--1); }

/* ---------------------------------------------------------- */
/* Motion — reveal on scroll                                  */
/* Hidden states are scoped under `.js` so that crawlers and  */
/* no-script renders always see fully visible content.        */
/* ---------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out); }
.js [data-reveal].in-view { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 70ms; }
.js [data-reveal-delay="2"] { transition-delay: 140ms; }
.js [data-reveal-delay="3"] { transition-delay: 210ms; }
.js [data-reveal-delay="4"] { transition-delay: 280ms; }

/* Hero load choreography */
.js .hero__inner > * { opacity: 0; transform: translateY(26px); }
.js body.is-loaded .hero__inner > *,
body.is-loaded .hero__inner > * { opacity: 1; transform: none; transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
body.is-loaded .hero__inner > *:nth-child(1) { transition-delay: 120ms; }
body.is-loaded .hero__inner > *:nth-child(2) { transition-delay: 240ms; }
body.is-loaded .hero__inner > *:nth-child(3) { transition-delay: 360ms; }
body.is-loaded .hero__inner > *:nth-child(4) { transition-delay: 480ms; }
.js .hero__media img { transform: scale(1.08); transition: transform 1600ms var(--ease-out); }
body.is-loaded .hero__media img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .hero__inner > *, .hero__media img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .arr, .socials a { transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
}
