/* ====================================================================
   Kodo Mecánica Móvil — custom styles
   Design system: "Orden de Trabajo" (work order / garage ticket).
   Tailwind (CDN) handles layout/utilities; this file covers the
   signature ticket/stamp components, type rhythm, and motion.
   ==================================================================== */

:root {
  --ink: #1b1b1d;
  --signal: #d22730;
  --signal-deep: #9c1c22;
  --steel: #4b5560;
  --paper: #fafaf8;
  --chalk: #eef0f1;
  --amber: #f2a93b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
}

/* Offset anchored sections so the sticky header doesn't cover the heading */
main section[id] {
  scroll-margin-top: 88px;
}

::selection {
  background: var(--signal);
  color: #fff;
}

/* Visible keyboard focus everywhere, brand-colored, never suppressed */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------------
   Eyebrow label — mono, tracked, with a live "dispatch" dot
   --------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--signal);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .eyebrow__dot {
    animation: pulse-dot 2.4s ease-in-out infinite;
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ---------------------------------------------------------------------
   Stamp button — replaces the generic SaaS pill button.
   Print-style corner registration marks + a rubber-stamp press feel.
   --------------------------------------------------------------------- */
.btn-stamp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  background: var(--signal);
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-stamp:hover {
  background: var(--signal-deep);
}

.btn-stamp:active {
  transform: scale(0.96);
}

.btn-stamp::before,
.btn-stamp::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease;
}

.btn-stamp::before {
  top: 4px;
  left: 4px;
  border-right: none;
  border-bottom: none;
}

.btn-stamp::after {
  bottom: 4px;
  right: 4px;
  border-left: none;
  border-top: none;
}

.btn-stamp:hover::before {
  transform: translate(-2px, -2px);
}

.btn-stamp:hover::after {
  transform: translate(2px, 2px);
}

.btn-stamp--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-stamp--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn-stamp--on-dark {
  color: var(--ink);
}

.btn-stamp--sm {
  padding: 0.55rem 1.4rem;
  font-size: 0.68rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn-stamp,
  .btn-stamp::before,
  .btn-stamp::after {
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Ticket — the signature card. A perforated-edge garage work order.
   Reused for the hero, testimonials, and the contact form.
   --------------------------------------------------------------------- */
.ticket {
  position: relative;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  border: 1px solid rgba(27, 27, 29, 0.1);
  border-radius: 6px;
  box-shadow: 0 20px 40px -20px rgba(27, 27, 29, 0.25);
  padding-top: 1.75rem;
}

.ticket::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 8px 5px, transparent 4.5px, #fff 4.5px);
  background-size: 18px 10px;
  background-repeat: repeat-x;
}

.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px dashed rgba(27, 27, 29, 0.18);
  font-family: "IBM Plex Mono", monospace;
}

.ticket__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.ticket__label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.ticket__value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

/* Checklist rows inside the hero ticket */
.ticket-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(27, 27, 29, 0.12);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  color: var(--steel);
}

.ticket-item:last-child {
  border-bottom: none;
}

.ticket-item__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1.5px solid var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-item__check {
  width: 12px;
  height: 12px;
  stroke: var(--signal);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 0.35s ease;
}

.ticket-item.is-checked {
  color: var(--ink);
}

.ticket-item.is-checked .ticket-item__box {
  border-color: var(--signal);
}

.ticket-item.is-checked .ticket-item__check {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ticket-item__check {
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Ink stamp — circular seal used for trust marks (Why choose us) and
   the "approved" mark on testimonials. Slight hand-stamped rotation.
   --------------------------------------------------------------------- */
.stamp {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  border: 2px solid var(--signal);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  flex-shrink: 0;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  border: 1px dashed rgba(210, 39, 48, 0.55);
}

.stamp--sm {
  width: 2.75rem;
  height: 2.75rem;
  border-width: 1.5px;
  transform: rotate(-8deg);
}

.stamp--sm::before {
  inset: 3px;
}

/* ---------------------------------------------------------------------
   Service ticket rows (red section) — itemized checklist, not icon tiles
   --------------------------------------------------------------------- */
.svc-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

.svc-row:last-child {
  border-bottom: none;
}

.svc-row__code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  width: 3.4rem;
}

/* ---------------------------------------------------------------------
   Process strip ("¿Cómo lo hacemos?") — dashed route line linking stamps
   --------------------------------------------------------------------- */
.route-line {
  position: relative;
}

.route-line::before {
  content: "";
  position: absolute;
  z-index: 0;
  border: 1px dashed rgba(75, 85, 96, 0.35);
}

@media (min-width: 768px) {
  .route-line::before {
    top: 1.75rem;
    left: 8%;
    right: 8%;
    height: 0;
  }
}

@media (max-width: 767px) {
  .route-line::before {
    top: 0;
    bottom: 0;
    left: 1.75rem;
    width: 0;
  }
}

/* ---------------------------------------------------------------------
   Scroll reveal — one disciplined pattern, used site-wide
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Testimonial carousel: hide the scrollbar but keep native swipe/scroll */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Nav link underline draws in on hover, like a stamp pressed and dragged */
.nav-link {
  position: relative;
  padding-bottom: 3px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  transition: right 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  right: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-link::after {
    transition: none;
  }
}

/* Mobile nav links get a small active underline on tap/focus */
.mobile-link {
  border-bottom: 1px solid transparent;
}

.mobile-link:active,
.mobile-link:focus-visible {
  border-color: var(--signal);
}

/* Native <select> arrow, drawn manually since we strip default styling */
select.field-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234B5560'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%234B5560' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
  padding-right: 24px;
}

select.field-input option {
  color: var(--ink);
}

/* Ticket-style form fields: mono field name above a dashed underline */
.field-label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.35rem;
}

.field-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px dashed rgba(27, 27, 29, 0.25);
  background: transparent;
  padding: 0.4rem 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  outline: none;
  transition: border-color 0.15s ease;
}

.field-input::placeholder {
  color: rgba(75, 85, 96, 0.5);
}

.field-input:focus {
  border-color: var(--signal);
  border-style: solid;
}

/* Decorative red "blob" behind the hero / contact van illustration */
.hero-blob {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 130%;
  aspect-ratio: 1 / 1;
  max-width: 640px;
  transform: translate(-50%, -50%);
  background: var(--signal);
  border-radius: 42% 58% 63% 37% / 45% 41% 59% 55%;
  opacity: 0.18;
}

.hero-blob--dark {
  opacity: 0.22;
}
