/* AVCI GLOBAL HOLDINGS LLC — site styles
   Direction: quiet, editorial, "annual report" — ivory paper, deep navy ink, one brass accent. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --paper-2: #ebe6da;
  --ink: #0b1a30;
  --ink-2: #1c2c45;
  --ink-soft: #4b5a70;
  --line: rgba(11, 26, 48, 0.14);
  --line-strong: rgba(11, 26, 48, 0.32);
  --brass: #b3894f;
  --brass-soft: #d5b98a;
  --white: #fbf9f4;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Manrope", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
::selection { background: var(--brass-soft); color: var(--ink); }

/* Paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.1 0 0 0 0 0.19 0 0 0 0.06 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
.page { position: relative; z-index: 1; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 500; letter-spacing: 0.02em;
  font-size: 15px; text-transform: uppercase;
}
.brand .mark {
  width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1;
}
.brand small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em; color: var(--ink-soft); font-weight: 600; }
.nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.nav a { position: relative; padding: 6px 0; color: var(--ink-2); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 8px 14px; font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
    cursor: pointer;
  }
  .nav.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; left: 0; right: 0; top: 72px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--white);
  background: var(--ink);
  min-height: min(88vh, 820px);
  display: grid; align-items: end;
}
.hero .bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("img/earth-night.jpg") center 30% / cover no-repeat;
  transform: scale(1.06);
  animation: heroDrift 18s var(--ease) forwards;
}
.hero .veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,26,48,.35) 0%, rgba(11,26,48,.55) 45%, rgba(11,26,48,.92) 100%),
    radial-gradient(60% 50% at 80% 20%, rgba(179,137,79,.18), transparent 70%);
}
.hero .wrap {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end;
  padding-top: 120px; padding-bottom: 64px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 700;
  color: var(--brass-soft);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--brass); }
.hero h1 {
  margin: 22px 0 0;
  font-family: var(--serif); font-weight: 300; letter-spacing: -0.015em;
  font-size: clamp(40px, 6.6vw, 84px); line-height: 1.02;
  font-variation-settings: "opsz" 144;
  max-width: 14ch;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--brass-soft); }
.hero p.lead {
  margin: 26px 0 0; max-width: 54ch;
  font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: rgba(251,249,244,.82);
}
.hero-meta {
  display: grid; gap: 14px; text-align: right;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: rgba(251,249,244,.62);
}
.hero-meta strong { display: block; color: var(--white); font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.hero-meta > div { padding-top: 12px; border-top: 1px solid rgba(251,249,244,.22); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 96px; }
  .hero-meta { text-align: left; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .hero-meta strong { font-size: 20px; }
}
@keyframes heroDrift { to { transform: scale(1); } }

/* Reveal on load */
.hero [data-in] { opacity: 0; transform: translateY(18px); animation: rise 1.1s var(--ease) forwards; }
.hero [data-in="1"] { animation-delay: .1s }
.hero [data-in="2"] { animation-delay: .25s }
.hero [data-in="3"] { animation-delay: .4s }
.hero [data-in="4"] { animation-delay: .6s }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.section-head {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.num {
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px; padding-top: 10px;
}
.num::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.section h2 {
  margin: 0; font-family: var(--serif); font-weight: 300; letter-spacing: -0.01em;
  font-size: clamp(30px, 3.8vw, 48px); line-height: 1.12; max-width: 20ch;
  font-variation-settings: "opsz" 96;
}
.section h2 em { font-style: italic; color: var(--brass); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: 14px; } }

/* Overview */
.overview { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.overview .cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; }
.overview p { margin: 0 0 18px; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.overview p.big {
  font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; color: var(--ink);
  font-variation-settings: "opsz" 48;
}
.facts { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--ink-soft); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; padding-top: 4px; }
.facts dd { margin: 0; color: var(--ink); }
@media (max-width: 960px) { .overview { grid-template-columns: 1fr; } .overview .cols { grid-template-columns: 1fr; gap: 28px; } }

/* Activities — asymmetric ledger */
.ledger { border-top: 1px solid var(--line-strong); }
.row {
  display: grid; grid-template-columns: 90px 1.1fr 1.4fr; gap: 32px; align-items: start;
  padding: 34px 0; border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--white) 55%, transparent); }
.row .idx { font-family: var(--serif); font-size: 30px; font-weight: 300; color: var(--brass); line-height: 1; padding-top: 4px; }
.row h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.row h3 small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.row p { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.row ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.row li { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; gap: 12px; } .row .idx { font-size: 22px; } }

/* Portfolio */
.portfolio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  position: relative; display: block;
  background: var(--white); border: 1px solid var(--line);
  padding: 28px 28px 26px; min-height: 210px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 14px;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 50px -30px rgba(11,26,48,.35); }
.card .tag { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--brass); }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.01em; }
.card p { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.card .link { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--ink); display: inline-flex; gap: 10px; align-items: center; }
.card .link::after { content: "→"; transition: transform .4s var(--ease); }
.card:hover .link::after { transform: translateX(6px); }
.card.muted { background: transparent; border-style: dashed; }
@media (max-width: 720px) { .portfolio { grid-template-columns: 1fr; } }

/* Principles — dark band */
.band {
  background: var(--ink); color: var(--white);
  position: relative; isolation: isolate; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background: url("img/layers.jpg") center / cover no-repeat;
  mix-blend-mode: luminosity;
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11,26,48,1) 0%, rgba(11,26,48,.75) 60%, rgba(11,26,48,.5) 100%);
}
.band .section-head .num { color: rgba(251,249,244,.6); }
.band .section-head .num::after { background: rgba(251,249,244,.25); }
.band h2 em { color: var(--brass-soft); }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-left: 1px solid rgba(251,249,244,.18); }
.principle { padding: 8px 28px 8px 28px; border-right: 1px solid rgba(251,249,244,.18); }
.principle .k { font-family: var(--serif); font-size: 52px; font-weight: 300; line-height: 1; color: var(--brass-soft); }
.principle h3 { margin: 18px 0 8px; font-family: var(--serif); font-weight: 400; font-size: 21px; }
.principle p { margin: 0; color: rgba(251,249,244,.72); font-size: 15px; line-height: 1.65; }
@media (max-width: 960px) { .principles { grid-template-columns: repeat(2, 1fr); } .principle { padding: 20px 22px; border-bottom: 1px solid rgba(251,249,244,.18); } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* Company registry */
.registry { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.registry table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-strong); }
.registry th, .registry td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.registry th { width: 34%; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; padding-top: 20px; }
.registry td { font-size: 16.5px; color: var(--ink); }
.registry td a { border-bottom: 1px solid var(--line-strong); }
.registry td a:hover { border-color: var(--brass); color: var(--brass); }
@media (max-width: 960px) { .registry { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.contact h2 { margin-bottom: 18px; }
.contact p { margin: 0 0 24px; color: var(--ink-2); font-size: 17px; max-width: 46ch; }
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--white);
  padding: 16px 24px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  transition: background .35s, transform .5s var(--ease);
}
.btn:hover { background: var(--brass); transform: translateY(-2px); }
.btn::after { content: "→"; }
.addr { font-style: normal; display: grid; gap: 22px; }
.addr div { padding-top: 14px; border-top: 1px solid var(--line-strong); }
.addr span { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin-bottom: 8px; }
.addr a { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.addr a:hover { color: var(--brass); }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line-strong); padding: 40px 0 48px; font-size: 13px; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 22px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; font-size: 11px; }
.site-footer nav a:hover { color: var(--brass); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero [data-in] { opacity: 1; transform: none; animation: none; transition: none; }
  .hero .bg { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Subpages (terms, 404) ---------- */
.subpage-head { padding: clamp(64px, 9vw, 120px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.subpage-head h1 { margin: 18px 0 0; font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.015em; }
.prose { max-width: 74ch; padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 120px); }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.75; }
.prose .meta { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line-strong); font-size: 13px; color: var(--ink-soft); letter-spacing: 0.06em; }
