/*
 * styles.css — Inihcrats shared stylesheet
 * Covers: reset, tokens, skip link, focus, body, glows, page wrapper,
 *         nav, currency toggle, section headers, buttons, utilities,
 *         footer, responsive, print
 *
 * All sizes use rem (16px base). letter-spacing uses em.
 * Page-specific styles live in each HTML file's <style> block.
 */

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── DESIGN TOKENS ──────────────────────────────────────────────────
   Contrast ratios verified against WCAG AA on #090912 background:
   --text:           #eeeef8  ~16:1  ✓ AAA
   --text-secondary: #b8b8d4  ~9:1   ✓ AAA
   --text-tertiary:  #8888aa  ~5.2:1 ✓ AA
   --text-caption:   #7878a0  ~4.6:1 ✓ AA (large/bold only)
   --accent:         #a78bfa  ~6.8:1 ✓ AA
─────────────────────────────────────────────────────────────────── */
:root {
  /* Colour palette */
  --accent:         #a78bfa;
  --accent-bright:  #c084fc;
  --accent-dim:     #7c5fc9;
  --accent-cyan:    #38bdf8;
  --bg:             #090912;
  --surface:        #111122;
  --surface2:       #18183a;
  --surface-deep:   #0f0f20;  /* card gradient endpoint */
  --border:         #242440;
  --border-bright:  #3a3a60;
  --text:           #eeeef8;
  --text-secondary: #b8b8d4;
  --text-tertiary:  #8888aa;
  --text-caption:   #7878a0;

  /* Border-radius scale */
  --radius-xs:  0.25rem;   /*  4px — focus rings          */
  --radius-sm:  0.625rem;  /* 10px — chips, notices       */
  --radius-md:  1rem;      /* 16px — standard cards       */
  --radius-lg:  1.25rem;   /* 20px — larger cards         */
  --radius-xl:  1.5rem;    /* 24px — pills, nav items     */
  --radius-2xl: 1.75rem;   /* 28px — CTA buttons          */
}

/* ── SCREEN-READER ONLY UTILITY ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── SMOOTH SCROLL (motion-safe only) ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1.25rem;
  background: var(--accent);
  color: #000;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
}
@media (prefers-reduced-motion: no-preference) {
  .skip-link { transition: top 0.2s; }
}
.skip-link:focus { top: 1.25rem; }

/* ── FOCUS ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── VISUALLY HIDDEN — accessible but invisible ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── ROOT + BODY ── */
html {
  overscroll-behavior-x: none;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overscroll-behavior-x: none;
  line-height: 1.6;
}

/* ── AMBIENT GLOWS ── */
@keyframes driftPurple {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(65vw, 30vh); }
  40%  { transform: translate(80vw, 70vh); }
  60%  { transform: translate(30vw, 90vh); }
  80%  { transform: translate(-5vw, 50vh); }
  100% { transform: translate(0, 0); }
}
@keyframes driftCyan {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-65vw, 50vh); }
  40%  { transform: translate(-15vw, 85vh); }
  60%  { transform: translate(-5vw,  30vh); }
  80%  { transform: translate(-55vw, -5vh); }
  100% { transform: translate(0, 0); }
}

body::before, body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: -20%;
  left: -10%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(ellipse, rgba(167,139,250,0.55) 0%, rgba(124,95,201,0.20) 45%, transparent 70%);
  will-change: transform;
}
body::after {
  top: -10%;
  right: -5%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(ellipse, rgba(56,189,248,0.40) 0%, rgba(14,165,233,0.14) 45%, transparent 70%);
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: driftPurple 40s ease-in-out infinite; }
  body::after  { animation: driftCyan   48s ease-in-out infinite; }
}

/* ── PAGE WRAPPER ── */
.page {
  position: relative;
  z-index: 1;
  max-width: 87.5rem;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 6.25rem);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

/* ── NAV ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 5.625rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

nav.scrolled::before {
  background: rgba(9, 9, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5625rem 1rem;
  border-radius: var(--radius-xl);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-link { transition: color 0.2s; }
}
.nav-link:hover  { color: var(--text); }
.nav-link.active { color: var(--accent); }

.nav-contact {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-bright);
  padding: 0.5625rem 1.375rem;
  border-radius: var(--radius-xl);
  text-decoration: none;
  margin-left: 0.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-contact { transition: border-color 0.2s, color 0.2s, background 0.2s; }
}
.nav-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(167,139,250,0.08);
}

/* ── CURRENCY TOGGLE ── */
.currency-toggle {
  display: flex;
  align-items: center;
  gap: 0.1875rem;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 0.375rem;
}

.curr-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .curr-btn { transition: background 0.2s, color 0.2s; }
}
.curr-btn.active {
  background: var(--surface2);
  color: var(--text);
}

.currency-disclaimer {
  background: rgba(167,139,250,0.07);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: var(--radius-sm);
  padding: 0.625rem 1.125rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ── HERO EYEBROW ── */
.hero-eyebrow {
  display: inline-block;
  width: fit-content;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.35);
  padding: 0.4375rem 1.125rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #a78bfa 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SECTION HEADERS ── */
.section-header { margin-bottom: 1.75rem; }

.section-label {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-2xl);
  text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-primary { transition: opacity 0.2s, transform 0.2s; }
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-bright);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-2xl);
  text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-secondary { transition: border-color 0.2s, color 0.2s; }
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── UTILITIES ── */

/* Shared card surface — gradient + border pattern used across all card types */
.card-surface {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-deep) 100%);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-bright);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

@keyframes orbDriftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(-15px, 20px) scale(1.08); }
  50%       { transform: translate(20px, -10px) scale(0.94); }
  75%       { transform: translate(-10px, -20px) scale(1.05); }
}
@keyframes orbDriftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(18px, -15px) scale(1.06); }
  50%       { transform: translate(-12px, 18px) scale(0.96); }
  75%       { transform: translate(15px, 10px) scale(1.03); }
}

.card-surface::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 130%;
  height: 130%;
  background: radial-gradient(ellipse, rgba(167,139,250,0.22) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.card-surface::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: -40%;
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(56,189,248,0.16) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .card-surface::before { animation: orbDriftA 14s ease-in-out infinite; }
  .card-surface::after  { animation: orbDriftB 18s ease-in-out infinite; }

  .card-surface:nth-child(2)::before { animation-duration: 17s; animation-delay: -4s; }
  .card-surface:nth-child(2)::after  { animation-duration: 13s; animation-delay: -7s; }
  .card-surface:nth-child(3)::before { animation-duration: 20s; animation-delay: -9s; }
  .card-surface:nth-child(3)::after  { animation-duration: 15s; animation-delay: -3s; }
  .card-surface:nth-child(4)::before { animation-duration: 16s; animation-delay: -11s; }
  .card-surface:nth-child(4)::after  { animation-duration: 22s; animation-delay: -5s; }
  .card-surface:nth-child(5)::before { animation-duration: 19s; animation-delay: -2s; }
  .card-surface:nth-child(5)::after  { animation-duration: 12s; animation-delay: -8s; }
  .card-surface:nth-child(6)::before { animation-duration: 15s; animation-delay: -6s; }
  .card-surface:nth-child(6)::after  { animation-duration: 20s; animation-delay: -1s; }
}

.card-surface > *:not(.card-grid-wrap) {
  position: relative;
  z-index: 2;
}

/* Thin horizontal rule */
.divider {
  height: 1px;
  background: var(--border);
}

/* ── NAV LOGO IMAGE ── */
.nav-logo-img {
  height: 8rem;
  width: auto;
  display: block;
  transform: translateY(1rem);
  transition: height 0.4s ease, transform 0.4s ease;
}

nav.scrolled .nav-logo-img {
  height: 5rem;
  transform: translateY(0);
}

/* ── ENTRANCE ANIMATION ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── SCROLL REVEAL — CSS fallback ── */
/* JS overrides these via inline styles; these act as fallback and document intent */
[data-reveal] {
  opacity: 0.1;
  transform: translateY(16px);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
footer p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.8;
}
footer .brand {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: var(--accent);
}

footer .footer-terms a {
  font-size: 0.8125rem;
  color: var(--text-caption);
  text-decoration: none;
}

footer .footer-terms a:hover { color: var(--text-tertiary); }

/* ── NAV OVERLAY ── */
.nav-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: rgba(9, 9, 18, 0.75);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-overlay { transition: opacity 0.3s ease, visibility 0.3s; }
}
.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── BURGER BUTTON ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 101;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-burger span { transition: transform 0.25s ease, opacity 0.25s ease; }
}
nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-burger { display: flex; order: -1; }

  #nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: 100vw;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    list-style: none;
    background: rgba(9, 9, 18, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  nav.nav-open #nav-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  #nav-menu .nav-link {
    display: block;
    padding: 1.375rem clamp(1.5rem, 5vw, 6.25rem);
    border-radius: 0;
    text-align: left;
    font-size: 1.125rem;
  }

  #nav-menu .nav-link.active { background: rgba(167, 139, 250, 0.08); }

  #nav-menu .nav-contact {
    display: block;
    margin: 1rem clamp(1.5rem, 5vw, 6.25rem) 0.25rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    border: none;
  }

  /* Shrink logo on mobile */
  .nav-logo-img { height: 4rem !important; transform: translateY(0) !important; }
  nav.scrolled .nav-logo-img { height: 3.5rem !important; }

  /* web-services: Get in touch lives in dropdown on mobile, top bar on desktop */
  .nav-contact-mobile { display: list-item; }
  .nav-contact-desktop { display: none !important; }

  nav { margin-bottom: 3.125rem; }
  footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  #nav-menu { transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s; }
}

@media (min-width: 769px) {
  .nav-contact-mobile { display: none; }
}

@media (max-width: 640px) {
  nav { margin-bottom: 2rem; }
}

@media (max-width: 768px) {
  .page .hero h1 { font-size: 2.25rem; }
}


/* ── PRINT ── */
@media print {
  body, .page { background: #fff !important; color: #111 !important; }
  body::before, body::after { display: none; }
  nav, .skip-link, .currency-toggle, .currency-disclaimer { display: none; }
}


/* ── USD NOTE ASTERISK ── */
.usd-note {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.65em;
  vertical-align: super;
}

.usd-note:hover {
  text-decoration: underline;
}
