/* Ayni Energy — site stylesheet
   Palette: signal red #C8102E, charcoal #1A1A1A, warm off-white #FAF7F4 */

:root {
  --red: #C8102E;
  --red-dark: #A00D25;
  --charcoal: #1A1A1A;
  --body-text: #2E2C2A;
  --muted: #6E6963;
  --paper: #FAF7F4;
  --white: #FFFFFF;
  --line: #E6E0D8;
  --footer-text: #B9B3AC;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--body-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

::selection { background: var(--red); color: var(--white); }

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--charcoal); line-height: 1.15; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(26, 26, 26, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--red);
  white-space: nowrap;
}

.logo span {
  color: var(--charcoal);
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 15px;
  margin-left: 8px;
  vertical-align: 2px;
}

.logo:hover { color: var(--red-dark); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.main-nav a {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  padding: 6px 0;
}

.main-nav a:hover { color: var(--red); }

.main-nav a.active {
  color: var(--red);
  border-bottom: 2px solid var(--red);
}

.header-actions { display: flex; align-items: center; gap: 18px; }

.lang-switch {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 12px;
}

.lang-switch:hover { color: var(--red); border-color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 15px 30px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--red-dark); color: var(--white); }

.btn-light { background: var(--white); color: var(--red); }
.btn-light:hover { background: var(--paper); color: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--charcoal); }

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

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.20) 0%, rgba(26, 26, 26, 0.68) 100%);
}

.hero-inner { position: relative; padding: 96px 0 88px; width: 100%; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  margin: 18px 0 22px;
  max-width: 720px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 34px;
}

.hero .kicker { color: var(--white); }
.hero .kicker::before { background: var(--red); }

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.page-hero { min-height: 380px; }
.page-hero .hero-inner { padding: 80px 0 64px; }

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

section { padding: 92px 0; }

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--red);
}

.kicker::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.section-head { max-width: 760px; margin-bottom: 52px; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  margin: 14px 0 16px;
}

.section-head p { color: var(--muted); font-size: 1.05rem; }

.display-title {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 7vw, 4.8rem);
  font-weight: 800;
  color: var(--red);
  line-height: 0.98;
  margin: 14px 0 24px;
}

.bg-white { background: var(--white); }
.bg-charcoal { background: var(--charcoal); }

/* ---------- Cards ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.card-media { overflow: hidden; height: 215px; }

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-media img { transform: scale(1.045); }

.card-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }

.card-body h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; }

.card-body p { font-size: 0.95rem; color: var(--muted); flex: 1; }

.more-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.more-link::after { content: " \2192"; }

/* ---------- Split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-media img { width: 100%; height: 480px; object-fit: cover; }

.split-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; margin: 14px 0 18px; }

.split-text p { margin-bottom: 16px; }

.split-text .btn { margin-top: 12px; }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 46px 0;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1.1;
}

.stat span {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Service detail sections ---------- */

.svc { padding: 76px 0; border-top: 1px solid var(--line); }

.svc:first-of-type { border-top: none; }

.svc-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.12em;
}

.scope-list { list-style: none; margin-top: 20px; columns: 2; column-gap: 40px; }

.scope-list li {
  font-size: 0.95rem;
  padding: 7px 0 7px 24px;
  position: relative;
  break-inside: avoid;
}

.scope-list li::before {
  content: "\2014";
  color: var(--red);
  position: absolute;
  left: 0;
}

/* ---------- Phases (capabilities) ---------- */

.phase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.phase {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px 32px 38px;
}

.phase-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--red);
  opacity: 0.28;
  line-height: 1;
}

.phase h3 { font-size: 1.2rem; font-weight: 700; margin: 14px 0 10px; }

.phase p { font-size: 0.95rem; color: var(--muted); }

/* ---------- CTA band ---------- */

.cta-band { background: var(--red); color: var(--white); padding: 78px 0; }

.cta-band h2 {
  color: var(--white);
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  max-width: 640px;
  margin-bottom: 14px;
}

.cta-band p { max-width: 560px; color: rgba(255, 255, 255, 0.92); margin-bottom: 30px; }

/* ---------- News ---------- */

.news-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 46px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.news-item:first-of-type { border-top: none; }

.news-item img { width: 100%; height: 190px; object-fit: cover; }

.news-date {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.news-item h3 { font-size: 1.35rem; font-weight: 700; margin: 10px 0 14px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px 28px;
}

.contact-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}

.contact-card p, .contact-card a { font-size: 1.02rem; color: var(--charcoal); font-weight: 500; }

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

.map-wrap { margin-top: 56px; border: 1px solid var(--line); }

.map-wrap iframe { width: 100%; height: 400px; border: 0; display: block; }

.quote-box {
  background: var(--charcoal);
  color: var(--footer-text);
  padding: 44px 44px 48px;
  margin-top: 56px;
}

.quote-box h3 { color: var(--white); font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }

.quote-box ul { list-style: none; margin: 18px 0 28px; columns: 2; column-gap: 40px; }

.quote-box li { padding: 5px 0 5px 22px; position: relative; font-size: 0.95rem; break-inside: avoid; }

.quote-box li::before { content: "\2014"; color: var(--red); position: absolute; left: 0; }

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

.site-footer { background: var(--charcoal); color: var(--footer-text); padding: 72px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
}

.footer-logo em { font-style: normal; color: var(--red); }

.footer-grid p { font-size: 0.92rem; margin-top: 14px; max-width: 300px; }

.footer-grid h4 {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.footer-grid ul { list-style: none; }

.footer-grid li { margin-bottom: 10px; }

.footer-grid a { color: var(--footer-text); font-size: 0.94rem; }

.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.footer-bottom a { color: var(--footer-text); }
.footer-bottom a:hover { color: var(--white); }

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

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-media img { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-media { order: -1; }
  .split-media img { height: 340px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 20px; }
  .news-item img { height: 240px; }
}

@media (max-width: 720px) {
  section { padding: 64px 0; }

  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(26, 26, 26, 0.08);
  }

  .main-nav.open { display: block; }

  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 24px; }

  .main-nav li { width: 100%; border-bottom: 1px solid var(--line); }

  .main-nav li:last-child { border-bottom: none; }

  .main-nav a { display: block; padding: 15px 0; }

  .main-nav a.active { border-bottom: none; }

  .header-cta { display: none; }

  .grid-3, .grid-2, .phase-grid { grid-template-columns: 1fr; }

  .scope-list, .quote-box ul { columns: 1; }

  .hero { min-height: 66vh; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}
