/* ===========================================================
   ByteMechanix — shared styles (Apple-inspired)
   Used by index.html, about.html, contact.html
   =========================================================== */

:root {
  /* Apple-style neutrals */
  --bg:           #fbfbfd;
  --bg-soft:      #f5f5f7;
  --bg-dark:      #1d1d1f;
  --ink:          #1d1d1f;
  --ink-muted:    #6e6e73;
  --ink-soft:     #86868b;
  --line:         #d2d2d7;
  --line-soft:    #e8e8ed;

  /* ByteMechanix brand, restrained */
  --accent:       #2589e8;     /* BMX blue */
  --accent-hover: #0070c9;
  --accent-soft:  #e8f1fc;
  --warm:         #e87525;

  /* Type — SF system stack */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text",
                  "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 28px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

/* ============================== NAV ============================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.8);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  height: 110px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  /* Subtle hover lift for the logo */
  transition: opacity 0.2s ease;
}
.nav-brand:hover { opacity: 0.85; }
.nav-brand img {
  height: 84px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  font-weight: 500;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active {
  color: var(--accent);
  opacity: 1;
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  padding: 12px 22px;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover { color: var(--accent-hover); }
.btn-ghost::after {
  content: "›";
  margin-left: 2px;
  font-size: 19px;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}
.btn-ghost:hover::after { transform: translate(3px, -1px); }

/* ============================== PAGE HERO (smaller than landing) ============================== */
.page-hero {
  text-align: center;
  padding: 100px 22px 70px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90%;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 70% at 30% 20%, rgba(90, 200, 250, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 75% 30%, rgba(37, 137, 232, 0.18) 0%, transparent 60%);
  filter: blur(20px);
  animation: heroDrift 22s ease-in-out infinite alternate;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}
@keyframes heroDrift {
  0%   { background-position: 0% 0%, 100% 0%; }
  50%  { background-position: 10% 5%, 90% 10%; }
  100% { background-position: -5% 8%, 105% 3%; }
}
.page-hero .eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 auto 18px;
  max-width: 820px;
}
.page-hero p {
  font-size: 21px;
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ============================== SECTIONS ============================== */
section { padding: 80px 22px; }
.container { max-width: 1024px; margin: 0 auto; }
.container-narrow { max-width: 760px; margin: 0 auto; }

.section-eyebrow {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}
.section-sub {
  text-align: center;
  font-size: 19px;
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.45;
}

/* ============================== FOOTER ============================== */
footer {
  background: var(--bg-soft);
  padding: 48px 22px 24px;
  font-size: 12px;
  color: var(--ink-muted);
  border-top: 1px solid var(--line-soft);
}
.footer-top {
  max-width: 1024px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.footer-brand img.footer-logo {
  height: 64px;
  width: auto;
  display: block;
  margin-bottom: 14px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1024px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================== REVEAL ANIMATION ============================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  section { padding: 60px 22px; }
  .page-hero { padding: 72px 22px 56px; }
}
@media (max-width: 540px) {
  .nav-links { display: none; }
  .nav-brand img { height: 44px; }
  .nav-inner { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero::before { animation: none; transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
