/* ==========================================================================
   Arkh Solutions — landing
   Los tokens, la tipografía y los componentes vienen del manual de marca:
   arkh-tokens.css y arkh-components.css, que cargan antes de este archivo.
   Aquí solo queda lo que el manual todavía no cubre, hasta que el marcado pase
   a las clases ak-*.
   ========================================================================== */

:root {
  /* Tamaños de la escala del manual (12·13·15·17·20·26·34·44·56 px). El manual los
     expone como clases (.display, .h1…, .lead, .body); estos alias existen solo
     mientras el marcado sigue usando clases propias. */
  --fs-caption: 13px;
  --fs-body-sm: 15px;
  --fs-body: 17px;
  --fs-lead: 20px;
  --fs-h3: 26px;
  --fs-h2: 34px;
  --fs-h1: 44px;
  --fs-display: 56px;

  /* Aire de sección: space-9 en escritorio, space-8 en móvil (regla del manual). */
  --section-pad: var(--space-9);
  --header-height: 88px;
  --hairline: var(--stroke-hairline) solid var(--line);
}

/* Controles nativos (radios, selector de fecha, barras de scroll) siguiendo el tema.
   No está en el manual porque no habla de ellos; sin esto, en oscuro se ven claros. */
:root { color-scheme: light dark; }
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* .ak-base pone margin:0 en p y h1–h4 con (0,1,1); estas reglas propias necesitan
   ese .ak-base delante para ganar por especificidad, sin !important. */

/* ---------- Base ---------- */
/* El fondo, el color, la familia, el tamaño, el interlineado, los márgenes de
   títulos y párrafos y el anillo de foco los pone .ak-base en el <body>. */

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  text-rendering: optimizeLegibility;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

main:focus { outline: none; }

/* Enlaces de interfaz: heredan color y no se subrayan. Los enlaces en prosa
   (.prose, .legal) se quedan berenjena y subrayados, como exige el manual para
   distinguirlos dentro de texto taupe. */
a.site-brand,
.site-nav__links a,
.site-footer a,
.lost-links a,
.card a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

a.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--ink-inverse);
  border-radius: var(--radius-md);
  font-size: var(--fs-body-sm);
  transform: translateY(-200%);
}
a.skip-link:focus { transform: none; }

/* ---------- Type ---------- */

.display,
.heading-lg,
.heading,
.heading-sm,

.display    { font-size: var(--fs-display);    line-height: 1.1;  letter-spacing: -0.025em; }
.heading-lg { font-size: var(--fs-h1); line-height: 1.2;  letter-spacing: -0.02em; }
.heading    { font-size: var(--fs-h2);    line-height: 1.25; letter-spacing: -0.015em; }
.heading-sm { font-size: var(--fs-h3); line-height: 1.3;  letter-spacing: -0.01em; }

.eyebrow {
  font-size: var(--fs-caption);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead,
.prose--lg { font-size: var(--fs-lead); line-height: 1.5; }

.prose { max-width: 65ch; }
.prose + .prose { margin-top: var(--space-4); }

.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover { color: var(--accent-hover); }

.hairline {
  height: 0;
  margin: 0 auto;
  border: 0;
  border-top: var(--hairline);
  max-width: calc(var(--container));
  width: calc(100% - 2 * var(--gutter));
}

/* Los botones son del manual: ak-btn + variante. Aquí no hay nada propio. */

.icon-wa { flex-shrink: 0; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Logotipo: siempre el SVG del kit (archivolta-horizontal), nunca texto con la fuente.
   Mínimo 140 px de ancho; a 160 px el isotipo mide 29 px, así que el área de respeto
   (X = la mitad de ese ancho, 15 px) la cubre la altura del header. */
a.site-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.site-brand img { width: 160px; height: 52px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.site-nav__links li { display: flex; }

/* Every nav link is a flex box of the same height, so text-only links and the icon link
   (WhatsApp) share one center line with the logo and the CTA. */
.site-nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body-sm);
  line-height: 1.4;
  font-weight: 500;
  text-decoration: none;
  padding-block: var(--space-2);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.site-nav__wa .icon-wa { width: 16px; height: 16px; }

.site-nav__links a:hover,
.site-nav__links a[aria-current="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* The nav CTA steps aside while another filled CTA is on screen (one filled button per view). */
.site-nav__cta { transition: opacity 200ms ease, visibility 200ms ease, background-color 160ms ease; }
.site-header.cta-hidden .site-nav__cta { opacity: 0; visibility: hidden; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding-block: var(--space-8) var(--section-pad); }
.hero > .ak-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: var(--space-8);
  min-height: calc(88vh - var(--header-height));
}

.ak-base .hero__text > * + * { margin-top: var(--space-6); }
.hero__text .eyebrow + .display { margin-top: var(--space-4); }
.hero .display { max-width: 16ch; }
.hero .lead { max-width: 56ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__arch {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.hero__arch path:first-child { stroke: var(--accent); }

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


.ak-base .ak-section__head > * + * { margin-top: var(--space-4); }
.ak-section__head--wide { max-width: var(--container-narrow); margin-bottom: var(--space-8); }

.split__body { padding-top: 28px; }


.highlights { margin-top: var(--space-8); }

/* Services */



.service__index {
  display: block;
  margin-bottom: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  color: var(--accent);
}
.ak-base .service__title { margin-bottom: var(--space-4); }

.service__list {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--hairline);
}
.service__list li {
  position: relative;
  padding-left: 20px;
}
.service__list li + li { margin-top: var(--space-1); }
.service__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  border-top: 1px solid var(--accent);
}

.section-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: var(--hairline);
}
.section-footnote p { font-size: var(--fs-lead); line-height: 1.5; }

/* Portfolio */


/* La tarjeta entera es el enlace: la capa invisible cubre la tarjeta del manual. */
.card--link { position: relative; }
.card--link:hover { border-color: var(--accent); }
.card--link .ak-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }

.card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.card__media--placeholder {
  display: grid;
  place-items: center;
  border: var(--hairline);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--ink-muted);
  letter-spacing: -0.01em;
}

.card__body { display: flex; flex-direction: column; flex: 1; margin-top: var(--space-4); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
}

/* Contact */

.contact > .ak-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ak-base .contact > .ak-container > * + * { margin-top: var(--space-4); }
.contact .heading-lg { max-width: 18ch; }
.contact .prose { margin-inline: auto; }
.contact .contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.contact__alt { font-size: var(--fs-body); }

/* Contact form (outline submit: the section already has its one filled button) */

.contact__divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 640px;
  margin: var(--space-8) auto 0;
  font-size: var(--fs-body-sm);
  letter-spacing: 0.02em;
}
.contact__divider::before,
.contact__divider::after { content: ""; flex: 1; border-top: var(--hairline); }

.contact__sent {
  max-width: 640px;
  margin-inline: auto;
  padding: var(--space-5);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  font-size: var(--fs-lead);
}

.contact-form {
  display: grid;
  gap: var(--space-4);
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  text-align: left;
}
.contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.contact-form__note { font-size: var(--fs-body-sm); letter-spacing: 0.02em; }
.contact-form .ak-btn { justify-self: center; margin-top: var(--space-2); }


/* Página de retorno del Checkout (/pago-registrado): un bloque angosto, nada más. */

.pago {
  max-width: var(--container-narrow);
  margin-inline: auto;
  text-align: center;
}
.ak-base .pago > * + * { margin-top: var(--space-5); }

/* Booking page (/agendar) */

.booking { padding-block: var(--space-8) var(--section-pad); }
.booking__header { max-width: 640px; margin: 0 auto var(--space-6); text-align: center; }
.ak-base .booking__header > * + * { margin-top: var(--space-4); }
.booking__header .prose { margin-inline: auto; }
.booking .contact__sent { text-align: center; }
.booking__back { margin-top: var(--space-4); font-size: var(--fs-body); }
.booking__form { gap: var(--space-6); }
.booking__group { display: grid; gap: var(--space-4); margin: 0; padding: 0; border: 0; min-width: 0; }
.booking__legend {
  margin-bottom: var(--space-4);
  padding: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lead);
}

.choices { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 6px; }
.choices legend { padding: 0; margin-bottom: 6px; font-size: var(--fs-body-sm); font-weight: 500; }
.choices__options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: var(--hairline);
  border-radius: var(--radius-full);
  font-size: var(--fs-body-sm);
  transition: border-color 160ms ease, color 160ms ease;
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Honeypot: kept out of view without display:none, which some bots detect and skip. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Legal & error ---------- */

.legal,
.legal__header { margin-bottom: var(--space-6); padding-bottom: var(--space-6); border-bottom: var(--hairline); }
.ak-base .legal__header > * + * { margin-top: var(--space-4); }
.legal__meta { font-size: var(--fs-body-sm); letter-spacing: 0.02em; }
.legal__clause { margin-top: var(--space-6); }
.legal__clause h2 { margin-bottom: var(--space-4); }
.legal > p:last-child { margin-top: var(--space-8); }


/* ---------- Error / 404 ---------- */

.lost { padding-block: var(--space-8) var(--section-pad); }
.lost > .ak-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: var(--space-8);
}
.ak-base .lost__text > * + * { margin-top: var(--space-4); }
.lost__text .heading-lg { max-width: 18ch; }
.lost__text .lead { max-width: 52ch; }

/* The number is decoration (the eyebrow already says it): the largest size in the scale, light, in the accent. */
.lost__code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.lost__path { font-size: var(--fs-body-sm); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.lost__path code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  padding: 2px 6px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
}
.lost__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); padding-top: var(--space-4); }

.lost__arch {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.lost__arch path:first-child { stroke: var(--accent); }
.lost__door { stroke: var(--ink); }

.lost-links { padding-block: var(--space-8) var(--section-pad); }
.lost-links .eyebrow { margin-bottom: var(--space-4); }
.lost-links ul { border-top: var(--hairline); }
.lost-links a {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: var(--hairline);
  text-decoration: none;
  transition: color 160ms ease;
}
.lost-links a:hover { color: var(--accent); }
.lost-links__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lead);
}
.lost-links__desc { font-size: var(--fs-body); }

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

.site-footer {
  border-top: var(--hairline);
  font-size: var(--fs-body-sm);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-8);
}

.site-footer__brand .site-brand { margin-bottom: var(--space-4); }
.site-footer__copy,
.site-footer a:not(.site-brand) {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer a:not(.site-brand):hover { color: var(--ink); }

.ak-base .site-footer__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer__col li + li { margin-top: var(--space-2); }

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

@media (max-width: 1024px) {
  .hero > .ak-container { grid-template-columns: minmax(0, 1fr) 220px; min-height: 0; }
  .lost > .ak-container { grid-template-columns: minmax(0, 1fr) 220px; }
  .display { font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -0.02em; }
  .site-footer__inner { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --section-pad: var(--space-8); --gutter: 16px; }

  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--surface);
    border-bottom: var(--hairline);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  /* Full-width rows in the mobile menu (the desktop rule centers items on one line). */
  .site-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__links li { display: block; }
  .site-nav__links a {
    display: flex;
    padding-block: var(--space-4);
    font-size: var(--fs-body);
    border-bottom: var(--hairline);
  }
  .site-nav__links a:hover { border-bottom-color: var(--line); }
  .site-nav__cta { margin-top: var(--space-6); }
  .site-header.cta-hidden .site-nav__cta { opacity: 1; visibility: visible; }

  .hero { padding-top: var(--space-6); }
  .hero > .ak-container { grid-template-columns: 1fr; }
  .lost { padding-top: var(--space-6); }
  .lost > .ak-container { grid-template-columns: 1fr; gap: var(--space-6); }
  .lost__arch { display: none; }
  .lost__code { font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -0.02em; }
  .lost-links a { grid-template-columns: minmax(0, 1fr) auto; }
  .lost-links__desc { grid-column: 1; grid-row: 2; }
  .hero__arch { display: none; }

  .heading-lg { font-size: var(--fs-h2); line-height: 1.25; letter-spacing: -0.015em; }

  .split__body { padding-top: 0; }

  .contact-form__grid { grid-template-columns: 1fr; }
  .highlights { margin-top: var(--space-6); }
  .ak-section__head--wide { margin-bottom: var(--space-6); }

  .service__index { margin-bottom: var(--space-4); }

  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .display { font-size: var(--fs-h2); line-height: 1.25; letter-spacing: -0.015em; }
  .hero__actions .btn,
  .contact__actions .btn { flex: 1 1 100%; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
