/* ============================================================
   rasidefense.com — stylesheet
   Brand continuity with RAS Institute (rasinstitute.com)
   ============================================================ */

/* ---------- Fonts (reused from RAS Institute) ---------- */
@font-face {
  font-family: 'Bodoni';
  src: url('/static/fonts/BodoniStd/BodoniStd.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Theinhardt';
  src: url('/static/fonts/Theinhardt/TheinhardtPanRegular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Theinhardt';
  src: url('/static/fonts/Theinhardt/TheinhardtPanBold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Theinhardt';
  src: url('/static/fonts/Theinhardt/TheinhardtPanLight.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Theinhardt';
  src: url('/static/fonts/Theinhardt/TheinhardtPanThin.otf') format('opentype');
  font-weight: 100;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --navy-900: #030f24;   /* primary background / text */
  --navy-700: #0a1c3d;
  --navy-500: #1e345a;   /* mid navy surfaces */
  --gold:      #BEA34D;  /* accent */
  --gold-soft: #d8c98a;
  --white:     #ffffff;
  --link:      #1978c0;

  --ink:        #e8edf6;       /* body text on navy */
  --ink-muted:  #9fb0cc;       /* secondary text on navy */
  --hairline:   rgba(190,163,77,0.22);
  --surface:    #0a1c3d;
  --surface-2:  #102444;

  --font-display: 'Bodoni', Georgia, serif;
  --font-body: 'Theinhardt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Theinhardt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; color: var(--gold); margin: 0 0 1rem;
}
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--alt { background: var(--navy-700); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section__lead { color: var(--ink-muted); font-size: 1.12rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: .85em 1.6em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--navy-900); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--ghost { border-color: var(--hairline); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--white); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: transparent; transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}

.btn-black-txt {
  color: black;
}
.nav.is-scrolled {
  background: rgba(3,15,36,0.86); backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline); padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 34px; height: auto; }
.brand__word { font-family: var(--font-body); font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em; color: var(--white); }
.brand__word b { color: var(--gold); font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { font-size: .92rem; color: var(--ink-muted); transition: color .2s ease; }
.nav__links a:not(.btn):hover { color: var(--white); }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform .3s ease, opacity .3s ease; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__fallback {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 120% at 70% 30%, rgba(30,52,90,0.55), transparent 60%);
}
.hero__inner { position: relative; z-index: 2; padding-top: 96px; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.01em;
  text-shadow: 0 2px 40px rgba(3,15,36,0.6);
}
.hero h1 .accent { color: var(--gold); }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink); max-width: 600px; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.4rem; }
.hero__backed {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; color: var(--ink-muted);
  padding: 8px 16px; border: 1px solid var(--hairline); border-radius: 999px;
  background: rgba(3,15,36,0.4);
}
.hero__backed b { color: var(--white); font-weight: 700; }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll::after { content: ''; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: scrollpulse 2s ease-in-out infinite; }
@keyframes scrollpulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--navy-900); border-block: 1px solid var(--hairline); }
.trustbar__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 40px 0; text-align: center; }
.trustbar__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--gold); line-height: 1; }
.trustbar__label { font-size: .92rem; color: var(--ink-muted); margin-top: 8px; }

/* ---------- Trust story ---------- */
.story__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.story p { font-size: 1.12rem; }
.story p strong { color: var(--white); }
.story__aside {
  background: linear-gradient(160deg, var(--navy-500), var(--navy-700));
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 32px;
}
.story__aside h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.story__aside ul { list-style: none; margin: 0; padding: 0; }
.story__aside li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hairline); color: var(--ink); font-size: .98rem; }
.story__aside li:first-child { border-top: 0; }
.tick { color: var(--gold); flex: none; font-weight: 700; }

/* ---------- Capability pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.pillar:hover { transform: translateY(-6px); border-color: var(--gold); background: var(--surface-2); }
.pillar__icon { width: 40px; height: 40px; margin-bottom: 18px; color: var(--gold); }
.pillar h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; color: var(--white); margin-bottom: 6px; }
.pillar__tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); display: block; margin-bottom: 14px; }
.pillar p { font-size: .96rem; color: var(--ink-muted); margin: 0; }

/* ---------- ENISA credentials ---------- */
.contracts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contract {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.contract__unit { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-bottom: 14px; }
.contract h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; color: var(--white); }
.contract p { font-size: .95rem; color: var(--ink-muted); flex: 1; }
.contract__meta { display: flex; gap: 22px; padding-top: 18px; margin-top: 14px; border-top: 1px solid var(--hairline); }
.contract__meta .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); }
.contract__meta .v { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); }
.contracts__note { margin-top: 26px; font-size: .85rem; color: var(--ink-muted); max-width: 760px; }

/* ---------- Why us ---------- */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 40px; }
.why li { list-style: none; display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--hairline); }
.why .why__t { color: var(--white); font-weight: 700; display: block; margin-bottom: 2px; }
.why .why__d { color: var(--ink-muted); font-size: .95rem; }

/* ---------- NIS2 explainer ---------- */
.nis2 { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.nis2__steps { display: grid; gap: 14px; }
.nis2__step { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; }
.nis2__num { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); line-height: 1; flex: none; width: 34px; }
.nis2__step h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: var(--white); margin-bottom: 4px; }
.nis2__step p { margin: 0; font-size: .94rem; color: var(--ink-muted); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.about p { font-size: 1.08rem; }
.about p strong { color: var(--white); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__card {
  max-width: 720px; margin-inline: auto;
  background: linear-gradient(160deg, var(--navy-500), var(--navy-700));
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px);
}
.contact h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.contact__lead { color: var(--ink-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.contact__email { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--gold); display: inline-block; margin-bottom: 2rem; }
.contact__email:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); border-top: 1px solid var(--hairline); padding: 56px 0 36px; }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.footer__brand { max-width: 320px; }
.footer__brand p { color: var(--ink-muted); font-size: .92rem; }
.footer__col h4 { font-family: var(--font-body); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin-bottom: 14px; }
.footer__col a { display: block; color: var(--ink-muted); font-size: .92rem; padding: 5px 0; }
.footer__col a:hover { color: var(--white); }
.footer__legal { border-top: 1px solid var(--hairline); padding-top: 24px; font-size: .8rem; color: var(--ink-muted); }
.footer__legal p { margin: 0 0 .5em; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .contracts { grid-template-columns: 1fr; }
  .story__grid, .nis2, .about__grid { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links { position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: rgba(3,15,36,0.97); backdrop-filter: blur(12px); padding: 88px 24px 32px;
    transform: translateY(-110%); transition: transform .35s ease; height: auto; border-bottom: 1px solid var(--hairline); }
  .nav__links.is-open { transform: none; }
  .nav__links a { padding: 16px 0; border-bottom: 1px solid var(--hairline); font-size: 1.05rem; }
  .nav__cta { margin: 16px 0 0; }
  .nav__toggle { display: block; z-index: 60; }
  .trustbar__grid { grid-template-columns: 1fr; gap: 24px; }
  .pillars { grid-template-columns: 1fr; }
  .hero__inner { padding-top: 110px; }
  .hero__scroll { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll::after { animation: none; }
}
