/* ============================================================
   FENIX PRIVATE ACCESS — Institutional portal site
   Aesthetic: dark "vault", crimson accent, security-paper texture
   ============================================================ */

:root {
  /* Brand palette (sampled from the crest) */
  --black:      #060608;
  --bg:         #08080b;
  --bg-soft:    #0d0d12;
  --card:       #101016;
  --card-edge:  #16161e;

  --ink:        #f5f4f3;   /* headings / white */
  --ink-soft:   #b9b9c1;   /* body */
  --ink-mute:   #76767f;   /* labels / muted */

  --red:        #cc2031;
  --red-bright: #e63a48;
  --red-deep:   #8f0e16;

  --line:       rgba(255,255,255,.08);
  --line-soft:  rgba(255,255,255,.05);
  --line-red:   rgba(204,32,49,.55);

  --display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --sans:    "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --ui:      "Poppins", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- atmosphere: grain + security grid ---------- */
body::before { /* fine security-paper grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 35%, transparent 78%);
  pointer-events: none; z-index: 0;
}
body::after { /* grain */
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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='.5'/%3E%3C/svg%3E");
  opacity: .035; pointer-events: none; z-index: 0; mix-blend-mode: screen;
}

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
section { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--ui);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red-bright);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--line-red);
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 700; line-height: 1.04; letter-spacing: -.015em; text-transform: none; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin: 18px 0 18px;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; max-width: 620px; }

/* ---------- buttons (pill style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px;
  font-family: var(--ui);
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid transparent; border-radius: 100px; cursor: pointer;
  transition: all .3s var(--ease);
  position: relative; white-space: nowrap;
}
.btn-primary {
  background: var(--red); color: #fff; border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-bright); border-color: var(--red-bright);
  box-shadow: 0 14px 36px -12px rgba(204,32,49,.7);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: rgba(255,255,255,.28);
}
.btn-ghost:hover { border-color: var(--red); color: #fff; background: rgba(204,32,49,.08); transform: translateY(-2px); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   NAV
   ============================================================ */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 16px 22px 0;
}
/* floating "dynamic island" bar (.nav-inner also carries .wrap: max-width + inline padding) */
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 62px;
  background: rgba(8,11,18,.72);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 16px 46px -22px rgba(0,0,0,.85);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
header.nav.scrolled .nav-inner { background: rgba(8,11,18,.86); box-shadow: 0 18px 52px -20px rgba(0,0,0,.92); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 30px; height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.brand .name {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  color: var(--ink); font-size: 1.02rem; letter-spacing: .1em; line-height: 1;
}
.brand .name small {
  display: block; font-family: var(--ui); font-size: 8px; letter-spacing: .32em;
  color: var(--red-bright); margin-top: 3px; font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.lnk {
  font-family: var(--ui); font-size: 14.5px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: rgba(255,255,255,.78);
  padding: 9px 17px; border-radius: 13px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-links a.lnk:hover { color: #fff; background: rgba(255,255,255,.06); }

.nav-toggle { display: none; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink);
  width: 42px; height: 38px; border-radius: 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto; transition: .3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  text-align: center; padding: 120px 0 80px; position: relative; overflow: hidden;
}
.hero::before { /* crimson glow behind crest */
  content: ""; position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  width: 760px; height: 760px; max-width: 120vw;
  background: radial-gradient(circle, rgba(204,32,49,.20) 0%, rgba(204,32,49,.06) 38%, transparent 66%);
  filter: blur(6px); z-index: 0; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-logo {
  width: min(330px, 64vw); margin: 0 auto 34px;
  filter: drop-shadow(0 22px 60px rgba(0,0,0,.65));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.hero h1 {
  font-size: clamp(2.7rem, 8.2vw, 6rem);
  font-weight: 800; letter-spacing: -.025em;
}
.hero h1 .dot { color: var(--red); }
.hero h1 .ln2 { color: transparent; -webkit-text-stroke: 1.3px rgba(245,244,243,.86); }
.hero-sub {
  max-width: 680px; margin: 26px auto 0; color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}
.hero-cta { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-meta {
  margin-top: 64px; display: flex; gap: 0; justify-content: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.hero-meta div { padding: 0 30px; border-right: 1px solid var(--line); }
.hero-meta div:last-child { border-right: 0; }
.hero-meta dt { font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }
.hero-meta dd { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); margin-top: 6px; letter-spacing: -.01em; }

/* ============================================================
   PLATFORM / ABOUT
   ============================================================ */
.platform { padding: 130px 0; border-top: 1px solid var(--line-soft); }
.platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.platform-lead p { font-size: 1.25rem; line-height: 1.6; color: var(--ink); }
.platform-lead p + p { margin-top: 22px; font-size: 1.02rem; color: var(--ink-soft); }
.platform-pillars { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillar { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.pillar .ix { font-family: var(--ui); color: var(--red-bright); font-size: 13px; letter-spacing: .1em; padding-top: 4px; }
.pillar h3 { font-size: 1.35rem; letter-spacing: .04em; margin-bottom: 6px; }
.pillar p { font-size: .95rem; color: var(--ink-mute); }

/* ============================================================
   CAPABILITIES (key specifications)
   ============================================================ */
.caps { padding: 130px 0; background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(204,32,49,.06), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--line-soft); }
.caps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cap {
  background: var(--card); padding: 34px 30px 38px; position: relative;
  transition: background .4s var(--ease), transform .4s var(--ease);
  overflow: hidden;
}
.cap::before { /* red top keyline grows on hover */
  content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0; background: var(--red);
  transition: width .45s var(--ease);
}
.cap:hover { background: var(--card-edge); }
.cap:hover::before { width: 100%; }
.cap .num { font-family: var(--ui); font-size: 12px; color: var(--red-bright); letter-spacing: .15em; }
.cap h3 { font-size: 1.35rem; margin: 22px 0 12px; letter-spacing: .03em; }
.cap p { font-size: .93rem; color: var(--ink-mute); line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--line); padding: 80px 0 40px; background: var(--black);
  position: relative; z-index: 1;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.foot-grid-2 { grid-template-columns: 1.6fr 1fr; }
.foot-brand img { width: 46px; margin-bottom: 18px; }
.foot-brand .name { font-family: var(--display); text-transform: uppercase; color: var(--ink); font-size: 1.3rem; letter-spacing: .12em; }
.foot-brand p { font-size: .9rem; color: var(--ink-mute); max-width: 320px; margin-top: 14px; }
.foot-col h4 { font-family: var(--ui); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--red-bright); margin-bottom: 18px; }
.foot-col a, .foot-col p { display: block; font-size: .92rem; color: var(--ink-soft); margin-bottom: 10px; transition: color .25s; }
.foot-col a:hover { color: #fff; }
.foot-bottom {
  margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--ui); font-size: 11px; letter-spacing: .08em; color: var(--ink-mute); text-transform: uppercase;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* hero load stagger */
.hero .load { opacity: 0; transform: translateY(20px); animation: rise .9s var(--ease) forwards; }
.hero .load.l1 { animation-delay: .15s; }
.hero .load.l2 { animation-delay: .35s; }
.hero .load.l3 { animation-delay: .55s; }
.hero .load.l4 { animation-delay: .75s; }
.hero .load.l5 { animation-delay: .95s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   NAV — active state + emergency link
   ============================================================ */
.nav-links a.lnk.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-emergency {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 6px;
  font-family: var(--ui); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--red); border: 2px solid var(--red); border-radius: 100px; padding: 9px 18px;
  transition: all .3s var(--ease);
}
.nav-emergency:hover { background: var(--red-bright); border-color: var(--red-bright); transform: translateY(-1px); box-shadow: 0 10px 26px -10px rgba(204,32,49,.7); }
.nav-emergency .pin { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

/* ============================================================
   SUB-PAGE HEADER
   ============================================================ */
.subhero { padding: 160px 0 70px; position: relative; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.subhero::before {
  content: ""; position: absolute; top: -30%; right: -5%; width: 520px; height: 520px; max-width: 90vw;
  background: radial-gradient(circle, rgba(204,32,49,.14), transparent 66%); pointer-events: none;
}
.subhero .wrap { position: relative; z-index: 1; }
.subhero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); margin: 18px 0 20px; }
.subhero p { max-width: 620px; color: var(--ink-soft); font-size: 1.08rem; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 110px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.about-lead p { font-size: 1.15rem; color: var(--ink); }
.about-lead p + p { margin-top: 20px; font-size: 1rem; color: var(--ink-soft); }
.about-side { border-left: 1px solid var(--line); padding-left: 36px; }
.about-side .stat { padding: 22px 0; border-bottom: 1px solid var(--line); }
.about-side .stat:first-child { padding-top: 0; }
.about-side .stat dt { font-family: var(--ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--red-bright); }
.about-side .stat dd { font-family: var(--display); text-transform: uppercase; color: var(--ink); font-size: 1.5rem; margin-top: 8px; letter-spacing: .04em; }
.about-side .stat dd small { display: block; font-family: var(--sans); text-transform: none; font-size: .85rem; color: var(--ink-mute); letter-spacing: 0; margin-top: 4px; }

.values { padding: 0 0 120px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value { background: var(--card); padding: 34px 30px; }
.value .ix { font-family: var(--ui); color: var(--red-bright); font-size: 12px; letter-spacing: .15em; }
.value h3 { font-size: 1.3rem; margin: 18px 0 10px; letter-spacing: .03em; }
.value p { font-size: .93rem; color: var(--ink-mute); }

/* ============================================================
   CONTACT / FORMS
   ============================================================ */
.contact { padding: 90px 0 120px; }

/* placeholder (contact / emergency details "coming soon") */
.placeholder {
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  padding: 48px 40px; max-width: 640px;
}
.placeholder .lbl { font-family: var(--ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--red-bright); }
.placeholder h3 { font-family: var(--display); text-transform: uppercase; color: var(--ink); font-size: 1.7rem; letter-spacing: .03em; margin: 14px 0 12px; }
.placeholder p { color: var(--ink-soft); font-size: 1rem; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }

.info-block { margin-bottom: 34px; }
.info-block h4 { font-family: var(--ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--red-bright); margin-bottom: 14px; }
.info-block a, .info-block p { display: block; font-size: 1rem; color: var(--ink-soft); margin-bottom: 8px; transition: color .25s; }
.info-block a:hover { color: #fff; }
.info-note { font-size: .85rem; color: var(--ink-mute); line-height: 1.6; }

.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; }
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field label { font-family: var(--ui); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 9px; }
.field input, .field textarea, .field select {
  background: rgba(0,0,0,.4); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sans); font-size: .98rem; padding: 14px 15px; outline: none; width: 100%;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #4a4a52; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--line-red); box-shadow: 0 0 0 3px rgba(204,32,49,.12); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }

.form .btn-primary { justify-content: center; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); box-shadow: 0 14px 40px -12px rgba(204,32,49,.65); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.form-status { font-family: var(--ui); font-size: 12.5px; letter-spacing: .04em; line-height: 1.6; padding: 14px 16px; border: 1px solid var(--line); display: none; }
.form-status.show { display: block; }
.form-status.ok { border-color: rgba(60,180,90,.5); color: #8fe3a4; background: rgba(60,180,90,.06); }
.form-status.err { border-color: var(--line-red); color: #f4a6ad; background: rgba(204,32,49,.06); }
.form-status a { color: var(--red-bright); text-decoration: underline; }

/* ============================================================
   EMERGENCY
   ============================================================ */
.emg-banner {
  background: linear-gradient(180deg, rgba(204,32,49,.14), transparent);
  border: 1px solid var(--line-red); padding: 26px 30px; margin-bottom: 48px;
  display: flex; align-items: center; gap: 18px;
}
.emg-banner .pin { width: 11px; height: 11px; border-radius: 50%; background: var(--red); flex: 0 0 auto; animation: pulse 2s infinite; }
.emg-banner p { color: var(--ink-soft); font-size: .98rem; }
.emg-banner b { color: var(--ink); }
.subhero.emg::before { background: radial-gradient(circle, rgba(204,32,49,.26), transparent 64%); top: -20%; right: 30%; }
.emg-channels { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 10px; }
.emg-channel { background: var(--card); padding: 30px; }
.emg-channel .lbl { font-family: var(--ui); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--red-bright); }
.emg-channel a { display: block; font-family: var(--ui); font-size: 1.02rem; color: var(--ink); margin-top: 12px; letter-spacing: .01em; word-break: break-word; transition: color .25s; }
.emg-channel a:hover { color: var(--red-bright); }
.emg-channel p { font-size: .9rem; color: var(--ink-mute); margin-top: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .platform-grid { grid-template-columns: 1fr; gap: 44px; }
  .caps-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; top: 90px; left: 22px; right: 22px; flex-direction: column; align-items: stretch;
    gap: 4px; background: rgba(8,11,18,.94); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 20px 50px -18px rgba(0,0,0,.9);
    padding: 14px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a.lnk { width: 100%; padding: 14px 16px; border-radius: 12px; }
  .nav-links .nav-emergency { width: 100%; justify-content: center; margin: 6px 0 0; }
  .nav-toggle { display: block; }
  .caps-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-meta div { padding: 10px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; }
  .emg-channels { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .load { opacity: 1; transform: none; }
}
