/* ============================================================
   PRIME AGENCY — navy + gold premium rebuild
   Space Grotesk · Inter · Fraunces (italic accents)
   ============================================================ */

:root {
  --bg:        #0b121c;
  --bg-2:      #0f1825;
  --bg-card:   #121d2c;
  --fg:        #ece7dc;
  --muted:     #8b94a4;
  --muted-2:   #586173;
  --line:      rgba(236, 231, 220, 0.10);
  --line-2:    rgba(236, 231, 220, 0.06);
  --accent:    #c9a24b;
  --accent-2:  #e2c47d;
  --accent-rgb: 201, 162, 75;
  --accent-dim: rgba(201, 162, 75, 0.12);

  /* recolour any transparent-PNG logo to solid gold */
  --gold-filter: brightness(0) saturate(100%) invert(74%) sepia(31%) saturate(620%) hue-rotate(358deg) brightness(94%) contrast(86%);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-serif:   'Fraunces', Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #0b121c; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #243348; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #324559; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; }
code { font-family: var(--font-display); font-size: 0.85em; color: var(--accent); background: var(--accent-dim); padding: 2px 7px; border-radius: 4px; }

/* ---------------- texture / cursor / progress ---------------- */
#grain {
  position: fixed; inset: 0; z-index: 800; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px;
}
#cur, #cur2 { display: none; }
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent); z-index: 9000; pointer-events: none;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  #cur, #cur2 { display: block; }
  #cur {
    position: fixed; z-index: 9500; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); pointer-events: none; transform: translate(-50%, -50%); mix-blend-mode: screen;
    transition: width .45s var(--ease), height .45s var(--ease), opacity .3s;
  }
  #cur.big { width: 54px; height: 54px; opacity: 0.18; }
  #cur2 {
    position: fixed; z-index: 9499; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(var(--accent-rgb), 0.4); pointer-events: none; transform: translate(-50%, -50%);
    opacity: 0.45; transition: opacity .3s;
  }
}

/* ---------------- typography ---------------- */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
p { color: var(--muted); font-weight: 300; }

.sec-title { font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.0; }
.sec-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.01em; }
.sec-title.big { font-size: clamp(2.6rem, 7vw, 5.4rem); }

.sec-label {
  display: inline-block; font-family: var(--font-display); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.4rem;
}
.sec-lead { font-size: 1.05rem; color: var(--muted); max-width: 560px; margin-top: 1.4rem; line-height: 1.7; }

/* ---------------- buttons ---------------- */
.btn {
  --pad-y: 14px; --pad-x: 28px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x); font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid transparent; border-radius: 100px; cursor: pointer; background: none; color: var(--fg);
  transition: transform .4s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn-sm { --pad-y: 9px; --pad-x: 18px; font-size: 0.8rem; }
.btn-lg { --pad-y: 16px; --pad-x: 34px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #0b121c; border-color: var(--accent); font-weight: 600; }
.btn-accent:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------------- layout ---------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.container-narrow { max-width: 760px; }
.section { padding: 130px 0; position: relative; scroll-margin-top: 80px; }
.sec-head { margin-bottom: 60px; max-width: 900px; }
.sec-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.sec-head.center .sec-lead { margin-left: auto; margin-right: auto; }
.sec-foot { margin-top: 56px; text-align: center; }

/* ---------------- brand / logo ---------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; filter: var(--gold-filter); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--fg); display: inline-flex; align-items: baseline; gap: 4px; }
.brand-sub { font-weight: 300; font-size: 0.74rem; color: var(--muted); letter-spacing: 0; }

/* ---------------- nav ---------------- */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 7000; border-bottom: 1px solid transparent; transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s; }
#nav.scrolled { background: rgba(11, 18, 28, 0.74); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.nav-inner { max-width: 1440px; margin: 0 auto; height: 76px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); position: relative; transition: color .3s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--accent); transition: width .35s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 26px; height: 1.5px; background: var(--fg); transition: transform .35s var(--ease), opacity .25s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { transform: translateY(-0px) rotate(-45deg); }
.mobile-menu { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; z-index: 6900; background: var(--bg); padding: 32px 40px; display: flex; flex-direction: column; gap: 4px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a:not(.btn) { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.mobile-menu .btn { margin-top: 24px; }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; padding: 140px 0 70px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-lion { position: absolute; right: -3vw; top: 50%; transform: translateY(-50%); width: 58vh; max-width: 620px; opacity: 0.06; filter: var(--gold-filter); }
.hero-glow { position: absolute; left: -8vw; top: 26%; width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, transparent 62%); filter: blur(16px); }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-eyebrow { display: flex; align-items: center; gap: 16px; font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 36px; }
.hero-eyebrow .idx { color: var(--accent); }
.hero-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.7rem, 9vw, 7rem); line-height: 0.98; letter-spacing: -0.045em; max-width: 16ch; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: block; transform: translateY(110%); animation: lineUp 1s var(--ease) forwards; }
.hero-title .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.28s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.41s; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; margin-top: 48px; }
.hero-sub { font-size: 1.08rem; max-width: 460px; color: var(--muted); line-height: 1.65; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-trust li { font-family: var(--font-display); font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.hero-trust li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero-scroll { position: absolute; right: 40px; bottom: 70px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.hero-scroll-line { width: 1px; height: 54px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ''; position: absolute; top: -50%; left: 0; width: 1px; height: 50%; background: var(--accent); animation: scrolldot 2s ease-in-out infinite; }
@keyframes scrolldot { 0% { top: -50%; } 100% { top: 100%; } }

.reveal { opacity: 0; transform: translateY(16px); animation: fadeUp 1s var(--ease) forwards; }
.hero-eyebrow.reveal { animation-delay: 0.1s; }
.hero-sub.reveal { animation-delay: 0.6s; }
.hero-cta.reveal { animation-delay: 0.72s; }
.hero-trust.reveal { animation-delay: 0.85s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------------- marquee ---------------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; animation: mq 38s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 0.92rem; letter-spacing: 0.02em; color: var(--muted-2); padding: 0 38px; white-space: nowrap; }
.marquee-track span i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 38px; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- about ---------------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; }
.about-statement { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.4; letter-spacing: -0.02em; color: var(--fg); }
.about-statement em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.about-facts { list-style: none; }
.about-facts li { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.about-facts li:last-child { border-bottom: 1px solid var(--line); }
.fact-k { font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.fact-v { font-size: 0.98rem; color: var(--muted); }

/* ---------------- services ---------------- */
.svc-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.svc { padding: 34px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background .4s; }
.svc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .4s var(--ease); }
.svc:hover { background: var(--bg-2); }
.svc:hover::before { width: 2px; }
.svc-idx { font-family: var(--font-display); font-size: 0.8rem; color: var(--accent); display: block; margin-bottom: 14px; }
.svc h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 8px; transition: color .3s; }
.svc:hover h3 { color: var(--accent); }
.svc p { font-size: 0.95rem; color: var(--muted); max-width: 420px; }

/* ---------------- cases (editable cards) ---------------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.case-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: transform .45s var(--ease), border-color .45s, box-shadow .45s; }
.case-card:hover { transform: translateY(-6px); border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.case-thumb { position: relative; padding-top: 62.5%; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.case-thumb--empty { background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb),0.10), transparent 70%), var(--bg-2); }
.case-thumb--empty .thumb-lion { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.case-thumb--empty .thumb-lion { width: 96px; opacity: 0.18; filter: var(--gold-filter); }
.case-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.case-tag { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.case-card h3 { font-size: 1.4rem; font-weight: 500; margin-bottom: 10px; }
.case-card p { font-size: 0.96rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.case-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.case-metrics span { font-family: var(--font-display); font-size: 0.78rem; color: var(--fg); border: 1px solid var(--line); padding: 6px 13px; border-radius: 100px; }
.case-link { margin-top: 20px; align-self: flex-start; font-family: var(--font-display); font-size: 0.85rem; color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.case-card--link { cursor: pointer; }
.case-card--link:hover .case-link { border-bottom-color: var(--accent); }

/* ---------------- contact / form ---------------- */
.audit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.field-wide { grid-column: 1 / -1; }
.audit-form input { width: 100%; padding: 17px 20px; font-family: var(--font-body); font-size: 1rem; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.audit-form input::placeholder { color: var(--muted-2); }
.audit-form input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.audit-form .btn { grid-column: 1 / -1; margin-top: 8px; }
.form-note { grid-column: 1 / -1; text-align: center; font-size: 0.82rem; color: var(--muted-2); }
.contact-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.contact-foot p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.form-success { text-align: center; padding: 60px 20px; animation: fadeUp .5s var(--ease); }
.form-success .check { width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; font-size: 1.8rem; }
.form-success h3 { font-size: 1.6rem; font-weight: 500; margin-bottom: 10px; }
.form-success h3 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); padding: 90px 0 40px; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 70px; }
.footer-brand .brand-mark { width: 42px; height: 42px; }
.footer-brand .brand-name { font-size: 1.7rem; }
.footer-tag { font-size: 1rem; color: var(--muted); text-align: right; line-height: 1.6; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h5 { font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.footer-col a { font-size: 0.95rem; color: var(--muted); transition: color .3s; }
.footer-col a:hover { color: var(--fg); }
.footer-muted { font-size: 0.88rem; color: var(--muted-2); line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 30px; font-size: 0.82rem; color: var(--muted-2); }
.footer-links a:hover { color: var(--fg); }

/* ---------------- sticky mobile bar ---------------- */
.sticky-bar { display: none; }

/* ---------------- scroll reveal ---------------- */
.reveal-up { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .section { padding: 90px 0; }
  .sec-head { margin-bottom: 44px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .svc-list { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-tag { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-scroll { display: none; }
  .hero-lion { opacity: 0.05; right: -20vw; }
}

@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .nav-inner { padding: 0 22px; height: 68px; }
  .mobile-menu { top: 68px; }
  .hero { padding: 116px 0 110px; min-height: auto; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 28px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
  .case-grid { grid-template-columns: 1fr; }
  .audit-form { grid-template-columns: 1fr; }
  .contact-foot { flex-direction: column; align-items: flex-start; }
  .sticky-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6000; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(11,18,28,0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .sticky-bar .btn { flex: 1; }
  body { padding-bottom: 76px; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .hero-title .line > span { transform: none; }
  .reveal, .reveal-up { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
}
