/* ==========================================================================
   localis — sitewide styles (v2 revamp)
   Palette (brand image/brand.md): Tinta #16293C · Marino profundo #0D1B29
   Papel #F8F6F1 · Latón #A2814A · Pizarra #4C5B6E
   Type (v2): Playfair Display (display) · Inter (body / labels)
   Motion: GSAP + ScrollTrigger + SplitText (see assets/site.js)
   ========================================================================== */

:root {
  --tinta: #16293C;
  --marino: #0D1B29;
  --papel: #F8F6F1;
  --laton: #A2814A;
  --pizarra: #4C5B6E;

  /* Contrast-safe derivatives */
  --laton-ink: #7C6134;      /* brass darkened for small text on Papel */
  --laton-bright: #B8945A;   /* brass lifted for small text on Marino */
  --papel-dim: #AEBBCA;      /* secondary text on dark grounds */
  --hairline: rgba(22, 41, 60, 0.16);
  --hairline-dark: rgba(248, 246, 241, 0.18);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", Arial, sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 144px;

  --container: 1140px;
  --radius: 6px;
  --nav-h: 96px;

  --z-nav: 100;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: inherit;
}

img, svg {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--laton);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-2);
  z-index: calc(var(--z-nav) + 1);
  padding: 10px 16px;
  background: var(--tinta);
  color: var(--papel);
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 200ms ease-out;
}

.skip-link:focus {
  top: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.measure {
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laton-ink);
  margin: 0 0 var(--space-2);
}

.on-dark .eyebrow {
  color: var(--laton-bright);
}

.rule {
  border: 0;
  border-top: 1px solid var(--laton);
  margin: 0;
}

.rule--short {
  width: 64px;
  margin: 0 auto var(--space-3);
  transform-origin: left center; /* GSAP draws it in with scaleX */
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  min-height: 52px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 200ms ease-out, color 200ms ease-out,
    border-color 200ms ease-out, transform 150ms ease-out,
    box-shadow 200ms ease-out;
}

.btn:active {
  transform: scale(0.97);
}

.btn .btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform 200ms ease-out;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--tinta);
  color: var(--papel);
}

.btn--primary:hover {
  background: var(--marino);
  box-shadow: 0 8px 24px rgba(13, 27, 41, 0.25);
}

.btn--on-dark {
  background: var(--papel);
  color: var(--tinta);
}

.btn--on-dark:hover {
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   Navigation — fixed, gains a solid ground once scrolled
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 250ms ease-out, box-shadow 250ms ease-out,
    height 250ms ease-out;
}

.nav.is-scrolled {
  background: rgba(248, 246, 241, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--laton);
  height: 76px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
}

.nav__logo img {
  height: 68px;
  width: auto;
  transition: height 250ms ease-out;
}

.nav.is-scrolled .nav__logo img {
  height: 50px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--tinta);
  padding: 10px 0;
}

.nav__links a:not(.btn):hover,
.nav__links a[aria-current="page"] {
  box-shadow: 0 1px 0 var(--laton);
}

.nav .btn {
  padding: 12px 26px;
  min-height: 46px;
}

/* --------------------------------------------------------------------------
   Hero — full-bleed illustrated landscape
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--papel);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -6% 0 0 0; /* headroom for parallax drift */
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center bottom;
  will-change: transform;
}

.hero__content {
  position: relative;
  text-align: center;
  padding: var(--space-7) var(--space-3) 22vh;
}

.hero__title {
  font-size: clamp(3.5rem, 11vw, 8rem);
  font-weight: 600;
  color: var(--tinta);
  margin: 0 0 var(--space-3);
}

/* SplitText mask lines */
.hero__title .split-line {
  overflow: hidden;
  padding-bottom: 0.08em; /* keep descenders inside the mask */
  margin-bottom: -0.08em;
}

.hero__cue {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--tinta);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px;
}

.hero__cue::after {
  content: "";
  width: 1px;
  height: 32px;
  background: var(--laton);
}

@media (max-width: 640px) {
  .hero__bg {
    object-position: 66% bottom; /* keep the brass sun in frame */
  }

  .hero__content {
    padding-bottom: 28vh;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--space-8) 0;
}

.section--dark {
  background: var(--marino);
  color: var(--papel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' x='0' y='0' fill='%23F8F6F1' fill-opacity='0.05'/%3E%3C/svg%3E");
}

.section--dark p {
  color: var(--papel-dim);
}

.section__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.section--center {
  text-align: center;
}

.section--center .measure {
  margin-left: auto;
  margin-right: auto;
}

/* Pinned, scroll-scrubbed value statement */
.statement {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.statement__kicker {
  font-size: 1.0625rem;
  color: var(--pizarra);
  margin: 0 0 var(--space-4);
}

.statement__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tinta);
  white-space: nowrap;
  margin: 0;
}

.statement__line {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  color: var(--pizarra);
  margin: var(--space-3) 0 0;
}

.statement .word {
  will-change: opacity;
}

@media (max-width: 768px) {
  .statement__text {
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   What we sell — RAG spotlight + numbered selling points
   -------------------------------------------------------------------------- */

.rag {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-5);
}

.rag__copy p {
  color: var(--pizarra);
  font-size: 1.125rem;
  max-width: 44ch;
}

.rag__demo {
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fffdf8;
  padding: var(--space-4);
  box-shadow: 0 24px 60px rgba(22, 41, 60, 0.08);
}

.rag__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--laton-ink);
  margin: 0 0 6px;
}

.rag__label + .rag__label,
.rag__q + .rag__label {
  margin-top: var(--space-3);
}

.rag__q {
  font-weight: 600;
  color: var(--tinta);
  margin: 0;
}

.rag__a {
  color: var(--tinta);
  margin: 0;
}

.rag__cites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--space-2) 0 0;
}

.rag__cites span {
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 4px 10px;
  color: var(--laton-ink);
}

.sell-points {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.sell-points li {
  display: grid;
  grid-template-columns: 64px minmax(200px, 300px) 1fr;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}

.sell-points__num {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--laton-ink);
  padding-top: 4px;
}

.sell-points h3 {
  font-size: 1.5rem;
  margin: 0;
}

.sell-points p {
  color: var(--pizarra);
  margin: 0;
  max-width: 56ch;
}

/* --------------------------------------------------------------------------
   Audience strip
   -------------------------------------------------------------------------- */

.audience {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.audience li {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--pizarra);
}

.audience li:not(:last-child)::after {
  content: "·";
  color: var(--laton);
  margin-left: var(--space-3);
}

/* --------------------------------------------------------------------------
   Page header (subpages)
   -------------------------------------------------------------------------- */

.page-header {
  padding: calc(var(--nav-h) + var(--space-7)) 0 var(--space-6);
}

.page-header h1 {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
}

.page-header h1.h1--compact {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
}

.page-header .measure {
  color: var(--pizarra);
  font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   Founders (about)
   -------------------------------------------------------------------------- */

.founders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.founder__photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background-color: #ece8df;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' x='0' y='0' fill='%2316293C' fill-opacity='0.08'/%3E%3Crect width='1' height='1' x='2' y='2' fill='%2316293C' fill-opacity='0.05'/%3E%3C/svg%3E");
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pizarra);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.founder h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-1);
}

.founder p {
  color: var(--pizarra);
  font-size: 0.9688rem;
}

/* --------------------------------------------------------------------------
   Packages (product)
   -------------------------------------------------------------------------- */

.packages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.package {
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--laton);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  transition: transform 250ms ease-out, box-shadow 250ms ease-out;
}

.package:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(22, 41, 60, 0.1);
}

.package--wide {
  grid-column: 1 / -1;
  border-top-color: var(--tinta);
}

.package__size {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laton-ink);
  margin: 0 0 var(--space-1);
}

.package h3 {
  font-size: 1.75rem;
  margin-bottom: var(--space-1);
}

.package__fit {
  color: var(--pizarra);
  font-size: 0.9688rem;
  flex: 1;
}

.package__meta {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) 0 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  color: var(--pizarra);
}

.package__meta div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 2px 0;
}

.package__meta dt {
  font-weight: 600;
}

.package__meta dd {
  margin: 0;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.contact-list {
  margin: 0;
}

.contact-list dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laton-ink);
  margin-top: var(--space-3);
}

.contact-list dt:first-child {
  margin-top: 0;
}

.contact-list dd {
  margin: 4px 0 0;
  font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   Legal pages
   -------------------------------------------------------------------------- */

.legal {
  padding-bottom: var(--space-7);
}

.legal h2 {
  font-size: 1.625rem;
  margin-top: var(--space-5);
}

.legal p,
.legal li {
  color: var(--pizarra);
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--laton);
  padding: var(--space-6) 0;
  font-size: 0.9375rem;
  color: var(--pizarra);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.footer__logo img {
  height: 30px;
  width: auto;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  text-decoration: none;
  padding: 8px 0;
}

.footer__links a:hover {
  box-shadow: 0 1px 0 var(--laton);
}

.footer__legal {
  width: 100%;
  margin: var(--space-2) 0 0;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Motion guards
   `html.js` is stamped by an inline snippet before first paint; site.js
   removes it again if GSAP fails to load, so content is never stranded.
   -------------------------------------------------------------------------- */

html.js .hero__title,
html.js .hero__cue {
  visibility: hidden; /* GSAP reveals with the intro timeline */
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .hero__title,
  html.js .hero__cue {
    visibility: visible;
  }

  .package,
  .btn,
  .nav,
  .nav__logo img {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .packages {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 76px;
  }

  .section {
    padding: var(--space-7) 0;
  }

  .founders,
  .contact-grid,
  .rag {
    grid-template-columns: 1fr;
  }

  .rag {
    gap: var(--space-4);
  }

  .sell-points li {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .sell-points__num {
    padding-top: 0;
  }

  .nav__links {
    gap: var(--space-2);
  }

  .nav__links .btn {
    display: none; /* CTA repeats in the page flow; keep nav links reachable */
  }

  .nav__logo img,
  .nav.is-scrolled .nav__logo img {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .packages {
    grid-template-columns: 1fr;
  }
}
