/* =========================================================
   RAMSEC Advisory — site styles
   Colors live in :root. Change --accent to re-theme the site.
   ========================================================= */
:root {
  --bg: #0a111c;
  --bg-2: #0f1928;
  --surface: #132033;
  --surface-2: #182941;
  --line: rgba(148, 178, 214, 0.14);
  --text: #e8eef6;
  --muted: #9aabc2;
  --dim: #5d6f87;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --accent-ink: #04201c;

  --radius: 18px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 650; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(10, 17, 28, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 40px; width: auto; }
.footer-logo { height: 28px; width: auto; opacity: .85; }
.hero-shield { width: 72px; height: 72px; margin: 0 auto 26px; }
.brand-mark { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.14em; font-size: 19px; }
.brand-mark.small { font-size: 15px; color: var(--muted); }
.brand-sub { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.nav-list { display: flex; align-items: center; gap: clamp(12px, 3vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.nav-list a:hover { color: var(--text); }
.nav-list .nav-cta {
  color: var(--text); padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, background .2s;
}
.nav-list .nav-cta:hover { border-color: var(--accent); background: rgba(45, 212, 191, 0.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font: 600 16px/1 var(--font);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(45, 212, 191, 0.6); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: calc(var(--header-h) + 40px) 0 80px; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero-glow {
  position: absolute; width: 900px; height: 900px; max-width: 160vw; left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(45, 212, 191, 0.16), rgba(56, 189, 248, 0.07) 40%, transparent 68%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-title { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 28px; }
.hero-word {
  font-size: clamp(64px, 15vw, 200px); font-weight: 800; letter-spacing: 0.06em; line-height: .95;
  padding-left: 0.06em; /* balance trailing letter-spacing */
  background: linear-gradient(180deg, #ffffff 30%, #9fb6d1 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(14px, 2vw, 22px); font-weight: 500; letter-spacing: 0.6em; text-transform: uppercase;
  color: var(--muted); padding-left: 0.6em;
}
.hero-tagline { font-size: clamp(19px, 2.4vw, 27px); color: var(--text); max-width: 34ch; margin: 0 auto 36px; line-height: 1.4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 30px; }
.hero-meta { font-size: 14px; color: var(--dim); letter-spacing: 0.04em; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--dim); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--muted); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Statement (scroll-lit words) ---------- */
.statement { position: relative; height: 220vh; }
.statement-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; }
.statement-text {
  font-family: var(--font-display); font-weight: 650; letter-spacing: -0.025em; line-height: 1.15;
  font-size: clamp(32px, 5.6vw, 76px); max-width: 1000px; text-align: left;
}
.statement-text .w { color: var(--text); opacity: 0.16; transition: opacity .35s ease, color .35s ease; }
.statement-text .w.lit { opacity: 1; }
.statement-text .w.accent.lit { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 70px); }

/* Services */
.card-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card {
  grid-column: span 2;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px 34px; position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: rgba(45, 212, 191, 0.35); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card-num { display: block; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 22px; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.tags li {
  font-size: 13px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, 0.03);
}

/* How we work */
.approach { background: var(--bg-2); border-block: 1px solid var(--line); padding: clamp(60px, 9vw, 110px) 0; }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.pillar { border-top: 2px solid var(--accent); padding-top: 22px; }
.pillar h3 { margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: 16px; }

/* About */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.about-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 10px; }
.about-role { color: var(--muted); font-size: 18px; }
.about-copy > p { color: var(--muted); margin-bottom: 20px; font-size: 19px; }
.about-copy > p:first-child { color: var(--text); }
.text-link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.text-link:hover { color: var(--accent); }

/* Contact */
.contact { background: radial-gradient(ellipse 80% 60% at 0% 100%, rgba(45, 212, 191, 0.08), transparent 60%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.contact-intro h2 { margin-bottom: 22px; }
.contact-intro p:not(.eyebrow) { color: var(--muted); font-size: 18px; margin-bottom: 26px; max-width: 42ch; }
.contact-intro p.contact-meta { font-size: 15px; color: var(--dim); }
.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.optional { font-weight: 400; color: var(--dim); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 15px; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #fca5a5; }
.form-privacy { font-size: 13px; line-height: 1.5; color: var(--dim); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { color: var(--dim); font-size: 14px; }

/* ---------- Motion ---------- */
/* Reveal on scroll (JS adds .js to <html> and .is-visible to elements) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.card-grid .card:nth-child(2) { transition-delay: .08s; }
.card-grid .card:nth-child(3) { transition-delay: .16s; }
.card-grid .card:nth-child(5) { transition-delay: .08s; }
.pillar-grid .pillar:nth-child(2) { transition-delay: .08s; }
.pillar-grid .pillar:nth-child(3) { transition-delay: .16s; }
.pillar-grid .pillar:nth-child(4) { transition-delay: .24s; }

/* Hero fades and recedes as you scroll (browsers with scroll-driven animations) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-inner {
      animation: hero-out linear both;
      animation-timeline: scroll(root);
      animation-range: 0 85vh;
    }
    .hero-grid { animation: grid-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .scroll-cue { animation: fade-out linear both; animation-timeline: scroll(root); animation-range: 0 20vh; }
  }
}
@keyframes hero-out { to { opacity: 0; transform: scale(.9) translateY(-6vh); filter: blur(6px); } }
@keyframes grid-drift { to { transform: perspective(600px) rotateX(35deg) translateY(10%); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
  .statement { height: auto; }
  .statement-sticky { position: static; height: auto; padding: 120px 0; }
  .statement-text .w { opacity: 1; transition: none; }
  .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
  .card:nth-child(5) { grid-column: 1 / -1; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-grid { gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-logo { height: 34px; }
  .hero-shield { width: 56px; height: 56px; margin-bottom: 20px; }
  .nav-list li:not(:last-child) { display: none; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: 1 / -1; }
  .card-grid .card { transition-delay: 0s; }
  .pillar-grid { grid-template-columns: 1fr; gap: 30px; }
  .pillar-grid .pillar { transition-delay: 0s; }
  .statement { height: 180vh; }
  .hero-sub { letter-spacing: 0.45em; padding-left: 0.45em; }
}
