/* Officials Edge — techref.app
   Navy + white + orange accent. Mobile-first, lightweight, no build step. */

:root {
  --navy-950: #07141f;
  --navy-900: #0b1f33;
  --navy-800: #122a42;
  --navy-700: #1a3a58;
  --navy-100: #e8eef4;
  --navy-50: #f4f7fa;
  --white: #ffffff;
  --slate-600: #4a5d6e;
  --slate-500: #5c7082;
  --slate-400: #8a9bab;
  --accent: #e8622a;
  --accent-hover: #d45520;
  --accent-soft: rgba(232, 98, 42, 0.12);
  --green: #1f8a5b;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(7, 20, 31, 0.08);
  --shadow-lg: 0 12px 40px rgba(7, 20, 31, 0.12);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", "DM Sans", system-ui, sans-serif;
  --header-h: 4rem;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--navy-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--navy-900);
}

h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 700; }

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform 0.15s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn-lg {
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  font-size: 1.05rem;
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--navy-100);
  width: 100%;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-100);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.brand:hover {
  color: inherit;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.brand-domain {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--navy-900);
  border-radius: 1px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--navy-100);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  background: var(--navy-50);
  color: var(--accent);
}

.site-nav .btn {
  margin-top: 0.5rem;
  width: 100%;
}

@media (min-width: 800px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem 1.25rem;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .site-nav a {
    min-height: auto;
    padding: 0.35rem 0;
  }

  .site-nav .btn {
    width: auto;
    margin-top: 0;
    margin-left: 0.5rem;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: var(--white);
  padding: 3.5rem 0 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(232, 98, 42, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 100%, rgba(31, 138, 91, 0.15), transparent 50%),
    linear-gradient(165deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-950) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero .eyebrow {
  color: #f0a57a;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.hero-support {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .hero {
    padding: 5rem 0 5.5rem;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-header {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-header .eyebrow {
  color: var(--accent);
}

.section-lead {
  color: var(--slate-600);
  font-size: 1.05rem;
  margin: 0;
}

/* Tools */
.tools {
  background: var(--navy-50);
}

.tool-category {
  margin-bottom: 2.75rem;
}

.tool-category:last-child {
  margin-bottom: 0;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  color: var(--navy-800);
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--navy-100);
}

.category-icon {
  font-size: 1.15rem;
}

.tool-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.tool-card:hover {
  border-color: rgba(232, 98, 42, 0.35);
  box-shadow: var(--shadow-lg);
}

.tool-card-body {
  flex: 1;
  margin-bottom: 1.15rem;
}

.tool-card h4 {
  margin-bottom: 0.5rem;
  color: var(--navy-900);
}

.tool-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.55;
}

/* Deep Dive */
.deep-dive {
  background: var(--navy-900);
  color: var(--white);
}

.deep-dive .eyebrow {
  color: #f0a57a;
}

.deep-dive h2 {
  color: var(--white);
}

.deep-dive-inner {
  display: grid;
  gap: 2rem;
}

.deep-dive-copy p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
}

.deep-dive-panel {
  display: grid;
  gap: 0.75rem;
}

.deep-dive-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0a57a;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
}

@media (min-width: 800px) {
  .deep-dive-inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 3rem;
  }
}

/* About */
.about {
  background: var(--white);
}

.mission {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 28rem;
}

.mission-key {
  color: var(--slate-600);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.mission-key strong {
  color: var(--navy-900);
}

.founder {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  max-width: 36rem;
}

.founder-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--white);
}

.founder-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.15rem;
  color: var(--navy-900);
}

.founder-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.founder-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate-600);
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  gap: 1.75rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
}

.footer-tag {
  margin: 0;
  font-size: 0.8rem;
  color: var(--slate-400);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

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

.footer-meta a {
  color: #f0a57a;
  text-decoration: none;
  font-weight: 600;
}

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

.copyright {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--slate-400);
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 2rem;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-meta {
    text-align: right;
  }
}
