/* ============================================================
   FILE:    styles.css
   PROJECT: BreachLabs Technologies — breachlabs.tech
   PURPOSE: Single shared stylesheet for all pages.
   ============================================================ */


/* ============================================================
   DESIGN TOKENS
   All brand values defined once here as CSS custom properties.
   Change a value here and it updates everywhere on the site.

   Three values must always stay in sync:
     --bg here
     theme-color meta tag in index.html and 404.html
     background_color + theme_color in site.webmanifest
   ============================================================ */

:root {
  --bg:        #0b0f14;   /* page background                  */
  --surface:   #0D1117;   /* card and panel background        */
  --surface-2: #111827;   /* nested card background           */

  --border: rgba(255, 255, 255, 0.08);  /* semi-transparent so borders work on any surface */

  --text:  rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);

  --accent:   #0DCFCF;   /* brand cyan — used on logo, buttons, links */
  --accent-2: #0AA8A8;   /* darker shade for gradient endpoints        */

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;

  --font-body:    Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Space Grotesk", Inter, sans-serif;
  --font-mono:    "Courier New", "Lucida Console", Consolas, monospace;
}


/* ============================================================
   RESET & BASE
   ============================================================ */

/* border-box means padding and border are included in declared width/height */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;

  /* Two radial glows for depth — base colour fills any remaining area */
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(53, 199, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 10%,  rgba(42, 157, 244, 0.10), transparent 55%),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Visible focus ring for keyboard navigation — :focus-visible targets keyboard only, not mouse clicks */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ============================================================
   LAYOUT
   ============================================================ */

/* min() picks the smaller value — caps width on large screens, adds gutters on small screens */
.container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 12px;
}

/* clamp(min, preferred, max) — fluid size that scales between breakpoints without media queries */
h1 { font-size: clamp(32px, 4vw, 54px); }
h2 { font-size: clamp(22px, 2.4vw, 32px); }
h3 { font-size: 18px; margin-bottom: 8px; }

/* max-width in ch units limits line length to the optimal reading range (~64 characters) */
.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  max-width: 64ch;
}

/* letter-spacing: 0.2em adds breathing room to all-caps text at small sizes */
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}


/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari prefix required */
  background: rgba(11, 15, 20, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 18px;
  flex-wrap: wrap;
}

/* flex: 0 0 auto — logo never shrinks even when nav takes up space */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
  flex: 0 0 auto;
}

/* viewBox is 480×120 (4:1 ratio) — width scales automatically from height */
.brand-wordmark {
  display: block;
  height: 64px;
  width: auto;
  overflow: visible;
  opacity: 0.98;
}

/* margin-left: auto pushes the nav to the right edge */
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap; /* prevents link text wrapping at mid-range widths */
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Contact link styled as a bordered pill to visually separate it from nav links */
.nav-cta {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important; /* !important overrides the .nav a colour rule above */
}


/* ============================================================
   HERO SECTION
   1.15fr / 0.85fr gives copy ~57% width and panel ~43%
   ============================================================ */

.hero {
  padding: 64px 0 24px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start; /* columns align to top edges, panel stays compact */
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.status-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

/* Text colour #06111b is dark navy — readable on cyan gradient and on-brand */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06111b;
}

.btn-primary:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.btn-secondary:hover {
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.16);
}


/* ============================================================
   PILLS & TAGS
   Visually identical — pill used in hero-meta, tag used in cards
   ============================================================ */

.pill,
.tag {
  padding: 6px 10px;
  border-radius: 999px; /* large value produces a pill shape at any height */
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
}

.tag-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* ============================================================
   HERO PANEL (right column)
   overflow: hidden clips the watermark mark that bleeds outside
   ============================================================ */

.hero-panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.65), rgba(16, 24, 38, 0.35));
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden;
}

/* Decorative watermark — positioned to bleed out of the top-right corner */
.hero-mark {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 210px;
  opacity: 0.10;        /* subtle — doesn't compete with content */
  pointer-events: none; /* doesn't intercept clicks */
}

.hero-mark svg {
  width: 100%;
  height: auto;
  display: block;
}

.panel-top {
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 6px;
}

.panel-sub {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.panel-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.panel-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 12px 14px;
}

.panel-k {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.panel-v {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 13px;
}

.panel-foot {
  position: relative;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.panel-link:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}


/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.section {
  padding: 44px 0;
}

/* align-items: flex-end aligns heading and subtitle to their bottom edges — looks balanced at different sizes */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}


/* ============================================================
   GRIDS
   ============================================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}


/* ============================================================
   CARDS
   ============================================================ */

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16, 24, 38, 0.55);
  padding: 18px;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

/* flex-wrap: wrap — badge wraps below the title if the title is long */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* white-space: nowrap prevents "Android · Testing" wrapping mid-phrase */
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* max-width keeps the contact card from stretching full-width on large screens */
.contact-card {
  max-width: 560px;
}

.contact-line {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-label {
  color: var(--muted);
  font-weight: 600;
}


/* ============================================================
   APPROACH TIMELINE
   Two-column grid per step: number column (fixed) + content (fluid)
   ============================================================ */

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 14px;
  transition: border-color 0.2s ease;
}

.step:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.step-index {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.80);
  padding-top: 2px; /* optical alignment with the h3 beside it */
}

.step-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}


/* ============================================================
   404 PAGE
   ============================================================ */

.error-page {
  padding: 96px 0 128px;
  max-width: 560px;
}

/* Large decorative number — colour uses --border so it reads as a ghost watermark */
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -4px;
}


/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 10px 0;
  margin-top: 12px;
}

/* flex-wrap: nowrap keeps the footer on one line */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 13px;
  flex-wrap: nowrap;
  min-height: 52px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0; /* allows flex child to shrink below its content size */
}

.footer-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  flex: 0 0 auto;
  transition: border-color 0.2s ease;
}

.footer-mark:hover {
  border-color: var(--accent);
}

.footer-mark svg {
  width: 20px;
  height: auto;
  display: block;
}


/* ============================================================
   RESPONSIVE — TABLET  (≤920px)
   ============================================================ */

@media (max-width: 920px) {

  .hero-inner {
    grid-template-columns: 1fr; /* stack hero columns vertically */
  }

  .hero-mark {
    width: 180px;
  }

  .brand-wordmark {
    height: 52px;
  }

  .footer-inner {
    flex-wrap: wrap;
    min-height: auto;
  }

}


/* ============================================================
   RESPONSIVE — MOBILE  (≤760px)
   ============================================================ */

@media (max-width: 760px) {

  /* TODO: Add a hamburger menu to replace the hidden nav on mobile */
  .nav {
    display: none;
  }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  .step {
    grid-template-columns: 48px 1fr;
  }

  .brand-wordmark {
    height: 44px;
  }

  .footer-inner {
    flex-wrap: wrap;
    min-height: auto;
  }

}
