/* ========== IX RUBY AGENCY — SHARED STYLES ========== */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:ital,opsz,wght@0,14..32,300..700;1,14..32,300..700&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ruby: #C41A3B;
  --ruby-light: #E8304A;
  --ruby-dark: #9E1530;
  --ruby-glow: rgba(196, 26, 59, 0.15);
  --ruby-subtle: rgba(196, 26, 59, 0.06);
  --black: #E8E8E8;
  --gray-900: #CCCCCC;
  --gray-700: #AAAAAA;
  --gray-600: #888888;
  --gray-400: #666666;
  --gray-200: #1E1E1E;
  --gray-100: #161616;
  --white: #0A0A0A;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.3);
  --shadow-ruby: 0 8px 24px rgba(196,26,59,0.3);
  --glass-bg: rgba(10,10,10,0.88);
  --glass-border: rgba(255,255,255,0.06);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); color: #E8E8E8; background: #0A0A0A; overflow-x: hidden; line-height: 1.6; }

/* ========== NAV ========== */
.nav {
  position: fixed; top: 32px; left: 0; right: 0; z-index: 100;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500;
  text-decoration: none; color: var(--black);
}
.nav-logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: #C41A3B; color: #fff;
  font-weight: 700; font-size: 11px; border-radius: 8px;
  transition: transform 0.2s;
}
.nav-logo:hover .nav-logo-badge { transform: scale(1.08); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.85rem; color: var(--gray-600); text-decoration: none;
  letter-spacing: 0.01em; transition: color 0.3s; font-weight: 400;
}
.nav-links a:hover { color: var(--black); }
.nav-links a.active { color: var(--ruby); font-weight: 500; }
.nav-links a.nav-cta {
  font-size: 0.8rem; color: #FFFFFF;
  background: var(--ruby); padding: 10px 24px; border-radius: 100px;
  transition: all 0.3s;
}
.nav-links a.nav-cta:hover { background: var(--ruby-light); color: #FFFFFF; transform: translateY(-1px); }

/* ========== PAGE HEADER ========== */
.page-header {
  padding: 192px 48px 80px;
  max-width: var(--max-width); margin: 0 auto;
}
.page-header.centered { text-align: center; display: flex; flex-direction: column; align-items: center; }
.label {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ruby); margin-bottom: 20px;
  display: inline-block;
}
.heading {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 24px;
}
.heading em { color: var(--ruby); font-style: italic; }
.desc {
  font-size: 1.1rem; color: var(--gray-600); font-weight: 300;
  max-width: 560px; line-height: 1.7;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 100px; font-size: 0.9rem;
  font-weight: 500; text-decoration: none; transition: all 0.3s var(--transition);
  cursor: pointer; border: none; font-family: var(--font-body);
}
.btn-primary { background: var(--ruby); color: #FFFFFF; }
.btn-primary:hover { background: var(--ruby-light); transform: translateY(-2px); box-shadow: var(--shadow-ruby); }
.btn-secondary { background: transparent; color: var(--black); border: 1px solid var(--gray-200); }
.btn-secondary:hover { border-color: var(--ruby); color: var(--ruby); }
.btn-ruby { background: var(--ruby); color: #FFFFFF; }
.btn-ruby:hover { background: var(--ruby-light); transform: translateY(-2px); box-shadow: var(--shadow-ruby); }

/* ========== SECTION ========== */
.section {
  padding: 120px 48px;
  max-width: var(--max-width); margin: 0 auto;
}
.section-full { max-width: 100%; }
.section-border { border-top: 1px solid var(--gray-200); }

/* ========== CARDS ========== */
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 40px;
  transition: all 0.4s var(--transition);
}
.card:hover {
  border-color: rgba(196,26,59,0.2);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(196,26,59,0.1);
  transform: translateY(-4px);
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: all 0.7s var(--transition);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-scale {
  opacity: 0; transform: scale(0.95) translateY(20px);
  transition: all 0.7s var(--transition);
}
.reveal-scale.visible { opacity: 1; transform: scale(1) translateY(0); }

/* ========== FOOTER ========== */
.footer {
  padding: 80px 48px 48px;
  max-width: var(--max-width); margin: 0 auto;
  border-top: 1px solid var(--gray-200);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand .nav-logo { font-size: 1.5rem; display: inline-block; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; color: var(--gray-600); font-weight: 300; max-width: 280px; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 0.9rem; color: var(--gray-600);
  text-decoration: none; margin-bottom: 10px; transition: color 0.3s;
}
.footer-col a:hover { color: var(--ruby); }
.footer-bottom {
  padding-top: 32px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 24px;
}
.footer-bottom p { margin-right: auto; }
.footer-bottom p { font-size: 0.8rem; color: var(--gray-400); font-weight: 300; }
.footer-bottom a { color: var(--gray-400); text-decoration: none; font-size: 0.8rem; }
.footer-bottom a:hover { color: var(--ruby); }

/* ========== IX ECOSYSTEM BAR ========== */
.ix-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 32px; background: #050505;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-body);
}
.ix-bar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.ix-bar-left { display: flex; align-items: center; gap: 20px; }
.ix-bar-logo {
  font-family: var(--font-display); font-size: 14px;
  color: var(--ruby); font-weight: 400; margin-right: 4px;
}
.ix-bar-link {
  font-size: 11px; color: rgba(255,255,255,0.4);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.2s;
}
.ix-bar-link:hover { color: var(--ruby); }
.ix-bar-link.ix-bar-active { color: var(--ruby); }
.ix-bar-right {
  font-size: 11px; color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}
/* ========== SKIP NAV (Accessibility) ========== */
.skip-nav {
  position: absolute; top: -100%; left: 16px; z-index: 999;
  background: var(--ruby); color: #fff; padding: 12px 24px;
  border-radius: 0 0 8px 8px; font-size: 0.85rem; font-weight: 500;
  text-decoration: none; transition: top 0.2s;
}
.skip-nav:focus { top: 0; }

/* ========== FOCUS STATES (Accessibility) ========== */
*:focus-visible {
  outline: 2px solid var(--ruby);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ruby);
  outline-offset: 2px;
}

/* ========== HAMBURGER MENU ========== */
.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; position: relative; z-index: 110;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px; background: var(--black);
  border-radius: 2px; transition: all 0.3s var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(2.5px, 2.5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(2.5px, -2.5px); }

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ruby); color: #fff; border: none;
  font-size: 1.2rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: all 0.3s var(--transition);
  box-shadow: 0 4px 16px rgba(196,26,59,0.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--ruby-light); transform: translateY(-2px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .ix-bar { display: none; }
  .nav { top: 0; padding: 16px 24px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 24px; background: rgba(10,10,10,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    z-index: 105;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { display: block !important; font-size: 1.2rem; color: var(--black); }
  .nav-links a.nav-cta { margin-top: 8px; }
  .page-header, .section { padding-left: 24px; padding-right: 24px; }
  .footer { padding-left: 24px; padding-right: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
