/* =========================================================
   AURE Ingeniería · Portfolio Consultoría & BIM
   Stack: HTML + CSS (+ JS mínimo)
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --navy: #1f3a5f;
  --navy-800: #17304f;
  --navy-900: #162b47;
  --accent: #c9a227;
  --accent-600: #a8871c;
  --gold-lt: #e8c961;
  --blue-soft: #7fb2ff;

  --ink: #172538;
  --body: #45566b;
  --muted: #6b7c93;
  --line: #e5e9f0;

  --bg: #ffffff;
  --bg-alt: #f5f7fb;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .06);
  --shadow: 0 18px 40px -20px rgba(14, 42, 71, .28);

  --container: 1140px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;

  --header-h: 74px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.22rem; font-weight: 600; }

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

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

.accent { color: var(--accent-600); }
em { color: var(--ink); font-style: italic; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-600);
  margin: 0 0 .9rem;
}
.eyebrow-light { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .98rem;
  padding: .82rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 12px 26px -12px rgba(201, 162, 39, .8);
}
.btn-primary:hover { background: var(--gold-lt); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-wrapper {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark { display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 700;
}
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .96rem;
  color: var(--ink);
  padding: .5rem .95rem;
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--accent-600); }
.nav-link.active { color: var(--accent-600); }
.nav-cta {
  background: var(--navy);
  color: #fff !important;
  margin-left: .35rem;
}
.nav-cta:hover { background: var(--navy-800); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .28s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--navy);
  color: #eaf1fb;
  padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(4rem, 8vw, 6rem);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(201, 162, 39, .16), transparent 60%),
    linear-gradient(90deg, rgba(6, 13, 24, .92) 0%, rgba(6, 13, 24, .82) 30%, rgba(6, 13, 24, .5) 55%, rgba(6, 13, 24, .18) 78%, rgba(6, 13, 24, 0) 96%),
    linear-gradient(180deg, rgba(6, 13, 24, .35) 0%, rgba(6, 13, 24, 0) 22%, rgba(6, 13, 24, 0) 65%, rgba(6, 13, 24, .45) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(900px 500px at 70% 10%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(900px 500px at 70% 10%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 3; max-width: 780px; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }
.hero h1 .accent { color: var(--gold-lt); }
.hero .eyebrow { color: var(--gold-lt); text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.hero-lead {
  color: #eaf1fb;
  font-size: 1.12rem;
  max-width: 620px;
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 3.2rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 1.6rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
.hero-stats span { color: #cdd9ec; font-size: .84rem; margin-top: .35rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.blueprint {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-text h2 { max-width: 15ch; }

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem 1.2rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}
.skill-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink);
  font-weight: 500;
  font-size: .96rem;
}
.skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.about-founder {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .96rem;
  color: var(--body);
}
.about-founder strong { color: var(--ink); }

/* ---------- Services (cards) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 14px;
  background: linear-gradient(160deg, #f7efd6, #efe0b3);
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.project {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.project-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(140px 140px at 30% 30%, rgba(201, 162, 39, .3), transparent 70%),
    radial-gradient(180px 180px at 80% 80%, rgba(127, 178, 255, .22), transparent 70%),
    linear-gradient(180deg, rgba(10, 22, 40, .35), transparent 40%);
}
.thumb-1 { background-color: #123152; }
.thumb-2 { background-color: #0f2c49; }
.thumb-3 { background-color: #16385c; }
.thumb-4 { background-color: #0d2740; }
.thumb-5 { background-color: #14304f; }
.thumb-6 { background-color: #11304f; }

.project-tag {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--accent);
  padding: .32rem .7rem;
  border-radius: 999px;
}
.project-body { padding: 1.4rem 1.5rem 1.6rem; }
.project-body h3 { margin-bottom: .4rem; }
.project-body p { color: var(--muted); font-size: .96rem; margin-bottom: 1rem; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-meta li {
  font-size: .76rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: .25rem .6rem;
  border-radius: 999px;
}

/* ---------- Clients band ---------- */
.clients-band { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.clients-label {
  text-align: center;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.8rem;
}
.clients-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 2.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.clients-list li {
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .18s ease;
}
.clients-list li:hover { color: var(--navy); }

/* ---------- Contact ---------- */
.section-dark {
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(201, 162, 39, .14), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #dbe6f5;
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-intro h2 { color: #fff; }
.contact-intro p { color: #b9cae1; max-width: 44ch; }

.contact-list { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; }
.contact-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  font-size: 1.1rem;
}
.contact-list a { color: #eaf1fb; border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.contact-list a:hover { border-color: var(--accent); }

.contact-form {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-sans);
  font-size: .84rem;
  font-weight: 500;
  color: #cfdcef;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm);
  padding: .8rem .95rem;
  transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #7f92ad; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, .1);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { margin: 0; font-size: .9rem; min-height: 1.2em; color: var(--accent); }

/* Two-column field rows */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

/* Select (matches input styling) */
.field select {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm);
  padding: .8rem 2.2rem .8rem .95rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a227' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  transition: border-color .15s ease, background-color .15s ease;
}
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, .1);
}
.field select option { color: #17304f; background: #fff; }

/* Privacy checkbox row */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .86rem;
  line-height: 1.5;
  color: #b9cae1;
  cursor: pointer;
}
.field-check input {
  width: auto;
  margin: .2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.field-check a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.field-check a:hover { border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #9fb3ce;
  padding: 1.6rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-inner p { margin: 0; font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer nav a { font-size: .9rem; transition: color .15s ease; }
.site-footer nav a:hover { color: var(--accent); }
.back-top {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #eaf1fb;
  transition: background .15s ease;
}
.back-top:hover { background: var(--accent); color: var(--navy); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .about-visual { order: 2; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s ease;
  }
  .primary-nav.open { max-height: 420px; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem 22px 1.2rem;
  }
  .nav-link { padding: .85rem .4rem; border-radius: 8px; border-bottom: 1px solid var(--line); }
  .primary-nav li:last-child .nav-link { border-bottom: 0; }
  .nav-cta { margin: .6rem 0 0; text-align: center; }

  .contact-layout { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .cards-grid,
  .projects-grid { grid-template-columns: 1fr; }
  .skill-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .hero-actions .btn { flex: 1; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
