/* El Jordy Barbershop — demo conceptual Ingresify
   Sistema visual: "la carta del barbero" — editorial, cálido, tipográfico.
   Mobile-first. Breakpoints de referencia: 360 / 375 / 390 / 430 / 768 / 1024 / 1280 / 1440 */

:root {
  --cream: #f1e8d8;
  --cream-2: #e8dcc4;
  --paper-edge: #ddceac;
  --ink: #1c1611;
  --ink-soft: #4a3f33;
  --ink-faint: #6a5d4c;
  --copper: #a3691a;
  --copper-dark: #7a4716;
  --copper-soft: #d3a24c;
  --gold: #cfa044;
  --line: rgba(28, 22, 17, 0.16);
  --line-strong: rgba(28, 22, 17, 0.32);

  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.25rem;
  --space-2xl: 4.25rem;

  --container: 68rem;
  --radius-sm: 3px;
  --radius-md: 6px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding-inline: 40px;
  }
}

:focus-visible {
  outline: 2px solid var(--copper-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* Paper grain texture, applied once on body via a fixed pseudo-layer (cheap SVG noise) */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
}

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-dark);
}

h1,
.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.15rem, 8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2,
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 5.5vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
}

h3,
.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
}

.lede {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 38em;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-bottom: var(--space-lg);
}

.section-head .lede {
  margin-top: var(--space-2xs);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
}

.btn-primary:hover {
  background: var(--copper-dark);
  border-color: var(--copper-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(28, 22, 17, 0.04);
}

.btn-sm {
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: 0.88rem;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 232, 216, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--copper-dark);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
}

.brand-word span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}

.nav-desktop {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .btn-primary {
  display: none;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.menu-toggle:hover {
  background: rgba(28, 22, 17, 0.06);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-mobile {
  position: fixed;
  inset: 68px 0 0 0;
  background: var(--cream);
  z-index: 99;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  overflow-y: auto;
}

.nav-mobile.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.nav-mobile .container {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.nav-mobile .btn {
  width: 100%;
}

body.no-scroll {
  overflow: hidden;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
  }

  .nav-desktop a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 0.4rem 0.1rem;
    border-bottom: 1px solid transparent;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
  }

  .nav-desktop a:hover {
    color: var(--ink);
    border-color: var(--copper);
  }

  .header-actions .btn-primary {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none;
  }
}

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

.hero {
  position: relative;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero-mark {
  width: 36px;
  height: 46px;
  color: var(--copper);
  margin-bottom: var(--space-sm);
}

.hero h1 {
  max-width: 14ch;
}

.hero .lede {
  margin-top: var(--space-sm);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--space-md);
}

.hero-actions .btn {
  width: 100%;
}

.hero-photo {
  margin: 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
}

.hero-facts {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.hero-fact dt {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--copper-dark);
}

.hero-fact dd {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }

  .hero-actions .btn {
    width: auto;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }

  .hero-intro,
  .hero-photo {
    flex: 1 1 0;
    min-width: 0;
  }

  .hero-fact dt {
    font-size: 1.6rem;
  }

  .hero-fact dd {
    font-size: 0.82rem;
  }
}

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

section {
  padding-block: var(--space-2xl);
  position: relative;
}

.section-alt {
  background: var(--cream-2);
  border-block: 1px solid var(--line);
}

/* ---------- Servicios ---------- */

.service-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.service-group-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--line-strong);
}

.service-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.6rem;
  row-gap: 0.3rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

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

.service-num {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-faint);
  flex-shrink: 0;
  width: 1.6em;
}

.service-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.5rem;
  flex: 1 1 140px;
  min-width: 0;
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  flex-shrink: 1;
  min-width: 0;
}

.service-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-dark);
  border: 1px solid var(--copper-soft);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  flex-shrink: 0;
}

.service-leader {
  flex: 1 1 20px;
  border-bottom: 1px dotted var(--line-strong);
  min-width: 12px;
  transform: translateY(-0.3em);
}

.service-price {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.services-note {
  margin-top: var(--space-lg);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.services-cta {
  margin-top: var(--space-lg);
}

/* ---------- Trabajo real ---------- */

.work-gallery {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: var(--space-2xs);
  margin: 0 -20px;
  padding-inline: 20px;
  -webkit-overflow-scrolling: touch;
}

.work-card {
  flex: 0 0 auto;
  width: 70%;
  max-width: 320px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--cream);
}

.work-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (min-width: 640px) {
  .work-card {
    width: 42%;
  }
}

@media (min-width: 900px) {
  .work-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin: 0;
    padding-inline: 0;
  }

  .work-card {
    width: auto;
  }
}

@media (min-width: 1200px) {
  .work-gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ---------- Equipo ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.section-alt .team-card {
  background: var(--cream-2);
}

.team-photo {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

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

@media (min-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .team-card {
    align-items: center;
    text-align: center;
  }

  .team-photo {
    width: 84px;
    height: 84px;
  }
}

/* ---------- Reputación ---------- */

.rep-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-md);
}

.rep-score {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.rep-score strong {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.2rem);
  font-weight: 600;
  line-height: 1;
}

.rep-score span {
  font-size: 1.1rem;
  color: var(--copper-soft);
}

.rep-detail {
  color: rgba(241, 232, 216, 0.72);
  max-width: 34em;
}

.rep-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rep-actions .btn-ghost {
  border-color: rgba(241, 232, 216, 0.35);
  color: var(--cream);
}

.rep-actions .btn-ghost:hover {
  border-color: var(--cream);
  background: rgba(241, 232, 216, 0.08);
}

.rep-actions .btn-primary {
  background: var(--copper-soft);
  border-color: var(--copper-soft);
  color: var(--ink);
}

.rep-actions .btn-primary:hover {
  background: var(--cream);
  border-color: var(--cream);
}

@media (min-width: 640px) {
  .rep-panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .rep-actions {
    flex-direction: row;
    flex-shrink: 0;
  }

  .rep-actions .btn {
    width: auto;
  }
}

/* ---------- Ubicación ---------- */

.location-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.location-info dl {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.location-info dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.location-info dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.hours-table {
  margin-top: var(--space-md);
  border-collapse: collapse;
  width: 100%;
  max-width: 24em;
  font-size: 0.9rem;
}

.hours-table caption {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-xs);
}

.hours-table tr {
  border-bottom: 1px solid var(--line);
}

.hours-table th,
.hours-table td {
  padding: 0.4rem 0;
  font-weight: 400;
  text-align: left;
}

.hours-table th {
  font-family: var(--font-display);
  font-weight: 500;
}

.hours-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hours-note {
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: var(--ink-faint);
  max-width: 30em;
}

.location-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.location-photo {
  margin: 0;
}

.location-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
}

@media (min-width: 640px) {
  .location-actions {
    flex-direction: row;
  }

  .location-actions .btn {
    width: auto;
  }
}

@media (min-width: 900px) {
  .location-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
  }

  .location-info {
    max-width: 26em;
    flex-shrink: 0;
  }

  .location-photo {
    flex: 1 1 0;
    min-width: 0;
  }
}

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

.site-footer {
  padding-block: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--line-strong);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}

.footer-brand .brand-word {
  font-size: 1.3rem;
}

.footer-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.footer-links a:hover {
  color: var(--copper-dark);
  border-color: var(--copper-dark);
}

.footer-note {
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 52em;
}

@media (min-width: 900px) {
  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .nav-mobile,
  .menu-toggle svg {
    transition: none !important;
  }
}
