/* ═══════════════════════════════════════════════════════
   SEALMATICS — MAIN STYLESHEET
   ═══════════════════════════════════════════════════════ */

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

:root {
  --navy:        #0A1628;
  --navy-mid:    #112240;
  --navy-light:  #1A3357;
  --gold:        #C8A84B;
  --gold-light:  #E2C97E;
  --gold-pale:   #F5EDD4;
  --slate:       #64748B;
  --slate-light: #94A3B8;
  --white:       #FFFFFF;
  --off-white:   #F8F6F1;
  --text-dark:   #0A1628;
  --text-mid:    #3A4A5C;
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --transition:  0.22s ease;
}

html  { scroll-behavior: smooth; }
body  { font-family: var(--font-body); background: var(--white); color: var(--text-dark); overflow-x: hidden; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }

/* ── TOP BAR ──────────────────────────────────────── */
.topbar {
  background: var(--navy);
  color: var(--slate-light);
  font-size: 12px;
  letter-spacing: .03em;
  padding: 8px 0;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: var(--gold-light); }

/* ── NAV ──────────────────────────────────────────── */
nav#main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10,22,40,.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200,168,75,.14);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.logo span { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--slate-light);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: .02em;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold-light); }
.nav-links a.active {
  color: var(--gold);
  font-weight: 500;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
}
.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 500 !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-sm) !important;
  transition: background var(--transition) !important;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ── FLASH ────────────────────────────────────────── */
.flash-container { max-width: 1200px; margin: 20px auto; padding: 0 40px; }
.flash {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 10px;
}
.flash-success {
  background: rgba(200,168,75,.12);
  border: 1px solid rgba(200,168,75,.35);
  color: var(--gold);
}

/* ── SHARED SECTION ───────────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px,4vw,48px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.section-title.light  { color: var(--white); }
.section-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 560px;
  margin-top: 14px;
  font-weight: 300;
}
.section-subtitle.light { color: var(--slate-light); }

/* ── PAGE HERO BANNER (non-home pages) ───────────── */
.page-hero {
  background: var(--navy);
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,168,75,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,75,.04) 1px, transparent 1px);
  background-size: 55px 55px;
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
.page-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .18;
}
.breadcrumb {
  font-size: 12px;
  color: var(--slate-light);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--gold); }
.breadcrumb span { color: var(--slate); }

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 15px 34px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  padding: 15px 34px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  display: inline-block;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--navy);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: inline-block;
}
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }

/* ── STATS BAR ────────────────────────────────────── */
.stats-bar { background: rgba(10,22,40,.92); backdrop-filter: blur(8px); border-top: 1px solid rgba(200,168,75,.1); }
.stats-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; }
.stat-bar-item { flex: 1; padding: 22px 30px; border-right: 1px solid rgba(255,255,255,.05); }
.stat-bar-item:last-child { border-right: none; }
.stat-num { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label { font-size: 12px; color: var(--slate-light); line-height: 1.45; font-weight: 300; margin-top: 4px; }

/* ── PILLARS STRIP ────────────────────────────────── */
.pillars-strip { background: var(--navy-mid); border-bottom: 1px solid rgba(200,168,75,.1); }
.pillars-inner { max-width: 1200px; margin: 0 auto; display: flex; }
.pillar-item { flex: 1; padding: 30px 26px; border-right: 1px solid rgba(255,255,255,.06); display: flex; gap: 14px; align-items: flex-start; }
.pillar-item:last-child { border-right: none; }
.pillar-icon-box { width: 40px; height: 40px; border-radius: 8px; background: rgba(200,168,75,.1); border: 1px solid rgba(200,168,75,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pillar-icon-box svg { width: 20px; height: 20px; }
.pillar-title { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.pillar-text  { font-size: 12px; color: var(--slate-light); line-height: 1.55; font-weight: 300; }

/* ── TECH CARDS (4-up grid) ───────────────────────── */
.tech-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.tech-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4; }
.tech-card-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; }
.tech-card:hover .tech-card-img { transform: scale(1.06); }
.tech-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,22,40,.92) 0%, rgba(10,22,40,.2) 55%, transparent 100%); }
.tech-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 22px 18px; }
.tech-card-tag   { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.tech-card-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 6px; }
.tech-card-note  { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.5; font-weight: 300; }

/* ── SERVICES GRID ────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(255,255,255,.06); border-radius: var(--radius-lg); overflow: hidden; }
.service-card { background: var(--navy-mid); padding: 30px 26px; text-decoration: none; transition: background var(--transition); position: relative; overflow: hidden; display: block; }
.service-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: width .3s ease; }
.service-card:hover { background: var(--navy-light); }
.service-card:hover::after { width: 100%; }
.service-num   { font-family: var(--font-head); font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .12em; margin-bottom: 14px; opacity: .7; }
.service-title { font-family: var(--font-head); font-size: 16px; font-weight: 600; color: var(--white); line-height: 1.3; margin-bottom: 9px; }
.service-desc  { font-size: 13px; color: var(--slate-light); line-height: 1.65; font-weight: 300; }
.service-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--gold); font-weight: 500; opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
.service-card:hover .service-arrow { opacity: 1; transform: translateX(0); }

/* ── FEATURE CARDS ────────────────────────────────── */
.feature-card { padding: 26px; border: 1px solid rgba(10,22,40,.08); border-radius: var(--radius-md); transition: border-color var(--transition), box-shadow var(--transition); }
.feature-card:hover { border-color: var(--gold); box-shadow: 0 4px 24px rgba(200,168,75,.08); }
.feature-icon { width: 42px; height: 42px; background: var(--gold-pale); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon svg { width: 20px; height: 20px; }
.feature-title { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.feature-text  { font-size: 13px; line-height: 1.65; color: var(--slate); font-weight: 300; }

/* ── TESTIMONIAL CARDS ────────────────────────────── */
.t-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; border: 1px solid rgba(10,22,40,.06); }
.t-stars { color: var(--gold); font-size: 13px; margin-bottom: 14px; }
.t-quote { font-size: 14px; line-height: 1.75; color: var(--text-mid); font-weight: 300; font-style: italic; margin-bottom: 22px; }
.t-author { display: flex; align-items: center; gap: 12px; }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.t-name { font-size: 14px; font-weight: 500; color: var(--navy); }
.t-role { font-size: 12px; color: var(--slate); margin-top: 2px; }

/* ── NEWS CARD ────────────────────────────────────── */
.news-card { border: 1px solid rgba(10,22,40,.08); border-radius: var(--radius-md); overflow: hidden; text-decoration: none; display: block; transition: border-color var(--transition), transform var(--transition); }
.news-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.news-img { height: 200px; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-body  { padding: 20px; }
.news-date  { font-size: 11px; color: var(--gold); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.news-title { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.4; }
.news-excerpt { font-size: 13px; color: var(--slate); line-height: 1.6; margin-top: 8px; font-weight: 300; }

/* ── FIELD GRID ───────────────────────────────────── */
.field-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 270px 270px; gap: 16px; }
.field-photo { border-radius: var(--radius-md); overflow: hidden; position: relative; }
.field-photo.tall { grid-row: span 2; }
.field-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; display: block; }
.field-photo:hover img { transform: scale(1.04); }
.field-photo-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px 12px; background: linear-gradient(to top, rgba(10,22,40,.88) 0%, transparent 100%); color: var(--white); font-size: 13px; font-weight: 500; font-family: var(--font-head); }
.field-photo-label small { display: block; font-family: var(--font-body); font-size: 11px; color: rgba(255,255,255,.6); font-weight: 300; margin-top: 2px; }

/* ── FORMS ────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--navy); margin-bottom: 7px; letter-spacing: .02em; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(10,22,40,.15);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,168,75,.1); }
.form-textarea { min-height: 130px; resize: vertical; }


/* Container to keep the messages centered and aligned with your layout */
.flash-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Base styles for all flash messages */
.flash {
  padding: 16px 20px;
  border-radius: var(--radius-md, 8px); /* Uses your existing variable, or defaults to 8px */
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* The exact styling to make the "success" category green */
.flash-success {
  background-color: #d1e7dd; /* Soft green background */
  color: #0f5132;            /* Dark green text */
  border: 1px solid #badbcc;
  border-left: 5px solid #198754; /* A solid green accent line on the left */
}

/* Bonus: It's good practice to add a red one for errors, just in case! */
.flash-error {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
  border-left: 5px solid #dc3545;
}

/* ── FOOTER ───────────────────────────────────────── */
footer { background: #060E1C; padding: 80px 0 40px; color: var(--slate-light); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,.06); }
.footer-logo { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 14px; }
.footer-logo span { color: var(--gold); }
.footer-about { font-size: 13px; line-height: 1.7; font-weight: 300; max-width: 280px; color: var(--slate-light); margin-bottom: 22px; }
.footer-contact-item { font-size: 13px; color: var(--slate-light); margin-bottom: 8px; font-weight: 300; }
.footer-contact-item strong { color: var(--gold); font-weight: 500; display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.footer-col-title { font-family: var(--font-head); font-size: 12px; font-weight: 700; color: var(--white); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links { list-style: none; }
.footer-links li + li { margin-top: 9px; }
.footer-links a { color: var(--slate-light); text-decoration: none; font-size: 13px; font-weight: 300; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-email-input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--white); font-size: 13px; outline: none; font-family: var(--font-body); }
.footer-bottom { padding-top: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--slate); }

/* ── UTILITIES ────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-center { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.gap-right { margin-right: 12px; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1100px) {
  .tech-cards { grid-template-columns: repeat(2,1fr); }
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .pillars-inner { flex-wrap: wrap; }
  .pillar-item { flex: 1 1 45%; }
  .stats-bar-inner { flex-wrap: wrap; }
  .stat-bar-item { flex: 1 1 45%; }
  .field-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .field-photo.tall { grid-row: auto; }
}

@media (max-width: 768px) {
  .topbar-inner { flex-direction: column; gap: 4px; text-align: center; }
  .nav-inner { padding: 0 20px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: rgba(10,22,40,.99);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 4px;
    border-bottom: 1px solid rgba(200,168,75,.15);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 10px 0; display: block; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-links a.active { border-bottom: 1px solid rgba(200,168,75,.3); }
  .nav-cta { margin-top: 10px; text-align: center; display: block !important; }
  .section-inner { padding: 0 20px; }
  .section-title { font-size: 26px; }
  .services-grid, .tech-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 0 20px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .pillars-inner { flex-direction: column; }
  .pillar-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .field-grid { grid-template-columns: 1fr; }
  .stats-bar-inner { flex-direction: column; }
  .flash-container { padding: 0 20px; }
  .page-hero { padding: 60px 0 50px; }
  .page-hero-inner { padding: 0 20px; }
  .btn-primary, .btn-outline { padding: 13px 26px; font-size: 14px; }
}

/* nav scroll shrink */
nav#main-nav.scrolled { border-bottom-color: rgba(200,168,75,.08); }

/* fade-in animation */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
