/* =========================================================
   Cipher Access — Design Tokens
   Derived from logo: navy shield, copper/bronze gradient,
   keyhole + key motif (vetted access), cream field.
   ========================================================= */
:root {
  --navy-deep: #101f34;
  --navy: #16304f;
  --navy-soft: #1f4165;
  --copper-deep: #9c5a2c;
  --copper: #c17f4a;
  --copper-light: #e0a876;
  --cream: #f5f1e8;
  --cream-soft: #efe9dc;
  --ivory: #fbf9f4;
  --charcoal: #262421;
  --charcoal-soft: #55504a;
  --line: #ded4c2;
  --success: #3f6b4a;
  --error: #a13b2f;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --shadow-soft: 0 10px 30px -12px rgba(16, 31, 52, 0.25);
  --shadow-lift: 0 20px 45px -18px rgba(16, 31, 52, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

a { color: inherit; text-decoration: none; }

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--copper-light), var(--copper-deep));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: inherit;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-deep); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--copper); color: var(--copper-deep); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 28px;
  max-width: 1160px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 52px; width: 52px; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--navy-deep);
  letter-spacing: 0.01em;
}
.brand-text .tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.nav-dropdown { position: relative; }
.nav-dropdown-panel {
  position: absolute;
  top: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  padding: 10px;
  min-width: 240px;
  display: none;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-panel { display: block; }
.nav-dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-dropdown-panel a:hover { background: var(--cream-soft); }
.nav-dropdown-panel a::after { display: none; }

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span { width: 24px; height: 2px; background: var(--navy); display: block; }

/* ---------- Arc rule (signature: mirrors logo's arc) ---------- */
.arc-rule {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--copper-deep), var(--copper-light), var(--copper-deep));
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(193,127,74,0.28), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(31,65,101,0.55), transparent 50%);
  pointer-events: none;
  z-index: 2;
}
.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.05);
}
.hero-inner {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 88px 28px 76px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  z-index: 3;
}
.hero h1 { color: #fff; }
.hero p { color: #fff; }

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--copper-light);
}
.hero-stats .stat span {
  font-size: 0.78rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* simple page hero for interior pages */
.page-hero {
  background: var(--navy-deep);
  color: #fff;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(193,127,74,0.25), transparent 55%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 60ch; font-size: 1.05rem; }
.breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--copper-light); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 74px 0; }
.section-tight { padding: 44px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-alt { background: var(--ivory); }
.section-navy { background: var(--navy-deep); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: rgba(255,255,255,0.72); }

/* ---------- Service grid / cards ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.service-card .thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--cream-soft), #fff);
  border-bottom: 1px solid var(--line);
}
.service-card .thumb svg { width: 100%; height: 100%; }
.service-card .body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.service-card p { font-size: 0.92rem; flex: 1; }
.service-card .link {
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--copper-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Keyhole badge (signature element) ---------- */
.keyhole-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
}
.keyhole-badge .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.keyhole-badge .dot svg { width: 12px; height: 12px; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.step .num {
  font-family: var(--font-display);
  color: var(--copper);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

/* ---------- Two column ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-art { order: 2; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--charcoal);
  font-size: 0.98rem;
}
.feature-list .tick {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.feature-list .tick svg { width: 11px; height: 11px; }

/* ---------- Cards (about / news) ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.news-card .thumb { aspect-ratio: 16/10; background: linear-gradient(160deg, var(--navy-soft), var(--navy-deep)); }
.news-card .thumb svg { width: 100%; height: 100%; }
.news-card .body { padding: 20px 22px 24px; }
.news-card .date { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--copper-deep); font-weight: 700; margin-bottom: 8px; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.value-card .ic { width: 44px; height: 44px; margin-bottom: 14px; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.team-card { text-align: center; }
.team-card .avatar { border-radius: 50%; overflow: hidden; aspect-ratio: 1; margin-bottom: 14px; border: 3px solid #fff; box-shadow: var(--shadow-soft); }
.team-card .role { font-size: 0.8rem; color: var(--copper-deep); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Forms ---------- */
.form-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.form-shell.narrow { max-width: 480px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 7px;
}
.field .hint { font-size: 0.76rem; color: var(--charcoal-soft); margin-top: 5px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--ivory);
  color: var(--charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(193,127,74,0.18);
}
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: auto; margin-top: 4px; }
.checkbox-row label { margin: 0; font-weight: 500; font-size: 0.86rem; color: var(--charcoal-soft); }

.form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; flex-wrap: wrap; gap: 10px; }

/* ---------- Alerts / flash ---------- */
.flash-stack { max-width: 1160px; margin: 18px auto 0; padding: 0 28px; display: grid; gap: 10px; }
.flash {
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.flash-error { background: #fbeae6; color: var(--error); border-color: #f0c9bf; }
.flash-success { background: #eaf1eb; color: var(--success); border-color: #c9dfcc; }

/* ---------- Status badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pending { background: #f4e9d6; color: #8a5a12; }
.status-approved { background: #dcece0; color: var(--success); }
.status-rejected { background: #fbe3df; color: var(--error); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.dash-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.dash-row:last-child { border-bottom: none; }
.dash-row .k { color: var(--charcoal-soft); }
.dash-row .v { font-weight: 600; color: var(--navy); text-align: right; max-width: 60%; }

/* ---------- Admin table ---------- */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--navy);
}
.admin-tab.active { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 760px; }
thead th {
  text-align: left;
  background: var(--cream-soft);
  color: var(--navy);
  padding: 13px 16px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tbody td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--ivory); }
.qual-cell { max-width: 260px; font-size: 0.84rem; color: var(--charcoal-soft); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state { padding: 50px 20px; text-align: center; color: var(--charcoal-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-soft));
  color: #fff;
  border-radius: 22px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 20%, rgba(193,127,74,0.35), transparent 55%);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; position: relative; }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0; position: relative; max-width: 46ch; }
.cta-band .btn { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.7); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 42px; width: 42px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.1rem; color: #fff; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--copper-light); }
.footer-bottom { margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-art { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-shell { padding: 26px; }
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 28px 18px;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 4px; font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: none; }
