:root{
  --paper:#eee4d2;
  --paper-dim:#e2d6bd;
  --ink:#221d17;
  --rust:#a63e1f;
  --rust-dark:#7c2c14;
  --steel:#5b6660;
  --steel-light:#8b9490;
  --line:#c9bb9d;
  --fr-blue:#2c4468;
  --ok-green:#3f6b4a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#1c1815; --paper-dim:#252019; --ink:#efe6d6; --rust:#e07a4f;
    --rust-dark:#c96438; --steel:#9aa39c; --steel-light:#6d766f; --line:#453c30;
    --fr-blue:#7d9bc9; --ok-green:#7fb890; color-scheme: dark;
  }
}
:root[data-theme="dark"]{
  --paper:#1c1815; --paper-dim:#252019; --ink:#efe6d6; --rust:#e07a4f;
  --rust-dark:#c96438; --steel:#9aa39c; --steel-light:#6d766f; --line:#453c30;
  --fr-blue:#7d9bc9; --ok-green:#7fb890; color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height:1.55;
  overflow-x:hidden;
}
.serif{ font-family: Georgia, 'Times New Roman', serif; }
.mono{ font-family: 'Courier New', ui-monospace, monospace; }

/* ---------- BANDA DE CONTACTO ---------- */
.band{
  background: var(--rust-dark);
  color:#f4e9da;
  padding:8px 16px;
  font-size:13px;
  display:flex; flex-wrap:wrap; gap:4px 18px;
  justify-content:center; text-align:center;
}
.band a{ color:#f4e9da; text-decoration:underline; text-underline-offset:2px; }

/* ---------- NAVEGACIÓN ---------- */
.nav{
  position:sticky; top:0; z-index:20;
  background: var(--paper);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:1000px; margin:0 auto;
  padding:10px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:8px 16px;
  flex-wrap:wrap;
}
.logo{
  font-family: Georgia, 'Times New Roman', serif;
  font-weight:600; font-size:1.2rem;
  color:var(--ink); text-decoration:none; white-space:nowrap;
}
.logo em{ color:var(--rust); }
.nav-links{ display:flex; gap:2px; flex-wrap:wrap; }
.nav-links a{
  color:var(--ink); text-decoration:none;
  font-size:0.92rem; font-weight:500;
  padding:6px 10px; border-radius:4px;
}
.nav-links a:hover{ background:var(--paper-dim); }
.nav-links a[aria-current="page"]{ color:var(--rust); box-shadow: inset 0 -2px 0 var(--rust); border-radius:0; }

/* ---------- BOTONES ---------- */
.btn{
  display:inline-block;
  padding:12px 22px;
  border-radius:4px;
  font-weight:600; font-size:0.95rem;
  text-decoration:none;
  border:2px solid var(--ink);
}
.btn-solid{ background:var(--rust); color:#f8f0e4; border-color:var(--rust); }
.btn-solid:hover{ filter:brightness(1.08); }
.btn-ghost{ background:transparent; color:var(--ink); }
.btn-ghost:hover{ background:var(--paper-dim); }
.btn-wa{ background:var(--ok-green); border-color:var(--ok-green); color:#f4ede0; }
.btn-wa:hover{ filter:brightness(1.08); }

/* ---------- ENCABEZADOS DE SECCIÓN ---------- */
.kicker{
  font-family: Georgia, serif; font-style:italic;
  color:var(--rust); font-size:1.05rem; margin:0 0 4px;
}
h2.section-title{
  font-family: Georgia, serif; font-weight:600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height:1.2;
  margin:0 0 22px; max-width:24ch; text-wrap:balance;
}
.wrap{ max-width:1000px; margin:0 auto; padding:0 16px; }
.narrow{ max-width:820px; margin:0 auto; padding:0 16px; }
section{ scroll-margin-top:70px; }

/* ---------- HERO ---------- */
.hero{
  max-width:1000px; margin:0 auto;
  padding:48px 16px 32px; text-align:center;
}
.brand{
  font-family: Georgia, 'Times New Roman', serif;
  font-weight:600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing:-0.01em; margin:0; line-height:1.1;
}
.brand em{ font-style:italic; color:var(--rust); }
.hero-sub{
  max-width:48ch; margin:12px auto 28px;
  color:var(--steel); font-size:1.05rem;
}
.hero-cta{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.hero-art{ margin:30px auto 0; max-width:640px; }
.hero-art svg{ width:100%; height:auto; display:block; }

/* ---------- TEASER HISTORIA ---------- */
.teaser{ padding:40px 0 50px; }
.teaser p{ max-width:66ch; font-size:1.02rem; }
.link-arrow{ color:var(--rust); font-weight:600; text-decoration:none; }
.link-arrow:hover{ text-decoration:underline; }

/* ---------- FOTOS DEL TALLER ---------- */
.fotos{ background:var(--paper-dim); padding:50px 0 56px; }
.fotos-intro{ max-width:62ch; margin:0 0 28px; color:var(--steel); }
.fotos-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:18px; }
.foto{
  background:var(--paper); border:1px solid var(--line); border-radius:4px;
  overflow:hidden; display:flex; flex-direction:column;
}
.foto img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.foto-body{ padding:12px 14px 16px; }
.foto h3{ font-family:Georgia, serif; font-size:1.05rem; margin:0 0 4px; }
.foto p{ font-size:0.88rem; color:var(--steel); margin:0; }
.fotos-note{ margin-top:22px; font-size:0.95rem; }
@media (max-width:860px){ .fotos-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:460px){ .fotos-grid{ grid-template-columns:1fr; } }

/* ---------- FAMILIA DE MODELOS ---------- */
section.familia{ max-width:1000px; margin:50px auto 60px; padding:0 16px; }
.familia-intro{ max-width:62ch; }
.familia-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:24px; margin-top:32px; }
.model-card{ border:1px solid var(--line); border-radius:4px; padding:22px; background:var(--paper-dim); }
.model-photo{ width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; display:block; border-radius:3px; margin-bottom:14px; }
.model-card svg{ width:100%; height:auto; display:block; margin-bottom:14px; }
.model-name{ font-family:Georgia, serif; font-weight:600; font-size:1.2rem; margin:0 0 2px; }
.model-years{ font-family:'Courier New', monospace; font-size:0.8rem; color:var(--rust); margin-bottom:10px; }
.model-desc{ font-size:0.92rem; color:var(--steel); }
@media (max-width:640px){ .familia-grid{ grid-template-columns:1fr; } }

/* ---------- POR QUÉ ---------- */
.porque{ padding:10px 0 60px; }
.porque-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.porque-item{ border-top:2px solid var(--rust); padding-top:14px; }
.porque-item .idx{ font-family:'Courier New', monospace; font-size:0.75rem; letter-spacing:0.08em; color:var(--rust); }
.porque-item h3{ font-family:Georgia, serif; margin:6px 0 6px; font-size:1.15rem; }
.porque-item p{ margin:0; color:var(--steel); font-size:0.95rem; }
@media (max-width:720px){ .porque-grid{ grid-template-columns:1fr; } }

/* ---------- CONTACTO ---------- */
.contacto{ background:var(--rust-dark); color:#f4e9da; padding:56px 0; }
.contacto .kicker{ color:#f1c8a8; }
.contacto h2.section-title{ color:#fbf3e8; }
.contacto-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:36px; align-items:start; }
.contacto p{ max-width:52ch; }
.contacto-list{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.contacto-list li{ border-bottom:1px solid rgba(244,233,218,0.25); padding-bottom:12px; }
.contacto-list .lbl{ display:block; font-size:0.78rem; letter-spacing:0.08em; text-transform:uppercase; opacity:0.75; }
.contacto-list a{ color:#fbf3e8; font-size:1.15rem; font-weight:600; text-decoration:none; }
.contacto-list a:hover{ text-decoration:underline; }
.contacto .btn-row{ display:flex; gap:12px; flex-wrap:wrap; margin-top:20px; }
.contacto .btn-ghost{ color:#fbf3e8; border-color:#f4e9da; }
.contacto .btn-ghost:hover{ background:rgba(255,255,255,0.08); }
@media (max-width:720px){ .contacto-grid{ grid-template-columns:1fr; } }

/* ---------- HISTORIA (página) ---------- */
.page-head{ padding:44px 0 10px; }
.page-head .brand{ font-size: clamp(2rem, 5vw, 3rem); }
section.historia{ margin:20px auto 50px; }
.historia p{ font-size:1.02rem; max-width:68ch; }
.pull-quote{
  border-left:3px solid var(--rust);
  padding:4px 0 4px 20px; margin:28px 0;
  font-family:Georgia, serif; font-style:italic; font-size:1.2rem;
}
.timeline{ margin:36px 0 10px; position:relative; padding-left:28px; border-left:2px solid var(--line); }
.tl-item{ position:relative; padding-bottom:28px; }
.tl-item:last-child{ padding-bottom:0; }
.tl-item::before{
  content:""; position:absolute; left:-33.5px; top:4px;
  width:9px; height:9px; border-radius:50%;
  background:var(--rust); border:2px solid var(--paper); box-shadow:0 0 0 2px var(--rust);
}
.tl-year{ font-family:'Courier New', monospace; color:var(--rust); font-weight:700; font-size:0.95rem; }
.tl-text{ margin-top:3px; font-size:0.97rem; max-width:58ch; }
.divider{ max-width:820px; margin:0 auto; padding:0 16px; }
.divider hr{ border:none; border-top:1px solid var(--line); margin:10px 0 0; }
.concorde-art{ margin:10px 0 26px; max-width:560px; }
.concorde-art svg{ width:100%; height:auto; display:block; }
.facts{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:14px;
  margin:28px 0 8px; padding:0;
}
.fact{ background:var(--paper-dim); border:1px solid var(--line); border-radius:4px; padding:14px 16px; }
.fact b{ display:block; font-family:Georgia, serif; font-size:1.5rem; color:var(--fr-blue); line-height:1.1; }
.fact span{ font-size:0.85rem; color:var(--steel); }
@media (max-width:640px){ .facts{ grid-template-columns:1fr 1fr; } }

/* ---------- BUSCADOR ---------- */
.search-wrap{ max-width:720px; margin:0 auto 8px; padding:0 16px; }
.ticket{
  border:2px solid var(--ink); border-radius:3px;
  background:var(--paper-dim); padding:4px; position:relative;
}
.ticket::before, .ticket::after{
  content:""; position:absolute; top:-2px; bottom:-2px; width:14px;
  background-image: radial-gradient(circle, var(--paper) 4px, transparent 4.5px);
  background-size:14px 16px; background-repeat:repeat-y;
}
.ticket::before{ left:-7px; }
.ticket::after{ right:-7px; }
#q{
  width:100%; border:none; background:transparent;
  font-family:'Courier New', monospace; font-size:1.1rem;
  padding:16px 18px; color:var(--ink); outline:none;
}
#q::placeholder{ color:var(--steel-light); }
.meta-row{
  max-width:720px; margin:10px auto 0; padding:0 16px;
  display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
  font-size:0.85rem; color:var(--steel);
}
.count-total{ color:var(--rust); font-weight:600; }
.results-main{ max-width:720px; margin:24px auto 70px; padding:0 16px; }
.empty-state{ text-align:center; color:var(--steel); padding:40px 10px; font-size:0.98rem; }
.empty-state strong{ color:var(--ink); }
ul.results{ list-style:none; margin:0; padding:0; }
li.item{
  border-bottom:1px solid var(--line); padding:14px 4px;
  display:flex; justify-content:space-between; align-items:center; gap:14px;
}
li.item:first-child{ border-top:1px solid var(--line); }
.item-info{ min-width:0; }
.item-name{ font-size:1rem; font-weight:500; word-break:break-word; }
.item-name mark{ background:none; color:var(--rust); font-weight:700; }
.item-code{ font-family:'Courier New', monospace; font-size:0.78rem; color:var(--steel); margin-top:3px; }
.wa-btn{
  flex-shrink:0; display:inline-flex; align-items:center; gap:6px;
  background:var(--ok-green); color:#f4ede0; border:none; border-radius:4px;
  padding:9px 13px; font-size:0.82rem; font-weight:600; text-decoration:none; white-space:nowrap;
}
.wa-btn:hover{ filter:brightness(1.08); }
.more-note{ text-align:center; color:var(--steel); font-size:0.85rem; padding:18px 0 4px; }
.search-hint{ max-width:720px; margin:14px auto 0; padding:0 16px; font-size:0.88rem; color:var(--steel); }
@media (max-width:480px){
  li.item{ flex-direction:column; align-items:flex-start; }
  .wa-btn{ align-self:stretch; justify-content:center; }
}

/* ---------- BOTÓN FLOTANTE WHATSAPP ---------- */
.float-wa{
  position:fixed; right:16px; bottom:16px; z-index:30;
  width:56px; height:56px; border-radius:50%;
  background:#25a244; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 14px rgba(0,0,0,0.25);
}
.float-wa svg{ width:30px; height:30px; }

/* ---------- PIE ---------- */
footer{
  max-width:1000px; margin:0 auto; padding:28px 16px 90px;
  color:var(--steel); font-size:0.85rem; text-align:center;
}
footer a{ color:var(--rust); text-decoration:none; }
footer a:hover{ text-decoration:underline; }
footer .foot-links{ margin-bottom:6px; display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ---------- COLLAGE DEL LOCAL (portada) ---------- */
.collage{
  margin:34px auto 0; max-width:1000px;
  display:grid; gap:10px;
  grid-template-columns:1.25fr 1fr 1fr;
  grid-template-rows:230px 230px;
  grid-template-areas:"esq int int" "esq ent vid";
}
.collage figure{ margin:0; overflow:hidden; border-radius:4px; border:1px solid var(--line); background:var(--paper-dim); }
.collage img{ width:100%; height:100%; object-fit:cover; display:block; }
.c-esquina{ grid-area:esq; }
.c-interior{ grid-area:int; }
.c-interior img{ object-position:center 60%; }
.c-entrada{ grid-area:ent; }
.c-vidriera{ grid-area:vid; }
.collage-cap{ margin:14px 0 0; font-size:0.95rem; color:var(--steel); }
.collage-cap a{ color:var(--rust); font-weight:600; text-decoration:none; }
.collage-cap a:hover{ text-decoration:underline; }
@media (max-width:720px){
  .collage{
    grid-template-columns:1fr 1fr;
    grid-template-rows:300px 170px 170px;
    grid-template-areas:"esq esq" "int int" "ent vid";
  }
  .c-esquina img{ object-position:center 70%; }
}

footer .credit{ margin-top:14px; padding-top:12px; border-top:1px solid var(--line); font-size:0.8rem; color:var(--steel-light); }
footer .credit a{ color:var(--steel); font-weight:600; }
