/* ============================================================
   C5X TECH — Site Institucional
   Light theme w/ dark section bands (ref-aligned UX).
   Warm off-white base, dark #262626 bands, orange accent.
   Type: Geist + Geist Mono. Uppercase, bold headings.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500&family=Sora:wght@300;400;500;600;700;800&display=swap');

/* ----- Tokens (LIGHT — default) ----- */
:root {
  /* surfaces */
  --bg: #f1eeec;            /* page base (warm light gray) */
  --bg-warm: #fbf7f4;       /* warm white band */
  --bg-low: #fff1ea;        /* warm peach band */
  --surface: #ffffff;       /* cards */
  --surface-2: #fbf5f1;

  /* hairlines / borders */
  --line: rgba(36, 25, 20, 0.14);
  --line-soft: rgba(36, 25, 20, 0.08);
  --line-strong: rgba(36, 25, 20, 0.28);

  /* text */
  --ink: #241914;           /* warm near-black */
  --ink-dim: #5d4b41;       /* warm taupe body */
  --ink-faint: #8b7267;     /* warm muted */

  /* heading fill (solid in light theme; kept as var for compatibility) */
  --silver: var(--ink);

  /* accent (orange) */
  --accent: #d9631e;
  --accent-2: #b55118;
  --accent-ink: #ffffff;
  --accent-glow: rgba(217, 99, 30, 0.26);
  --accent-tint: rgba(217, 99, 30, 0.10);

  /* type families */
  --font-display: 'Geist', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --motion: 1;

  /* layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(64px, 8vw, 104px);
  --radius: 2px;
}

/* ----- Dark band scope ----- */
.theme-dark {
  --bg-warm: #262626;
  --bg-low: #1f1f1f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.26);
  --ink: #f5f3f1;
  --ink-dim: #a7a09b;
  --ink-faint: #726b66;
  --silver: var(--ink);
}

/* heading font swap (tweakable) */
:root[data-headfont="sora"] { --font-display: 'Sora', system-ui, sans-serif; }
:root[data-headfont="geist"] { --font-display: 'Geist', system-ui, sans-serif; }

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--accent); color: #fff; }

/* ----- Layout helpers ----- */
.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.section--warm { background: var(--bg-warm); }
.section--low { background: var(--bg-low); }
.section--dark { background: #262626; }

/* ----- Typography ----- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow--plain::before { display: none; }
.eyebrow--muted { color: var(--ink-faint); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  color: var(--ink);
  text-wrap: balance;
}

h2.title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  color: var(--ink);
  text-wrap: balance;
}

.hl { color: var(--accent); }

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--ink);
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-dim);
  font-weight: 400;
  letter-spacing: -0.005em;
  max-width: 58ch;
  text-wrap: pretty;
}

p { color: var(--ink-dim); text-wrap: pretty; }
strong { color: var(--ink); font-weight: 600; }

/* ----- Buttons (squared, uppercase, bold) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1.05em 1.7em;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-2);
  box-shadow: 0 10px 30px -10px var(--accent-glow);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
/* ghost on dark / image: force light outline */
.theme-dark .btn--ghost, .hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.55); }
.theme-dark .btn--ghost:hover, .hero .btn--ghost:hover { background: #fff; color: #262626; border-color: #fff; }

/* ----- Hairline frame / cards ----- */
.frame {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  position: relative;
}

/* corner ticks */
.ticked { position: relative; }
.ticked::before, .ticked::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  border-color: var(--accent); border-style: solid; opacity: 0.9;
}
.ticked::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.ticked::after  { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }

/* ----- Image placeholder + grayscale media ----- */
.ph {
  position: relative;
  background-color: var(--surface-2);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(36,25,20,0.035) 0px,
      rgba(36,25,20,0.035) 1px,
      transparent 1px,
      transparent 9px);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: flex; align-items: flex-end;
  color: var(--ink-faint);
}
.theme-dark .ph, .hero .ph {
  background-color: #1c1c1c;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.025) 0px,
      rgba(255,255,255,0.025) 1px,
      transparent 1px,
      transparent 9px);
}
.ph::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  color: var(--ink-faint);
}
.ph--cover { aspect-ratio: auto; height: 100%; }

/* grayscale->color media wrapper (ready for real photos) */
.media { overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.7s var(--ease), transform 0.7s var(--ease); }
.media:hover img { filter: grayscale(0); transform: scale(1.04); }
/* placeholder hover analogue: warm reveal */
.media .ph { transition: filter 0.6s var(--ease); filter: grayscale(0.4); }
.media:hover .ph { filter: grayscale(0); }

/* ----- Scroll reveal ----- */
.anim [data-reveal] {
  opacity: 0;
  transform: translateY(calc(22px * var(--motion)));
  transition:
    opacity calc(0.85s * var(--motion) + 0.001s) var(--ease),
    transform calc(0.85s * var(--motion) + 0.001s) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.anim [data-reveal].in { opacity: 1; transform: none; }
