/* ==========================================================================
   Astelora — corporate site
   Design system: "Obsidian Observatory" (see docs/astelora-brand-design-system.md)
   Warm-light body · graphite dark moments · sage primary · fine gold accents.
   Self-hosted fonts → zero third-party requests.
   ========================================================================== */

/* ---- Fonts (self-hosted, latin, variable) ------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --bg: #f7f1e7;            /* hueso */
  --surface: #fffaf1;
  --surface-muted: #ece1d0; /* parchment */
  --dark: #11100e;          /* ink */
  --dark-2: #1b1a17;        /* graphite */
  --dark-3: #0f1a17;        /* abeto (deep green-black) */
  --text: #11100e;
  --text-muted: #655f55;
  --text-on-dark: #f3ecdf;
  --text-on-dark-muted: #b9b0a0;
  --line: #c9bfae;          /* stone */
  --line-soft: #e4dac8;
  --primary: #4b6b58;       /* sage */
  --primary-hover: #36513f;
  --accent: #b78a42;        /* oro viejo */
  --accent-soft: #d8b876;
  --sky: #a9b8b7;

  --maxw: 1140px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(17, 16, 14, 0.04);
  --shadow-md: 0 18px 40px -24px rgba(17, 16, 14, 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary-hover); text-decoration-color: rgba(75, 107, 88, 0.3); text-underline-offset: 3px; }
a:hover { color: var(--primary); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; color: var(--dark); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 16px; color: #fff; }

/* ---- Layout helpers ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: clamp(56px, 9vw, 104px); }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--text-muted); max-width: 60ch; }
.measure { max-width: 64ch; }
.center { text-align: center; margin-inline: auto; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.btn--primary { background: var(--primary); color: #fbf7ef; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--dark); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-muted); color: var(--dark); }
.btn--on-dark { background: transparent; color: var(--text-on-dark); border-color: rgba(216, 184, 118, 0.45); }
.btn--on-dark:hover { background: rgba(216, 184, 118, 0.12); color: #fff; }
.btn:active { transform: translateY(1px); }

/* ---- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 231, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--dark);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--dark); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.nav-links a:hover { color: var(--primary-hover); border-bottom-color: var(--accent); }
.nav-cta { margin-left: 4px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--dark); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line-soft); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: none; }
  .nav-cta { margin: 14px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(75, 107, 88, 0.10), transparent 60%),
    radial-gradient(80% 70% at 0% 110%, rgba(183, 138, 66, 0.08), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 10vw, 128px);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--primary-hover); }
.hero .lead { margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 110% at 70% 20%, #243a31 0%, #14201b 55%, #0f1a17 100%);
  border: 1px solid rgba(216, 184, 118, 0.22);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  padding: 12%;
}
.hero__art svg { width: 100%; height: auto; }
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 320px; margin-inline: auto; }
}

/* ---- Trust strip -------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--line-soft);
  background: var(--surface);
}
.strip__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  align-items: center;
  justify-content: center;
  padding-block: 22px;
  list-style: none;
  margin: 0;
  padding-inline: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}
.strip__row li { display: inline-flex; align-items: center; gap: 9px; }
.strip__row svg { width: 17px; height: 17px; stroke: var(--primary); stroke-width: 1.7; flex: none; }

/* ---- Section heading ---------------------------------------------------- */
.sec-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.sec-head.center { margin-inline: auto; }

/* ---- Cards / grid ------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.card:hover { border-color: var(--accent-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(75, 107, 88, 0.09);
  border: 1px solid rgba(75, 107, 88, 0.18);
  margin-bottom: 18px;
}
.card__icon svg { width: 21px; height: 21px; stroke: var(--primary); stroke-width: 1.8; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; font-size: 15.5px; }

/* ---- Approach / values (dark band) -------------------------------------- */
.band-dark {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(75, 107, 88, 0.18), transparent 55%),
    var(--dark-3);
  color: var(--text-on-dark);
}
.band-dark h2, .band-dark h3 { color: #f6efe2; }
.band-dark .eyebrow { color: var(--accent-soft); }
.band-dark .lead { color: var(--text-on-dark-muted); }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(216,184,118,0.16); border: 1px solid rgba(216,184,118,0.16); border-radius: var(--radius-md); overflow: hidden; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }
.value { background: var(--dark-3); padding: 28px 26px; }
.value h3 { font-size: 19px; margin-bottom: 6px; }
.value p { color: var(--text-on-dark-muted); font-size: 15px; margin: 0; }
.value .num { font-family: var(--serif); color: var(--accent-soft); font-size: 14px; display: block; margin-bottom: 12px; }

/* ---- About / split ------------------------------------------------------ */
.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.about-figure {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface-muted), var(--surface));
  padding: 40px;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
}
.about-figure svg { width: min(220px, 60%); height: auto; }
.stat-row { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 26px; }
.stat .n { font-family: var(--serif); font-size: 30px; color: var(--dark); line-height: 1; }
.stat .l { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }

/* ---- Responsibility note ------------------------------------------------ */
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 26px 28px;
}
.note h3 { font-size: 20px; }
.note p { color: var(--text-muted); margin-bottom: 0; font-size: 15.5px; }

/* ---- Contact / CTA ------------------------------------------------------ */
.cta {
  background:
    radial-gradient(100% 130% at 0% 0%, rgba(183,138,66,0.16), transparent 55%),
    var(--dark-2);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
}
.cta h2 { color: #f6efe2; font-size: clamp(26px, 3.4vw, 38px); }
.cta p { color: var(--text-on-dark-muted); max-width: 52ch; margin-inline: auto; }
.cta__mail {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px);
  color: var(--accent-soft); text-decoration: none;
  border-bottom: 1px solid rgba(216,184,118,0.4);
  padding-bottom: 4px;
}
.cta__mail:hover { color: #fff; border-bottom-color: #fff; }
.cta__meta { margin-top: 20px; font-size: 14px; color: var(--text-on-dark-muted); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--dark-3);
  color: var(--text-on-dark-muted);
  padding-block: 56px 32px;
  font-size: 14.5px;
}
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand .brand { color: #f3ecdf; }
.footer-brand .brand .mark g[fill] { fill: var(--accent-soft); }
.footer-brand p { margin-top: 14px; max-width: 36ch; color: var(--text-on-dark-muted); }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-soft); margin: 4px 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-on-dark-muted); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(216,184,118,0.16);
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--text-on-dark-muted);
}
.footer-bottom a { color: var(--text-on-dark-muted); }

/* ---- Legal / document pages -------------------------------------------- */
.doc { background: var(--bg); }
.doc__head { border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.doc__head .container { padding-block: clamp(40px, 6vw, 64px); }
.doc__head h1 { font-size: clamp(32px, 4.5vw, 46px); margin-bottom: 10px; }
.doc__head .updated { color: var(--text-muted); font-size: 14px; }
.doc__body { max-width: 760px; margin-inline: auto; padding-block: clamp(40px, 6vw, 64px); }
.doc__body h2 { font-size: 23px; margin-top: 44px; }
.doc__body h2:first-of-type { margin-top: 0; }
.doc__body h3 { font-size: 18px; font-family: var(--sans); font-weight: 600; margin-top: 28px; }
.doc__body p, .doc__body li { color: #36322b; }
.doc__body ul, .doc__body ol { padding-left: 22px; }
.doc__body li { margin-bottom: 8px; }
.doc__body a { color: var(--primary-hover); }
.doc__toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.doc__toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--sans); color: var(--text-muted); margin: 0 0 12px; }
.doc__toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.doc__toc li { margin-bottom: 8px; break-inside: avoid; }
@media (max-width: 560px) { .doc__toc ul { columns: 1; } }

/* ---- 404 ---------------------------------------------------------------- */
.err { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.err h1 { font-size: clamp(48px, 9vw, 96px); margin-bottom: 6px; }
.err p { color: var(--text-muted); }

/* ---- Utilities ---------------------------------------------------------- */
.hr-orbit {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  margin-block: clamp(40px, 6vw, 72px);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mx-auto { margin-inline: auto; }
.mt-24 { margin-top: 24px; }
.footer-bottom--bare { border-top: 0; margin-top: 0; }
