/*
OXP Intelligence website - shared stylesheet
Implements: home page (index.html), tokens per oxp-group/DESIGN.md, inherited by oxp-ai-bl/DESIGN.md
Author: Zsolt Felber
Copyright: (c) 2026 Oriental xPress Ltd.
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root{
  /* Core palette - oxp-group/DESIGN.md #2.1 */
  --bg:           #07090E; /* Deep Obsidian */
  --surface:      #121620; /* Carbon Navy */
  --border:       #1E293B; /* Slate Grid */
  --accent:       #00F0FF; /* Hyper Electric Cyan */
  --accent-2:     #6366F1; /* Synthetic Indigo */
  --ink:          #F8FAFC; /* Pure Frost */
  --ink-muted:    #94A3B8; /* Titanium Gray */

  /* Extended palette - oxp-group/DESIGN.md #2.1.1 */
  --coral:        #FF6B57; /* Signal Coral */
  --amber-solar:  #FFB84D; /* Solar Amber */
  --violet:       #A78BFA; /* Ultra Violet */
  --orchid:       #E879F9; /* Neon Orchid */
  --success:      #34D399; /* Mint */
  --warning:      #FBBF24; /* Amber */
  --danger:       #F43F5E; /* Rose */
  --surface-raised:#1A2030; /* Raised Navy */
  --ink-subtle:   #7B8AA3; /* Steel Gray */
  --tint-cyan:    rgba(0,240,255,.08);
  --tint-indigo:  rgba(99,102,241,.14);

  --gradient-primary: linear-gradient(135deg, #00F0FF 0%, #6366F1 100%);
  --gradient-surface: linear-gradient(180deg, rgba(18,22,32,.8) 0%, rgba(7,9,14,1) 100%);
  --gradient-border-glow: linear-gradient(90deg, rgba(0,240,255,.5) 0%, rgba(99,102,241,.1) 100%);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 2px;
  --unit: 8px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img,video{max-width:100%;display:block}
a{color:inherit}
.container{width:100%;max-width:1200px;margin:0 auto;padding:0 24px}
h1,h2,h3{font-family:var(--font-display);margin:0;color:var(--ink)}
.eyebrow{
  font-family:var(--font-display);
  font-size:13px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 16px;
}
p{color:var(--ink-muted);margin:0}

/* ---------- Nav ---------- */
.nav{
  position:sticky;top:0;z-index:5;
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 0;
  background:rgba(7,9,14,.78);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.nav .container{display:flex;align-items:center;justify-content:space-between}
.logo img{height:44px;width:auto}
.nav-links{display:flex;align-items:center;gap:32px;list-style:none;margin:0;padding:0}
.nav-links a{
  text-decoration:none;color:var(--ink-muted);font-size:14px;font-weight:500;
  transition:color .18s ease;
}
.nav-links a:hover{color:var(--ink)}
.nav-actions{display:flex;align-items:center;gap:16px}
.lang-switch{display:flex;align-items:center;gap:4px;font-family:var(--font-display);font-size:12px}
.lang-switch button{
  background:none;border:1px solid var(--border);color:var(--ink-muted);
  padding:4px 8px;border-radius:var(--radius);cursor:pointer;font-family:inherit;font-size:inherit;
  transition:border-color .18s ease,color .18s ease;
}
.lang-switch button[aria-pressed="true"]{color:var(--accent);border-color:var(--accent)}
.burger{display:none;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  width:40px;height:36px;align-items:center;justify-content:center;cursor:pointer;}
.burger span,.burger span::before,.burger span::after{
  content:"";display:block;width:18px;height:1.5px;background:var(--ink);position:relative;
}
.burger span::before{position:absolute;top:-6px}
.burger span::after{position:absolute;top:6px}
.menu{display:none}

.oxp-button-primary{
  display:inline-flex;align-items:center;gap:10px;
  background:var(--gradient-primary);
  color:#07090E;
  font-family:var(--font-display);
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
  text-transform:uppercase;
  text-decoration:none;
  padding:12px 24px;
  border:none;
  border-radius:var(--radius);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
}
.oxp-button-primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(0,240,255,.18)}
.oxp-button-primary svg{width:14px;height:12px}

.oxp-button-ghost{
  display:inline-flex;align-items:center;gap:10px;
  background:transparent;
  color:var(--ink);
  font-family:var(--font-display);
  font-weight:600;
  font-size:14px;
  text-decoration:none;
  padding:11px 23px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  transition:border-color .18s ease, color .18s ease;
}
.oxp-button-ghost:hover{border-color:var(--accent);color:var(--accent)}

/* ---------- Hero ---------- */
.hero{
  /* sticky, not relative: pinned at the top of the viewport for exactly its
     own box height, so the section that follows in normal flow slides up and
     visually covers it, then slides back down over it on the way back up -
     no JS scroll-hijacking, just how sticky + document flow interact. */
  position:sticky;
  top:0;
  z-index:1;
  min-height:100vh;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:var(--bg);
}
.hero-video-wrap{position:absolute;inset:0;z-index:0}
.hero-video-wrap video{
  width:100%;height:100%;object-fit:cover;opacity:.3;
}
.hero-inner{position:relative;z-index:1;padding-top:64px;padding-bottom:96px}
.hero h1{
  font-size:clamp(36px,5.4vw,64px);
  font-weight:700;
  line-height:1.1;
  letter-spacing:-.02em;
  max-width:16ch;
}
.hero .sub{
  margin-top:24px;
  max-width:52ch;
  font-size:18px;
  line-height:1.6;
  color:var(--ink-muted);
}
.hero .ctas{margin-top:40px;display:flex;flex-wrap:wrap;gap:16px}

/* ---------- Sections (shared rhythm) ---------- */
section{padding:96px 0}
.pillars{
  /* opaque + a higher stacking position than .hero (which is z-index:1) so
     it fully covers the sticky hero as it slides up over it */
  position:relative;
  z-index:2;
  background:var(--bg);
  border-top:1px solid var(--border);
}
.pillars .lead{margin-top:16px;max-width:60ch;font-size:16px;line-height:1.7}

/* Logo grid: 4 equal, slightly-taller-than-wide cells, separated only by
   1px hairlines (top of the whole grid, under every row, between columns -
   no outer left/right border). */
.pillar-grid{
  margin-top:40px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-top:1px solid var(--border);
}
.pillar-cell{
  position:relative;
  aspect-ratio:328/380;
  overflow:hidden;
  border-right:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.pillar-cell:last-child{border-right:none}

.pillar-logo{
  position:absolute;inset:0;
  z-index:3; /* stays above .pillar-card (z-index 2) so it's still visible once shrunk into the card's corner, not hidden underneath it */
  display:flex;align-items:center;justify-content:center;
  pointer-events:none;
}
.pillar-logo svg{
  position:absolute;top:50%;right:14%;
  width:72%;aspect-ratio:1/1;height:auto;
  color:var(--violet);
  transform:translateY(-50%);
  transition:top .45s cubic-bezier(.22,1,.36,1), right .45s cubic-bezier(.22,1,.36,1), width .45s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.22,1,.36,1);
}

/* Hover card: inset within the cell, starts small/rotated/transparent
   at the cell's center and grows into place. transitions (not keyframe
   animations) so the mouseleave state is just the reverse of entry, for
   free, using the same easing. */
.pillar-card{
  position:absolute;
  inset:10px;
  z-index:2;
  display:flex;flex-direction:column;justify-content:center;gap:10px;
  background:var(--gradient-primary);
  border:1px solid var(--border);
  border-radius:4px; /* DESIGN.md 4.1: max 4px */
  padding:28px;
  transform:scale(.45) rotate(-8deg);
  opacity:0;
  pointer-events:none;
  transition:transform .45s cubic-bezier(.22,1,.36,1), opacity .45s cubic-bezier(.22,1,.36,1);
}
.pillar-card h3{
  font-size:14px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:#07090E;line-height:1.4;
  opacity:0;transform:translateY(8px);
  transition:opacity .35s ease, transform .35s ease;
}
.pillar-card p{
  font-size:14px;line-height:1.7;color:#07090E;
  opacity:0;transform:translateY(8px);
  transition:opacity .35s ease, transform .35s ease;
}

.pillar-cell:hover .pillar-card,
.pillar-cell:focus-within .pillar-card,
.pillar-cell.active .pillar-card{
  transform:scale(1) rotate(0deg);
  opacity:1;
  pointer-events:auto;
}
.pillar-cell:hover .pillar-card h3,
.pillar-cell:focus-within .pillar-card h3,
.pillar-cell.active .pillar-card h3{
  opacity:1;transform:none;transition-delay:.12s;
}
.pillar-cell:hover .pillar-card p,
.pillar-cell:focus-within .pillar-card p,
.pillar-cell.active .pillar-card p{
  opacity:1;transform:none;transition-delay:.18s;
}
.pillar-cell:hover .pillar-logo svg,
.pillar-cell:focus-within .pillar-logo svg,
.pillar-cell.active .pillar-logo svg{
  top:16px;right:16px;width:44px;
  transform:translateY(0);
}
.pillar-cell:hover .pillar-logo svg [stroke="currentColor"],
.pillar-cell:focus-within .pillar-logo svg [stroke="currentColor"],
.pillar-cell.active .pillar-logo svg [stroke="currentColor"]{stroke:#07090E}
.pillar-cell:hover .pillar-logo svg [fill="currentColor"],
.pillar-cell:focus-within .pillar-logo svg [fill="currentColor"],
.pillar-cell.active .pillar-logo svg [fill="currentColor"]{fill:#07090E}

.credentials{}
.credentials .container{
  display:grid;grid-template-columns:1fr;gap:16px;
}
.credentials h2{font-size:clamp(26px,3vw,36px);font-weight:600;margin-bottom:40px}
.cred-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:24px}
.oxp-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:24px;
  color:var(--ink);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.oxp-card:hover{border-color:rgba(0,240,255,.4);box-shadow:0 4px 20px rgba(0,240,255,.05)}
.oxp-card h3{font-size:18px;font-weight:500;margin-bottom:8px}
.oxp-card p{font-size:14px;line-height:1.6}

.crosslink{}
.crosslink .oxp-card{
  display:flex;align-items:center;justify-content:space-between;gap:32px;flex-wrap:wrap;
  padding:32px;
}
.crosslink p{color:var(--ink);font-size:16px;max-width:56ch}
.crosslink strong{color:var(--accent)}

/* ---------- Footer ---------- */
footer{
  border-top:1px solid var(--border);
  padding:64px 0 32px;
}
.footer-grid{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:32px;
  padding-bottom:32px;
}
.footer-endorsement img{height:20px;width:auto;margin-bottom:12px}
.footer-endorsement p{
  font-family:var(--font-body);
  font-weight:500;
  font-size:13px;
  color:var(--ink-muted);
}
.footer-col h3{font-size:13px;font-weight:600;color:var(--ink-muted);letter-spacing:.04em;text-transform:uppercase;margin-bottom:12px}
.footer-col p, .footer-col a{
  display:block;font-size:14px;color:var(--ink-muted);text-decoration:none;margin-bottom:6px;
}
.footer-col a:hover{color:var(--accent)}
.footer-bottom{
  border-top:1px solid var(--border);
  padding-top:24px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;
  font-size:12px;color:var(--ink-muted);
}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  /* 2 columns, 2 rows: vertical hairline between the two columns, horizontal
     hairline under each row (including the last). */
  .pillar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pillar-cell{border-right:1px solid var(--border);border-bottom:1px solid var(--border)}
  .pillar-cell:nth-child(2n){border-right:none}
  .cred-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr;gap:24px}
}
@media (max-width:720px){
  .nav-links{display:none}
  .burger{display:flex}
  .menu.open{
    display:flex;flex-direction:column;position:absolute;top:76px;right:24px;left:24px;
    background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
    padding:8px;z-index:6;gap:4px;
  }
  .menu a{padding:12px;text-decoration:none;color:var(--ink-muted);border-radius:var(--radius)}
  .menu a:hover{background:rgba(255,255,255,.04);color:var(--ink)}
  .hero-inner{padding-top:48px}
  section{padding:64px 0}
}
@media (max-width:560px){
  /* single column: horizontal hairline under each row (including the last),
     no vertical lines. */
  .pillar-grid{grid-template-columns:1fr}
  .pillar-cell{border-right:none;border-bottom:1px solid var(--border)}
}

/* ---------- Scroll-driven animation (CSS animation-timeline: view()) ----------
   No JS, no scroll listeners: animation progress is bound directly to how far
   an element has scrolled through the viewport. Gated behind @supports (so
   browsers without it - Safari, current Firefox - just get the static, fully
   visible end state below) and @media (prefers-reduced-motion: no-preference)
   (so a motion-sensitive user gets the same static end state, not a reduced
   version of the animation). Reference: builder.io/blog/scroll-driven-animations */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hero-inner{
      animation: hero-fade-out linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
    .pillar-cell{
      opacity:0;
      animation: pillar-in linear both;
      animation-timeline: view();
    }
    .pillar-cell:nth-child(1){animation-range: entry 0% entry 55%}
    .pillar-cell:nth-child(2){animation-range: entry 6% entry 61%}
    .pillar-cell:nth-child(3){animation-range: entry 12% entry 67%}
    .pillar-cell:nth-child(4){animation-range: entry 18% entry 73%}
  }
}
@keyframes hero-fade-out{
  0%{opacity:1;scale:1}
  100%{opacity:0;scale:.92}
}
@keyframes pillar-in{
  from{opacity:0;transform:translateY(28px) scale(.97)}
  to{opacity:1;transform:none}
}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
