/* ==========================================================================
   Elowin Engineering — shared site styles
   Used by: index.html, sentinel.html, ingrained.html, support.html

   Variables below are the single place to tune site-wide sizing/color.
   --header-max-width controls ONLY the header/nav wrapper (.header-col),
   included on every page via includes/header-nav.php. Each page's own
   body-content wrapper (.content-col) is sized separately, in that page's
   own <style> block, so the two can be adjusted independently.
   ========================================================================== */

:root {
  --bg: #232323;
  --text-primary: #f5f5f5;
  --text-secondary: #c8c8c8;
  --accent-teal: #4ecdc4;
  --accent-green: #5fb87a;
  --accent-blue: #3b82f6;
  --border-color: rgba(78, 205, 196, 0.16);

  --header-max-width: 1200px;
  --gutter: 64px;
  --gutter-mobile: 24px;

  /* Shared body-content width for sentinel.html, ingrained.html and
     support.html ONLY — they intentionally share this one setting so they
     stay uniform with each other. index.html's home page is independent
     on purpose (its own --home-content-max-width, set in index.html's own
     <style> block) and is not affected by this variable. */
  --subpage-content-max-width: 860px;

  /* How far to nudge the body content (.content-col) left, away from
     center, on wide screens — independent of the header/nav, which stays
     centered on its own. 0px = perfectly centered like the header.
     Increase to shift the content block further left. */
  --subpage-shift-left: 165px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Exo 2', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

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

.eyebrow {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 13px;
  text-transform: uppercase;
}

/* Nav links (used in the shared header/nav partial) */
.navlink {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: inline-block;
}
.navlink:hover { color: var(--text-primary); border-bottom-color: rgba(255, 255, 255, 0.25); }
.navlink.active, .navlink.active:hover { color: var(--accent-teal); border-bottom-color: var(--accent-teal); }

/* "Engineering in progress..." status indicator */
.status-text {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.loading-indicator { display: flex; align-items: center; gap: 3px; }
.loading-indicator .bar {
  width: 3px;
  height: 14px;
  background: var(--accent-teal);
  border-radius: 2px;
  opacity: 0.3;
  animation: pulse-bar 1.2s ease-in-out infinite;
}
.loading-indicator .bar:nth-child(1) { animation-delay: 0s; }
.loading-indicator .bar:nth-child(2) { animation-delay: 0.15s; }
.loading-indicator .bar:nth-child(3) { animation-delay: 0.3s; }
.loading-indicator .bar:nth-child(4) { animation-delay: 0.45s; }
@keyframes pulse-bar { 0%, 100% { opacity: 0.2; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* Entrance animations, used throughout every page */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; animation: fadeSlideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.reveal-fade { opacity: 0; animation: fadeIn 1s ease forwards; }

/* Shared left/right gutter helper (used by the header/nav partial and
   optionally by any page content that should line up with it) */
.pad-64 { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- Header/nav wrapper -------------------------------------------------
   This is the ONE wrapper for the branded header + primary nav, output by
   includes/header-nav.php on every page. Change --header-max-width above
   to resize it site-wide; nothing here affects each page's own content
   width (.content-col), which is defined per-page.
   -------------------------------------------------------------------- */
.header-col { position: relative; max-width: var(--header-max-width); width: 100%; margin: 0 auto; }

.header-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 40px var(--gutter) 0 var(--gutter);
}

.navrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px var(--gutter);
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 780px) {
  .pad-64 { padding-left: var(--gutter-mobile) !important; padding-right: var(--gutter-mobile) !important; }
  .header-row {
    padding-left: var(--gutter-mobile) !important;
    padding-right: var(--gutter-mobile) !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 14px;
  }
  .navrow {
    padding-left: var(--gutter-mobile) !important;
    padding-right: var(--gutter-mobile) !important;
    flex-wrap: wrap;
    gap: 16px !important;
    row-gap: 10px !important;
  }
}

/* ---- Shared subpage content wrapper -------------------------------------
   Used by sentinel.html, ingrained.html and support.html so the three
   share one uniform content width. Change --subpage-content-max-width
   above to resize all three at once. index.html does NOT use this class —
   its content wrapper is defined locally in index.html so it can stay
   exactly as it is regardless of this value.
   -------------------------------------------------------------------- */
.content-col {
  max-width: var(--subpage-content-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 781px) {
  /* Shift left of dead-center by --subpage-shift-left, without touching
     the header/nav (which has its own wrapper, .header-col, and stays
     centered). Only applies above the mobile breakpoint, where there's
     room to shift. Wrapped in max(0px, ...) so on narrower windows —
     where centered content already sits close to the edge — this can
     never go negative and push content off-screen; it just gracefully
     stops shifting instead of clipping. */
  .content-col {
    margin-left: max(0px, calc(50% - (var(--subpage-content-max-width) / 2) - var(--subpage-shift-left)));
    margin-right: auto;
  }
}
@media (max-width: 780px) {
  .content-col { padding: 0 var(--gutter-mobile) !important; }
}
