/* Torre Almenada de San Juan — site styles */

:root {
  --orange: #F7931D;
  --orange-deep: #c66e0c;
  --orange-soft: #fff1dc;
  --black: #1f1f1f;
  --charcoal: #2a2a2a;
  --ink: #161412;
  --muted: #5c564e;
  --paper: #f3efe6;
  --cream: #faf7f1;
  --white: #ffffff;
  --line: #d8d0c4;
  --line-strong: #c4b9a8;
  --header-h: 4.75rem;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --shadow: 0 18px 40px rgba(22, 20, 18, 0.08);
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: var(--ink);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--orange-deep);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--orange);
  color: var(--black);
  padding: 0.55rem 0.85rem;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

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

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

h1,
h2,
h3,
.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

h3 {
  font-size: 1.55rem;
  letter-spacing: 0.06em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Header
   -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--charcoal);
  color: var(--white);
  border-bottom: 3px solid var(--orange);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo img {
  width: min(220px, 58vw);
  height: auto;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--sans);
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--orange);
}

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

.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: var(--black) !important;
  padding: 0.65rem 0.95rem;
  text-decoration: none !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 0;
}

.btn-phone-compact {
  padding: 0.55rem 0.65rem;
}

.btn-phone-compact .phone-num {
  display: none;
}

.btn-phone:hover {
  background: #ffaa3d;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  padding: 0.9rem 1.25rem;
}

.btn-primary {
  background: var(--orange);
  color: var(--black);
}

.btn-primary:hover {
  background: #ffaa3d;
  color: var(--black);
}

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

.btn-ghost:hover {
  background: var(--ink);
  color: var(--white);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .site-nav {
    display: flex;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--charcoal);
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .site-nav.is-open {
    transform: none;
  }

  .site-nav a {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.15rem;
  }

  .site-nav .btn-phone {
    width: 100%;
    justify-content: center;
    margin-top: 1.25rem;
  }
}

@media (min-width: 768px) {
  .nav-toggle,
  .btn-phone-compact {
    display: none;
  }

  .site-nav {
    display: flex;
  }
}

/* Hero collage
   -------------------------------------------------- */
.hero-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--charcoal);
}
.hero-collage figure { margin: 0; }
.hero-collage img {
  width: 100%;
  height: min(46vw, 280px);
  object-fit: cover;
}
@media (min-width: 800px) {
  .hero-collage { grid-template-columns: repeat(4, 1fr); }
  .hero-collage img { height: min(32vw, 420px); }
}

.page-hero.contact-banner {
  min-height: 260px;
  padding: clamp(3rem, 8vw, 5.5rem) 0 2.5rem;
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.35), rgba(31, 31, 31, 0.72)),
    url("../img/bg-contacto.png") center / cover no-repeat;
  color: var(--white);
}
.page-hero.contact-banner .eyebrow { color: var(--orange); }
.page-hero.contact-banner h1 { color: var(--white); }
.page-hero.contact-banner p { color: #f3eee6; }

/* About
   -------------------------------------------------- */
.about {
  padding: clamp(3rem, 8vw, 6.5rem) 0;
}

.about-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

.about-copy .lead {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 38rem;
}

.about-copy p {
  max-width: 40rem;
  color: var(--ink);
}

.about-copy a {
  color: var(--orange-deep);
  font-weight: 600;
  font-family: var(--sans);
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.about-photo {
  margin: 0;
  position: relative;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(12%);
}

.about-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 36%;
  height: 36%;
  border-right: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  pointer-events: none;
  transform: translate(10px, 10px);
}

@media (min-width: 880px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
  }
}

/* Services
   -------------------------------------------------- */
.services {
  padding: clamp(3rem, 7vw, 6rem) 0 4rem;
  background: var(--cream);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 2rem;
  max-width: 40rem;
}

.service-grid {
  display: grid;
  gap: 1.25rem;
}

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

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
}

.service-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.service-body {
  padding: 1.2rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.service-index {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--orange-deep);
  font-weight: 600;
}

.service-body p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Projects
   -------------------------------------------------- */
.projects {
  padding: 3.5rem 0 4rem;
  background: var(--charcoal);
  color: var(--white);
}

.projects .eyebrow {
  color: var(--orange);
}

.projects h2 {
  margin-bottom: 1.5rem;
}

.project-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  margin-inline: calc(var(--gutter) * -0.15);
}

.project-strip a,
.project-strip figure {
  margin: 0;
  scroll-snap-align: start;
}

.project-strip img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

@media (min-width: 900px) {
  .project-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }

  .project-strip img {
    height: 240px;
  }
}

/* Contact page
   -------------------------------------------------- */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
}

.page-hero p {
  max-width: 38rem;
  margin-top: 1rem;
}

.contact-cards {
  display: grid;
  gap: 1rem;
  margin: 0 0 2.5rem;
}

@media (min-width: 700px) {
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem 1.2rem 1.35rem;
}

.contact-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.contact-card a,
.contact-card p,
.contact-card address {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
}

.contact-card a {
  display: block;
}

.contact-card a:hover {
  color: var(--orange-deep);
}

.map-block {
  margin: 0 0 2.75rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.map-block iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  height: min(420px, 62vw);
  border: 0;
  background: #e8e2d6;
}

.form-block {
  padding: 0 0 4.5rem;
}

.form-block h2 {
  margin-bottom: 0.75rem;
}

.form-block > .wrap > p {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 800px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form .full {
    grid-column: 1 / -1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  font: inherit;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 0.75rem 0.8rem;
  width: 100%;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 0;
  border-color: var(--orange);
  background: var(--white);
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer
   -------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: #ece7de;
}

.footer-main {
  display: grid;
  gap: 2rem;
  padding: 2.75rem 0 2.25rem;
}

@media (min-width: 800px) {
  .footer-main {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}

.footer-brand img {
  width: min(280px, 80vw);
}

.footer-meta h2 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  color: var(--white);
}

.footer-meta address {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.9rem;
}

.footer-meta a {
  color: #ece7de;
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--orange);
}

.footer-phones,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-family: var(--sans);
  margin-bottom: 0.85rem;
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}

.socials img {
  width: 22px;
  height: 22px;
}

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: #b8b0a4;
}

.footer-credits {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-credits img {
  height: 22px;
  width: auto;
  opacity: 0.85;
}

/* WhatsApp
   -------------------------------------------------- */
.whatsapp {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: #1fad4f;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.whatsapp:hover {
  color: #fff;
  background: #169443;
}

.whatsapp svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: currentColor;
}

/* Utilities
   -------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

  .service-card,
  .nav-toggle span,
  .site-nav {
    transition: none;
  }
}
