/*
Theme Name: ALVACO Heritage
Theme URI: https://alvaco.co/
Author: ALVACO
Description: A responsive, custom WordPress theme for ALVACO | Alvarado Companies.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: alvaco-heritage
*/

:root {
  --slate: #526b78;
  --slate-dark: #18354b;
  --olive: #5e5e52;
  --espresso: #3a291f;
  --ivory: #f3eee4;
  --ivory-deep: #e8dfd1;
  --bronze: #a8794e;
  --ink: #122b3e;
  --text: #333733;
  --rule: rgba(243, 238, 228, 0.48);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto !important; width: auto; height: auto; margin: 10px; padding: 12px 18px;
  background: var(--espresso); color: var(--ivory); z-index: 10000;
}
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 4px; }
.site-shell { width: min(100%, 1600px); margin-inline: auto; }
.section-pad { padding: clamp(62px, 7vw, 110px) clamp(24px, 4vw, 64px); }

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  background: rgba(243, 238, 228, 0.97);
  border-bottom: 1px solid rgba(58, 41, 31, 0.12);
}
.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 14px clamp(22px, 3.2vw, 52px);
}
.custom-logo-link img { max-height: 64px; width: auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 16px; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 60px; height: 60px;
  border: 3px solid currentColor; border-radius: 50%;
  font: 700 38px/1 var(--serif);
}
.brand-type { display: grid; gap: 1px; }
.brand-name { font: 700 clamp(25px, 2.2vw, 39px)/1 var(--serif); letter-spacing: 0.13em; }
.brand-sub { color: var(--bronze); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: clamp(18px, 3vw, 48px); }
.primary-menu { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 42px); margin: 0; padding: 0; list-style: none; }
.primary-menu a, .partner-link {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.primary-menu a { position: relative; padding-block: 12px; }
.primary-menu a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 5px; height: 1px;
  background: var(--bronze); transition: right 180ms ease;
}
.primary-menu a:hover::after { right: 0; }
.partner-link { padding: 13px 18px; border: 1px solid var(--espresso); transition: 180ms ease; }
.partner-link:hover { background: var(--espresso); color: var(--ivory); }
.menu-toggle { display: none; border: 0; background: none; color: var(--ink); padding: 10px; cursor: pointer; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
  display: block; width: 26px; height: 2px; background: currentColor; content: ""; transition: 180ms ease;
}
.menu-toggle-bars::before { transform: translateY(-7px); }
.menu-toggle-bars::after { transform: translateY(5px); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(420px, 39.5%) 1fr; min-height: 610px; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(54px, 5.5vw, 92px) clamp(28px, 4vw, 64px); }
.eyebrow { margin: 0 0 14px; color: var(--bronze); font-size: 14px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; }
.hero h1, .story-copy h2, .section-title {
  margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em;
}
.hero h1 { max-width: 720px; font-size: clamp(43px, 4.25vw, 70px); line-height: 1.03; }
.hero-sub { margin: 20px 0 0; font-size: clamp(18px, 1.4vw, 23px); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px 38px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 25px;
  background: var(--espresso); color: var(--ivory); border: 1px solid var(--espresso);
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; transition: 180ms ease;
}
.button:hover { background: transparent; color: var(--espresso); }
.text-link { border-bottom: 1px solid var(--bronze); padding: 10px 0 4px; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.heritage-line { margin: 38px 0 0; padding-left: 23px; border-left: 2px solid var(--bronze); color: #4b4d49; font: italic 19px/1.3 var(--serif); }
.hero-media { position: relative; min-height: 560px; overflow: hidden; background: var(--slate); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Company portfolio */
.companies { background: var(--slate); color: var(--ivory); padding: 0 clamp(24px, 4vw, 58px) clamp(52px, 5vw, 76px); }
.companies-heading { display: flex; align-items: center; gap: 26px; transform: translateY(-4px); }
.companies-heading::before, .companies-heading::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.companies .section-title { flex: none; color: var(--ivory); font-size: clamp(38px, 4vw, 61px); }
.company-groups { display: grid; grid-template-columns: 1.45fr 0.7fr 1.3fr; gap: 0; margin-top: 28px; }
.company-group { padding: 0 clamp(18px, 3vw, 48px); border-right: 1px solid var(--rule); text-align: center; }
.company-group:first-child { padding-left: 0; }
.company-group:last-child { padding-right: 0; border-right: 0; }
.company-group h3 { margin: 0 0 22px; color: var(--ivory-deep); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.company-list { display: grid; grid-template-columns: repeat(var(--columns, 1), 1fr); gap: 0; }
.company-card { min-height: 74px; display: grid; align-content: center; padding: 10px 16px; border-right: 1px solid var(--rule); }
.company-card:last-child { border-right: 0; }
.company-card span { font-size: clamp(16px, 1.25vw, 21px); line-height: 1.15; letter-spacing: 0.08em; text-transform: uppercase; }
.company-card b { margin-top: 6px; font-size: 20px; font-weight: 400; transition: transform 180ms ease; }
.company-card:hover b { transform: translateX(5px); }

/* Story */
.story {
  position: relative;
  min-height: 370px;
  background: linear-gradient(90deg, var(--ivory) 0 76%, var(--ivory-deep) 76% 100%);
}
.story::after {
  content: "A";
  position: absolute;
  right: clamp(28px, 7vw, 120px);
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: clamp(110px, 13vw, 190px);
  aspect-ratio: 1;
  border: 3px solid rgba(18, 43, 62, 0.22);
  border-radius: 50%;
  color: rgba(18, 43, 62, 0.22);
  font: 700 clamp(68px, 8vw, 120px)/1 var(--serif);
}
.story-copy { max-width: 75%; padding: clamp(60px, 6vw, 96px) clamp(28px, 7vw, 115px); }
.story-copy h2 { max-width: 800px; font-size: clamp(35px, 3.6vw, 56px); line-height: 1.08; }
.story-rule { width: 36px; height: 2px; margin: 23px 0; background: var(--bronze); }
.story-copy p { max-width: 760px; margin: 0; font-size: 17px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--olive); color: var(--ivory); padding: 24px clamp(24px, 6vw, 110px); }
.principle { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 17px; min-height: 80px; padding: 8px clamp(18px, 4vw, 64px); border-right: 1px solid var(--rule); }
.principle:first-child { padding-left: 0; }
.principle:last-child { padding-right: 0; border-right: 0; }
.principle-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--ivory-deep); border-radius: 50%; font: 24px/1 var(--serif); }
.principle h3 { margin: 0; font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; }
.principle p { margin: 2px 0 0; color: var(--ivory-deep); font-size: 14px; }

/* Footer + inner pages */
.site-footer { background: var(--espresso); color: var(--ivory); }
.footer-inner { display: grid; grid-template-columns: 1.1fr 0.8fr 1.6fr; align-items: center; gap: 32px; padding: 28px clamp(24px, 3.5vw, 56px); }
.footer-brand .brand-lockup { color: var(--ivory); transform: scale(0.8); transform-origin: left center; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; }
.footer-menu { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 14px 30px; margin: 0; padding: 0; list-style: none; }
.footer-menu a { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.site-info { padding: 12px 24px; border-top: 1px solid rgba(243, 238, 228, 0.15); text-align: center; color: var(--ivory-deep); font-size: 12px; }
.content-area { min-height: 55vh; padding: 70px clamp(24px, 6vw, 100px); }
.content-area article { max-width: 900px; margin: auto; }
.entry-title { color: var(--ink); font: 500 clamp(40px, 5vw, 72px)/1.05 var(--serif); }

@media (max-width: 1180px) {
  .menu-toggle { display: block; }
  .header-actions { position: relative; }
  .site-navigation {
    display: none; position: absolute; top: 60px; right: 0; width: min(340px, 85vw);
    padding: 20px; background: var(--ivory); border: 1px solid rgba(58, 41, 31, 0.16); box-shadow: 0 18px 50px rgba(58, 41, 31, 0.16);
  }
  .site-navigation.is-open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-menu a { display: block; padding: 12px 6px; }
  .partner-link { display: none; }
  .hero { grid-template-columns: 46% 54%; }
  .company-groups { grid-template-columns: 1fr; gap: 32px; }
  .company-group { border-right: 0; border-bottom: 1px solid var(--rule); padding: 0 0 28px; }
  .company-group:last-child { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 820px) {
  .header-inner { min-height: 78px; }
  .brand-mark { width: 48px; height: 48px; font-size: 30px; }
  .brand-name { font-size: 25px; }
  .brand-sub { font-size: 8px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .hero-media { order: 2; min-height: 56vw; }
  .story { background: var(--ivory); }
  .story::after { display: none; }
  .story-copy { max-width: none; }
  .principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--rule); padding: 18px 0; }
  .principle:last-child { border-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-menu { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .hero h1 { font-size: 42px; }
  .company-list { grid-template-columns: 1fr !important; }
  .company-card { border-right: 0; border-bottom: 1px solid rgba(243, 238, 228, 0.24); }
  .company-card:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
