/* European Auto Techniks: styles.css (design v2)
   One typeface (Barlow 400 and 500), one page color, photos at full width,
   red only on the primary button. Every section shares the same grid:
   title in the left third, content in the right two thirds (desktop). */

/* ---------- Tokens (design-reference/brandbook/tokens.json) ---------- */
:root {
  /* Type scale: five roles, nothing else (impeccable critique P2). */
  --fs-display: clamp(40px, 6.4vw, 84px); /* the H1 only */
  --fs-title: clamp(30px, 3.4vw, 44px);   /* section titles, statement, feature quote */
  --fs-lead: clamp(20px, 1.6vw, 22px);    /* leads, subheads, service names, addresses */
  --fs-body: 17px;                        /* text, buttons, nav, labels */
  --fs-small: 15px;                       /* dates, captions, notes */
  --negro: #0B0B0C;
  --grafito: #121212;
  --carbon: #232427;
  --acero: #3A3D42;
  --niebla: #70747B;
  --humo: #5B5F66;
  --plata: #C9CBCF;
  --hueso: #E6E6E2;
  --marfil: #F4F4F2;
  --blanco: #FFFFFF;
  --tinta: #111111;
  --rojo: #D3202B;
  --rojo-oscuro: #B91C26;
  --rojo-claro: #FF6A72;

  /* Light theme (default) */
  --fondo: var(--marfil);
  --fondo-elevado: var(--blanco);
  --texto: var(--tinta);
  --texto-suave: var(--humo);
  --borde: var(--humo);
  --linea: rgba(17, 17, 17, 0.16); /* decorative hairline: ink at low alpha, no new grey */
  --acento: var(--rojo);
  --acento-texto: var(--rojo-oscuro);
  --sobre-acento: var(--blanco);

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 4px;
  --gutter: 20px;
  --container: 1280px;
  --gap: 24px;

  /* Section rhythm */
  --section: 64px;
  --block: 32px;
}

.theme-dark {
  --fondo: var(--grafito);
  --fondo-elevado: var(--carbon);
  --texto: var(--blanco);
  --texto-suave: var(--plata);
  --borde: var(--niebla);
  --linea: rgba(255, 255, 255, 0.18);
  --acento-texto: var(--rojo-claro);
  background: var(--fondo);
  color: var(--texto);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --section: 96px; --block: 40px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 64px; --section: 128px; --block: 48px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure, blockquote, address, fieldset {
  margin: 0;
}

address { font-style: normal; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

button { font: inherit; color: inherit; }

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

::selection { background: var(--tinta); color: var(--blanco); }
.theme-dark ::selection { background: var(--blanco); color: var(--tinta); }
/* Browser surfaces carry the design too. */
input, textarea { caret-color: var(--rojo); }
.visit-form, .visit-form * { accent-color: var(--rojo); }
a[href^="tel:"] { font-variant-numeric: tabular-nums; }
html { scrollbar-color: var(--niebla) var(--marfil); }

.visually-hidden {
  font-size: var(--fs-body); /* keep hidden headings on the type scale */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 12px 16px;
  background: var(--tinta);
  color: var(--blanco);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Every section: title left, content right. Collapses to one column on phones. */
.grid { display: grid; gap: 24px var(--gap); }
.grid__head { grid-column: 1 / -1; }
.grid__body { grid-column: 1 / -1; min-width: 0; }

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .grid__head { grid-column: 1 / span 4; }
  .grid__body { grid-column: 5 / -1; }
  .grid__body--narrow { grid-column: 5 / span 7; }
}

.section { padding-block: var(--section); }
.section--rule { border-top: 1px solid var(--linea); }
.section--tight { padding-block: var(--block); }

/* ---------- Type ---------- */
.t-display {
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.t-title {
  font-size: var(--fs-title);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.t-statement {
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.t-h3 {
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.t-lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  max-width: 34em;
}

.t-meta {
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--texto-suave);
}

.t-small { font-size: var(--fs-small); line-height: 1.5; }

.text-muted { color: var(--texto-suave); }

.measure { max-width: 62ch; }

.stack > * + * { margin-top: 16px; }
.stack--lg > * + * { margin-top: var(--block); }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--acento);
  border-color: var(--acento);
  color: var(--sobre-acento);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); }
}
.btn-primary:active { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); transform: scale(0.97); }

.btn-outline {
  background: transparent;
  border-color: var(--borde);
  color: var(--texto);
}
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover { background: var(--hueso); }
}
@media (hover: hover) and (pointer: fine) {
  .theme-dark .btn-outline:hover { background: var(--carbon); }
}
.btn-outline:active { transform: scale(0.97); }

.btn[disabled] { opacity: 0.6; cursor: default; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

/* A text link with a comfortable tap height. */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--linea);
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
}
.link:active { opacity: 0.7; }



/* Links inside paragraphs and the error summary */
p a:not(.link):not(.btn),
.error-summary__list a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* A button styled as a link (Show map) */
button.link {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--marfil);
  position: relative;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
  padding-block: 17px; /* brandbook clear space around the logo (about 7% of its width) */
}

.site-header__logo { display: block; }
.site-header__logo img { width: 240px; height: auto; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  font-weight: 500;
  cursor: pointer;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { color: var(--texto-suave); }
}
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.site-nav__phone { margin-left: 32px; }

.site-nav__meta { display: none; }

@media (max-width: 899px) {
  .site-header__inner { min-height: 72px; }
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--marfil);
    border-top: 1px solid var(--linea);
    border-bottom: 1px solid var(--linea);
  }
  .js .site-nav.is-open { display: block; }
  .site-nav__list { display: block; }
  .site-nav a { min-height: 52px; font-size: var(--fs-lead); }
  .site-nav__phone { margin: 0; }
  .site-nav__meta { display: block; margin-top: 16px; }
  .site-nav__meta p + p { margin-top: 4px; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; }
}

/* ---------- Photos ---------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--hueso);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Full width photo band */
.band .frame { aspect-ratio: 4 / 3; }
.band__caption { margin-top: 12px; }

@media (min-width: 768px) {
  .band .frame { aspect-ratio: 21 / 9; max-height: 760px; }
}

/* Two square photos side by side */
.duo {
  display: grid;
  gap: var(--gap);
}
.duo .frame { aspect-ratio: 1; }
.duo figcaption { margin-top: 12px; }

/* Signature: photo captions sit between two short red bars, like the "AUTO TECHNIKS" line
   in the logo. Photo captions only (not review attributions). */
.duo figcaption,
.statement__photo figcaption,
.band__caption {
  display: flex;
  align-items: center;
  gap: 12px;
}
.duo figcaption::before,
.duo figcaption::after,
.statement__photo figcaption::before,
.statement__photo figcaption::after,
.band__caption::before,
.band__caption::after {
  content: "";
  flex: none;
  width: 24px;
  height: 2px;
  background: var(--rojo);
}

@media (min-width: 700px) {
  .duo { grid-template-columns: 1fr 1fr; }
}

/* ---------- Hero (Home): photo with the title over it ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(82svh, 860px);
  color: var(--blanco);
}

.hero .frame {
  position: absolute;
  inset: 0;
  background: var(--grafito);
}
.hero .frame img { object-position: 62% 50%; } /* phones: keep the 911 interior in frame */
.hero .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Phones: the text sits over the busiest part of the photo, so the shade goes higher and darker. */
  background: linear-gradient(to top, rgba(11, 11, 12, 0.94) 0%, rgba(11, 11, 12, 0.8) 42%, rgba(11, 11, 12, 0) 82%);
}
@media (min-width: 768px) {
  .hero .frame::after {
    background: linear-gradient(to top, rgba(11, 11, 12, 0.82) 0%, rgba(11, 11, 12, 0.45) 38%, rgba(11, 11, 12, 0) 68%);
  }
}

.hero__text {
  position: relative;
  padding-block: 48px;
  display: grid;
  gap: 24px;
}
.hero__text .t-display { max-width: 14ch; }
.hero__text .t-lead { color: rgba(255, 255, 255, 0.9); max-width: 30em; }
.hero__text .link { text-decoration-color: rgba(255, 255, 255, 0.5); }
@media (hover: hover) and (pointer: fine) {
  .hero__text .link:hover { text-decoration-color: var(--blanco); }
}
.hero__text .btn-primary:focus-visible { outline-color: var(--blanco); }
.hero__text .link:focus-visible { outline-color: var(--blanco); }

@media (min-width: 768px) {
  .hero { min-height: min(86svh, 900px); }
  .hero .frame img { object-position: 50% 50%; }
  .hero__text { padding-block: 72px; gap: 28px; }
}

@media (min-width: 900px) {
  .hero__text {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 32px var(--gap);
  }
  .hero__text .t-display { grid-column: 1 / span 8; max-width: 13ch; }
  .hero__side { grid-column: 9 / -1; }
}

/* Page title block (inner pages): title on the left, lead on the right */
.page-head { padding-block: var(--block) var(--section); }
.page-head .t-lead { max-width: 30em; }

@media (min-width: 900px) {
  .page-head .grid__body { align-self: end; }
}

/* ---------- Statement ---------- */
.statement .t-statement { max-width: 26ch; }

/* Desktop only: the sentence on the left, a photo on the right, so the line
   does not sit alone in an empty half. Phones keep the sentence alone; the
   hidden lazy image is never downloaded there. */
.statement__photo { display: none; }
.statement__photo figcaption { margin-top: 12px; }

@media (min-width: 900px) {
  .statement__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 var(--gap);
    align-items: center;
  }
  .statement__grid .t-statement { grid-column: 1 / span 6; }
  .statement__photo { display: block; grid-column: 8 / -1; }
  .statement__photo .frame { aspect-ratio: 4 / 3; }
}

/* ---------- Service rows (Home) ---------- */
.service-rows {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--linea);
}
.service-rows > li { border-bottom: 1px solid var(--linea); }

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  min-height: 72px;
  padding: 20px 12px;
  margin-inline: -12px; /* room for the pressed background; the rule stays on the li */
  border-radius: var(--radius);
  text-decoration: none;
}
.service-row:active { background: var(--hueso); }

.service-row__name {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.service-row__text { display: grid; gap: 4px; }
.service-row__arrow { width: 24px; height: 24px; }

/* Arrow icon: one authored SVG (2px stroke, square ends, as the brandbook asks for icons),
   drawn in the text color through a mask so it follows hover and theme colors. */
.arrow,
.service-row__arrow {
  display: inline-block;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.arrow { width: 1em; height: 1em; } /* spaced by the gap on .link */
@media (hover: hover) and (pointer: fine) {
  .service-row:hover .service-row__arrow { transform: translateX(4px); }
}

@media (min-width: 768px) {
  .service-row { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr) auto; padding-block: 26px; }
  .service-row__text { display: contents; }
}

.services-block__all { margin-top: 24px; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--block) var(--gap);
}
.steps li {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--linea);
}
.steps li p { max-width: 36ch; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Quote ---------- */
.quote-feature blockquote p {
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 24ch;
}
.quote-feature figcaption { margin-top: 20px; }
.quote-feature__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  margin-top: 24px;
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--linea); }
.faq__item { border-bottom: 1px solid var(--linea); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 16px 0;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex: none;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--texto-suave);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { max-width: 60ch; padding-bottom: 24px; }

/* ---------- Shop and map ---------- */
.shop__facts { display: grid; gap: var(--block); }
.shop__info { display: grid; gap: 4px; align-content: start; }
.shop__info address { font-size: var(--fs-lead); font-weight: 500; line-height: 1.3; }

@media (min-width: 640px) {
  .shop__facts { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); }
}

.map-embed {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  border: 0;
}

.map-facade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
  background: var(--hueso);
}
.map-facade__button { display: none; }
.js .map-facade__button { display: inline-flex; }
.map-facade__pin { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--section) 40px;
}
.site-footer__logo { display: inline-block; }
.site-footer__logo img { width: 240px; height: auto; }

.site-footer__grid {
  display: grid;
  gap: 32px var(--gap);
  margin-top: var(--block);
  padding-top: var(--block);
  border-top: 1px solid var(--linea);
}
.site-footer__grid h2 {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--texto-suave);
  margin-bottom: 8px;
}
.site-footer__grid p,
.site-footer__grid address { line-height: 1.5; }

.footer-links { list-style: none; padding: 0; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}

.site-footer__club {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: var(--block);
  padding-top: var(--block);
  border-top: 1px solid var(--linea);
}
.site-footer__club p { max-width: 50ch; color: var(--texto-suave); }

.site-footer__legal { margin-top: 40px; }

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .site-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Services page ---------- */
.service-group {
  border-top: 1px solid var(--linea);
  border-left: 3px solid transparent;
  padding: var(--block) 0 var(--block) 16px;
  margin-left: -19px;
  scroll-margin-top: 24px;
}
.service-group:target { border-left-color: var(--rojo); }

.service-group__intro { max-width: 52ch; }
.service-group__signs { max-width: 52ch; margin-top: 12px; }

.service-group__items {
  list-style: none;
  padding: 0;
  margin-top: var(--block);
}
.service-item {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--linea);
  scroll-margin-top: 24px;
}
.service-item h3 { font-size: var(--fs-body); font-weight: 500; line-height: 1.3; }
.service-item p { max-width: 52ch; }

@media (min-width: 640px) {
  .service-item { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--gap); }
}

.service-group__cta { margin-top: 20px; }

.before-you-call { display: grid; gap: var(--block); }
.before-you-call > div { display: grid; gap: 8px; }
.before-you-call p { max-width: 52ch; }

@media (min-width: 640px) {
  .before-you-call { grid-template-columns: 1fr 1fr; gap: var(--gap); }
}

/* Closing call to action (inner pages) */
.closing .t-statement { max-width: 22ch; }
.closing .btn-row { margin-top: 24px; }

/* ---------- Request a visit ---------- */
.visit-layout { display: grid; gap: var(--section) var(--gap); }

@media (min-width: 1024px) {
  .visit-layout { row-gap: var(--block); }
}

@media (min-width: 1024px) {
  /* The form spans both rows; the right column stacks from the top (steps, then shop
     details) instead of waiting for the form to end. */
  .visit-layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .visit-form { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .next-steps { grid-column: 9 / -1; grid-row: 1; }
  .visit-aside { grid-column: 9 / -1; grid-row: 2; }
}

.next-steps__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
}
.next-steps__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--linea);
}
.next-steps__num { color: var(--texto-suave); font-size: var(--fs-small); padding-top: 4px; }
.next-steps__item h3 { font-size: var(--fs-body); font-weight: 500; line-height: 1.3; }
.next-steps__item p { margin-top: 4px; }
.next-steps__title { margin-bottom: 20px; }

.visit-aside { display: grid; gap: var(--block); }
.visit-aside .next-steps__title { margin-bottom: 12px; }
.visit-aside address { font-size: var(--fs-lead); font-weight: 500; line-height: 1.3; }

.form-grid {
  display: grid;
  gap: 20px var(--gap);
}
.form-grid + .form-grid,
.form-fieldset + .form-grid { margin-top: var(--block); }
.form-fieldset { margin-top: var(--block); padding: 0; border: 0; }
.form-fieldset legend {
  padding: 0;
  margin-bottom: 20px;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

.field { display: grid; gap: 8px; align-content: start; }
.field label { font-weight: 500; font-size: var(--fs-body); }
.field__req { font-weight: 400; color: var(--texto-suave); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  font: inherit;
  color: var(--texto);
}
.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23111111' stroke-width='1.5'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--rojo); }

.field__error {
  font-size: var(--fs-small);
  color: var(--acento-texto);
}

.form-hint { color: var(--texto-suave); font-size: var(--fs-small); }

.error-summary,
.form-status {
  padding: 16px 20px;
  margin-bottom: var(--block);
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-left: 3px solid var(--texto);
  border-radius: var(--radius);
}
.error-summary { border-left-color: var(--rojo); }
.error-summary h2 { font-size: var(--fs-lead); font-weight: 500; margin-bottom: 8px; }
.error-summary__list { padding-left: 20px; }
.error-summary__list li + li { margin-top: 4px; }
.form-status.is-error { border-left-color: var(--rojo); }

.form-actions {
  margin-top: var(--block);
  display: grid;
  gap: 20px;
}
.form-actions .btn { justify-self: start; min-width: 200px; }
.form-actions p { max-width: 52ch; }

/* Honeypot: off screen for people, hidden from assistive tech. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Reviews ---------- */
.quote-wall { border-top: 1px solid var(--linea); }

/* Reviews: three short quotes lead in large type; the rest follow in the compact wall. */
.quote-highlights { display: grid; gap: var(--block); margin-bottom: var(--block); }
.quote-highlights .quote--big blockquote p {
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 24ch;
}
.quote-highlights .quote--big figcaption { margin-top: 16px; }
@media (max-width: 767px) {
  .quote-wall .quote { padding-block: 20px; } /* denser list on phones */
}

.quote {
  padding: 28px 0;
  border-bottom: 1px solid var(--linea);
  break-inside: avoid;
}
.quote blockquote p {
  font-size: var(--fs-body);
  line-height: 1.5;
  max-width: 60ch;
}
.quote figcaption { margin-top: 12px; }

@media (min-width: 900px) {
  .quote-wall { columns: 2; column-gap: var(--section); }
  .quote { display: inline-block; width: 100%; }
}

/* ---------- 404 ---------- */
.not-found { padding-block: var(--section) calc(var(--section) * 1.5); }

/* ---------- Motion ---------- */
/* --------------------------------------------------------------------------
   Feel native on phones (mobile-native skill). Hover styles above only apply
   to mouse pointers, so a tap never leaves a stuck hover; taps get :active.
   -------------------------------------------------------------------------- */
html { -webkit-tap-highlight-color: transparent; }
.btn, .site-nav a, .service-row, .nav-toggle { -webkit-user-select: none; user-select: none; }
.site-nav a:active, .footer-links a:active { color: var(--texto-suave); }
/* iOS zooms the page into any field under 16px and never zooms back out. */
.field input, .field select, .field textarea { font-size: max(16px, 1em); }

/* --------------------------------------------------------------------------
   Mobile quick contact bar (phones only, JS only). Appears once the first
   screen has scrolled away; hides at the closing block and the footer, which
   already offer both actions. Without JS the hero and footer carry the phone.
   -------------------------------------------------------------------------- */
.mobile-cta { display: none; }
@media (max-width: 767px) {
  .js .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--marfil);
    border-top: 1px solid var(--linea);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 240ms var(--ease-out), visibility 0s linear 240ms;
  }
  .js .mobile-cta.is-visible {
    transform: none;
    visibility: visible;
    transition: transform 240ms var(--ease-out), visibility 0s;
  }
  .js .mobile-cta .btn { width: 100%; justify-content: center; }
  html { scroll-padding-bottom: 80px; } /* keep keyboard focus clear of the bar */
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .js .mobile-cta, .js .mobile-cta.is-visible { transition: none; }
}

/* --------------------------------------------------------------------------
   Motion. Only transform, opacity and clip-path. Nothing moves when the
   visitor asks for reduced motion, and everything is visible without JS
   (the reveal styles only apply under .reveal-ready, set by js/main.js).
   -------------------------------------------------------------------------- */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Hover and press feedback */
  .btn, .link, .site-nav a, .service-row__arrow, .faq__item summary::after, .service-row {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
      transform 160ms var(--ease-out), text-decoration-color 160ms ease, opacity 160ms ease;
  }

  /* Home hero: the photo settles, then the title and the side copy arrive in order (first load only) */
  .hero .frame img { animation: settle 1400ms var(--ease-out) both; }
  .hero__text > * { animation: rise 800ms var(--ease-out) both; }
  .hero__text > :nth-child(1) { animation-delay: 120ms; }
  .hero__text > :nth-child(2) { animation-delay: 240ms; }
  @keyframes settle {
    from { transform: scale(1.06); }
    to { transform: none; }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }

  /* Photos open like a shop door, top to bottom, with a slight settle */
  .reveal-ready main figure:not(.hero *) img {
    clip-path: inset(0 0 100% 0);
    transform: scale(1.04);
    transition: clip-path 1000ms var(--ease-in-out), transform 1400ms var(--ease-out);
  }
  .reveal-ready main figure.is-in img { clip-path: inset(0 0 0 0); transform: none; }
  .reveal-ready .duo figure + figure img { transition-delay: 120ms; } /* the pair opens as one motion */
  .reveal-ready main figure.no-anim img { transition: none; } /* slow network: just show it */

  /* FAQ: the answer fades in when a question opens, instead of popping in */
  .faq__item[open] > :not(summary) { animation: answer 240ms var(--ease-out) both; }
  @keyframes answer {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
  }

  /* Mobile menu: the panel drops out of the header instead of appearing from nowhere */
  .js .site-nav.is-open {
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), display 200ms allow-discrete;
  }
  @starting-style {
    .js .site-nav.is-open { opacity: 0; transform: translateY(-8px); }
  }
}

@media print {
  .reveal-ready * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
