/* ═══════════════════════════════════════════════════════════
   cloud.core.gen.tr — Sovereign Enterprise Cloud Suite
   Aesthetic: refined-technical / Swiss infrastructure
   Fonts: Instrument Serif (H1) + IBM Plex Sans + IBM Plex Mono
   Palette: #ffffff bg · #f6570d accent · #2a4e6e navy
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset & Base ───────────────────────────────────────── */

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

:root {
  /* Brand tokens — cloud.core.gen.tr MUI theme */
  --brand-primary:      #2a4e6e;
  --brand-primary-2:    #32739e;
  --brand-primary-dark: #096aa5;
  --brand-accent:       #f6570d;
  --brand-accent-2:     #e7721c;
  --brand-accent-3:     #fb6900;

  /* Core palette — light body, navy structural elements, orange accents */
  --bg:          #ffffff;
  --surface:     #f6f8fa;
  --surface-2:   #eef2f6;
  --bg-raised:   var(--surface-2);
  --bg-card:     var(--surface);
  --bg-card-hover: var(--surface-2);

  --border:        #dde3ea;
  --border-strong: #c2cdd9;
  --border-mid:    var(--border-strong);
  --border-hot:    #a8b8cc;

  --text-primary:   #0d1a26;
  --text-secondary: #3d4a5c;
  --text-muted:     #67748a;
  --text-label:     #67748a;

  --accent:      #f6570d;          /* brand orange */
  --accent-2:    #e7721c;
  --accent-dim:  rgba(246,87,13,0.12);
  --accent-glow: rgba(246,87,13,0.06);

  /* Typography */
  --font-serif:  'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:   'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans-ar:'IBM Plex Sans Arabic', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'IBM Plex Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;

  /* Spacing scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --max-w:       1280px;
  --max-w-prose: 72ch;

  /* Transitions */
  --t-fast:   120ms cubic-bezier(0.4,0,0.2,1);
  --t-mid:    220ms cubic-bezier(0.4,0,0.2,1);
  --t-slow:   380ms cubic-bezier(0.4,0,0.2,1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  /* Subtle dot grid background — very faint navy dots on white */
  background-image: radial-gradient(circle, rgba(42,78,110,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Typography utilities ────────────────────────────────── */

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.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;
}

/* ─── Page-load animation ─────────────────────────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Focus ───────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Links ───────────────────────────────────────────────── */

a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   HEADER / NAV
   ═══════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--brand-primary);
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  animation: fade-in 0.4s ease both;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 36px;
  display: block;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.logo-wordmark {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.01em;
  transition: color var(--t-fast);
}

.logo-wordmark:hover {
  color: rgba(255,255,255,0.85);
}

.logo-dot {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 2px;
}

.nav-cta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(246,87,13,0.5);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 3px;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.nav-cta:hover {
  background: rgba(246,87,13,0.15);
  border-color: rgba(246,87,13,0.75);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: var(--sp-32) var(--sp-6) var(--sp-24);
  overflow: hidden;
}

.hero::before {
  /* Horizontal rule accent below hero */
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-mid) 20%, var(--border-mid) 80%, transparent 100%);
}

/* Radial glow behind hero — very subtle navy tint on white */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(42,78,110,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
  animation: fade-up 0.5s 0.1s ease both;
}

.tag-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.dot-sep {
  color: var(--text-muted);
  font-size: 0.6rem;
  opacity: 0.5;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  max-width: 18ch;
  margin-bottom: var(--sp-8);
  animation: fade-up 0.6s 0.18s ease both;
}

.hero-heading em {
  font-style: italic;
  color: var(--text-primary);
  /* Subtle underline with accent */
  background: linear-gradient(to bottom, transparent 60%, rgba(246,87,13,0.25) 60%);
  padding-bottom: 2px;
}

.hero-sub {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 55ch;
  line-height: 1.65;
  margin-bottom: var(--sp-10);
  animation: fade-up 0.6s 0.26s ease both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
  animation: fade-up 0.6s 0.34s ease both;
}

.hero-compliance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-5);
  animation: fade-up 0.6s 0.42s ease both;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.check-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem var(--sp-6);
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-ghost:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.btn-large {
  font-size: 1rem;
  padding: 0.8rem var(--sp-8);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Background ornaments (inline SVG, aria-hidden) ─────── */

/* Base class: all ornaments are absolutely positioned, behind content */
.bg-ornament {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Hero: geometric composition — spans right two-thirds, vertically centered */
.bg-ornament--hero-geo {
  top: 50%;
  inset-inline-end: 0;
  transform: translateY(-50%);
  width: 70%;
  max-width: 1000px;
  min-width: 640px;
  height: auto;
  animation: fade-in 1s 0.5s ease both;
}

/* Thesis: corner quarter-circle gradient — top-right */
.bg-ornament--thesis-arc {
  top: 0;
  inset-inline-end: 0;
  width: 360px;
  height: 360px;
}

/* Stack: vertical hairline — sits in the gutter to the left of .stack-table */
.bg-ornament--stack-line {
  top: 0;
  inset-inline-start: -28px;
  width: 20px;
  height: 100%;
}

/* CTA: wireframe arc — bottom of section, full width */
.bg-ornament--cta-arc {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 400px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION COMMON
   ═══════════════════════════════════════════════════════════ */

.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

/* ═══════════════════════════════════════════════════════════
   PLATFORM THESIS
   ═══════════════════════════════════════════════════════════ */

.thesis {
  position: relative;
  padding: var(--sp-24) var(--sp-6);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.thesis-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

.thesis-header {
  margin-bottom: var(--sp-16);
}

.thesis-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  max-width: 20ch;
}

.thesis-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.pillar {
  background: var(--bg);
  padding: var(--sp-8) var(--sp-8) var(--sp-10);
  transition: background var(--t-mid), box-shadow var(--t-mid);
}

.pillar:hover {
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(13,26,38,0.06);
}

.pillar-number {
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-6);
  display: block;
}

.pillar-title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}

.pillar-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCTS
   ═══════════════════════════════════════════════════════════ */

.products {
  padding: var(--sp-24) var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.products-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.products-header {
  margin-bottom: var(--sp-16);
  max-width: 60ch;
}

.products-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
}

.products-sub {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
}

/* ─── Product Grid ─────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

/* Cards occupy the outer border of the grid */
.product-grid::before {
  display: none;
}

/* ─── Product Card ─────────────────────────────────────────── */

.product-card {
  position: relative;
  background: var(--bg-card);
  transition: background var(--t-mid), box-shadow var(--t-mid);
}

.product-card:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px rgba(13,26,38,0.08);
}

/* Full-card clickable link technique — absolutely positioned overlay */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: inherit;
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Card content sits above the link overlay */
.card-inner {
  position: relative;
  z-index: 2;
  padding: var(--sp-8);
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none; /* let clicks pass to .card-link */
}

.card-inner a,
.card-inner button {
  pointer-events: auto; /* re-enable for real interactive elements */
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  gap: var(--sp-3);
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--brand-primary);
  flex-shrink: 0;
  transition: color var(--t-mid), border-color var(--t-mid), background var(--t-mid);
}

.product-card:hover .card-icon-wrap {
  color: var(--brand-primary-dark);
  border-color: var(--border-strong);
  background: var(--surface);
}

.card-icon {
  width: 20px;
  height: 20px;
}

/* ─── Badges ───────────────────────────────────────────────── */

.card-badges {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}

.badge-ga {
  color: #1a7f4a;
  border-color: rgba(26,127,74,0.25);
  background: rgba(26,127,74,0.06);
}

.badge-beta {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
}

.badge-version {
  color: var(--text-muted);
  border-color: transparent;
  background: transparent;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  padding: 2px 0;
}

/* ─── Card content ─────────────────────────────────────────── */

.card-title {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-tagline {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: var(--sp-4);
  line-height: 1.4;
}

.card-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: var(--sp-6);
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
  flex: 1;
}

.card-features li {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: var(--sp-1) 0;
  padding-inline-start: var(--sp-4);
  position: relative;
  border-top: 1px solid var(--border);
}

.card-features li:last-child {
  border-bottom: 1px solid var(--border);
}

.card-features li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1px;
  background: var(--text-muted);
  opacity: 0.4;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-4);
}

.card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast);
  display: flex;
}

.card-arrow svg {
  width: 16px;
  height: 16px;
}

.product-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

[dir="rtl"] .product-card:hover .card-arrow {
  transform: translateX(-3px);
}

/* Card hover lift animation */
.product-card:hover {
  z-index: 5;
}

/* Staggered card entrance animation — CSS only */
.product-card:nth-child(1) { animation: fade-up 0.5s 0.10s ease both; }
.product-card:nth-child(2) { animation: fade-up 0.5s 0.17s ease both; }
.product-card:nth-child(3) { animation: fade-up 0.5s 0.24s ease both; }
.product-card:nth-child(4) { animation: fade-up 0.5s 0.31s ease both; }
.product-card:nth-child(5) { animation: fade-up 0.5s 0.38s ease both; }
.product-card:nth-child(6) { animation: fade-up 0.5s 0.45s ease both; }

/* ═══════════════════════════════════════════════════════════
   PLATFORM BENEFITS STRIP
   ═══════════════════════════════════════════════════════════ */

.stack {
  position: relative;
  padding: var(--sp-24) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  overflow: hidden;
}

.stack-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--sp-16);
  align-items: start;
}

.stack-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.stack-table {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}

.stack-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background var(--t-fast);
}

.stack-row:last-child {
  border-bottom: none;
}

.stack-row:hover {
  background: rgba(42,78,110,0.04);
}

.stack-layer {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stack-value {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════ */

.cta-section {
  padding: var(--sp-32) var(--sp-6);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-mid) 20%, var(--border-mid) 80%, transparent 100%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  max-width: 60ch;
}

.cta-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
}

.cta-heading em {
  font-style: italic;
}

.cta-body {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: var(--sp-10);
}

.cta-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.site-footer {
  background-color: var(--brand-primary);
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  border-top: 3px solid var(--accent);
  padding: var(--sp-16) var(--sp-6) 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-logo {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}

.footer-tagline {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-company {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.footer-contact {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

.footer-meta a {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
  text-decoration-color: rgba(246,87,13,0.5);
  text-underline-offset: 3px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}

.footer-meta a:hover {
  color: #ffffff;
  text-decoration-color: var(--accent);
}

.footer-demos-label {
  display: block;
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.footer-demo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-demo-list a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast);
}

.footer-demo-list a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-5) 0 var(--sp-6);
}

.footer-bottom .mono {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* ─── 1024px and below: tweak grid proportions ─────────────── */
@media (max-width: 1024px) {
  .thesis-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .footer-demos {
    grid-column: 1 / -1;
  }

  .footer-demo-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-3) var(--sp-6);
  }

  /* Scale hero composition down at tablet; keep visible but restrained */
  .bg-ornament--hero-geo {
    width: 55%;
    min-width: 400px;
    opacity: 0.7;
  }

  .bg-ornament--stack-line {
    display: none;
  }
}

/* ─── 720px: scale down remaining ornaments ─────────────────── */
@media (max-width: 720px) {
  .bg-ornament--thesis-arc {
    width: 220px;
    height: 220px;
  }

  .bg-ornament--cta-arc {
    transform: scale(0.7);
    transform-origin: bottom center;
  }

  /* Hero geo: shrink to bottom-right quadrant on small screens */
  .bg-ornament--hero-geo {
    width: 90%;
    min-width: 0;
    top: auto;
    bottom: 0;
    transform: none;
    opacity: 0.5;
  }
}

/* ─── 768px: switch to 2-col product grid ──────────────────── */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: var(--sp-20) var(--sp-5) var(--sp-16);
  }

  .thesis {
    padding: var(--sp-16) var(--sp-5);
  }

  .products,
  .stack,
  .cta-section {
    padding: var(--sp-16) var(--sp-5);
  }

  .nav-inner {
    padding: 0 var(--sp-5);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .footer-demos {
    grid-column: auto;
  }
}

/* ─── 480px: 1-col product grid ─────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --sp-8:  1.5rem;
    --sp-10: 2rem;
    --sp-12: 2.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .thesis-pillars {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start; /* overridden to flex-end for RTL below */
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-compliance {
    gap: var(--sp-3);
  }

  .nav-badge {
    display: none;
  }

  .stack-row {
    grid-template-columns: 120px 1fr;
    gap: var(--sp-4);
    padding: var(--sp-4);
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn {
    text-align: center;
    justify-content: center;
  }
}

/* ─── 375px: minimum supported width ───────────────────────── */
@media (max-width: 375px) {
  .logo-wordmark {
    font-size: 0.75rem;
  }

  .card-inner {
    padding: var(--sp-5);
  }
}

/* ═══════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════ */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  padding: 2px;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 3px 7px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}

.lang-btn:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
}

.lang-btn--active {
  color: #ffffff;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════════════════════════
   ARABIC / RTL OVERRIDES
   ═══════════════════════════════════════════════════════════ */

/* Arabic font stack — IBM Plex Sans Arabic for all UI text */
[lang="ar"] body,
[lang="ar"] .pillar-body,
[lang="ar"] .products-sub,
[lang="ar"] .hero-sub,
[lang="ar"] .card-tagline,
[lang="ar"] .card-summary,
[lang="ar"] .card-features,
[lang="ar"] .cta-body,
[lang="ar"] .footer-company,
[lang="ar"] .footer-tagline,
[lang="ar"] .footer-bottom .mono {
  font-family: var(--font-sans-ar);
}

/* H1, H2, H3 headings: use IBM Plex Sans Arabic (no Arabic serif) */
[lang="ar"] .hero-heading,
[lang="ar"] .thesis-heading,
[lang="ar"] .products-heading,
[lang="ar"] .stack-heading,
[lang="ar"] .cta-heading,
[lang="ar"] .pillar-title,
[lang="ar"] .card-title {
  font-family: var(--font-sans-ar);
  font-style: normal;
}

/* Italic em inside headings — Arabic doesn't use italic; remove style */
[lang="ar"] .hero-heading em,
[lang="ar"] .cta-heading em {
  font-style: normal;
}

/* Section labels use Arabic family too */
[lang="ar"] .section-label,
[lang="ar"] .nav-badge,
[lang="ar"] .nav-cta,
[lang="ar"] .btn {
  font-family: var(--font-sans-ar);
}

/* RTL: flip the hero divider gradient so it mirrors correctly */
[dir="rtl"] .hero::before,
[dir="rtl"] .cta-section::before {
  background: linear-gradient(270deg, transparent 0%, var(--border-mid) 20%, var(--border-mid) 80%, transparent 100%);
}

/* RTL: thesis corner arc — mirror to top-left (inset-inline-end → inset-inline-start) */
/* inset-inline-* already handles logical mirroring, no additional override needed for hero rings (symmetric) */
/* Stack hairline: inset-inline-start with calc stays logically correct in both directions */

/* RTL: card badges — right-align group becomes left-align in RTL */
[dir="rtl"] .card-badges {
  justify-content: flex-start;
}

/* RTL: stack table labels */
[dir="rtl"] .stack-layer {
  text-align: start;
}

/* RTL: 480px mobile — hero actions align to end (right in LTR, left in RTL) */
@media (max-width: 480px) {
  [dir="rtl"] .hero-actions {
    align-items: flex-end;
  }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   THEME EDITOR  (overlay; never affects page layout)
   ═══════════════════════════════════════════════════════════ */

/* ─── Toggle button ──────────────────────────────────────── */

#te-toggle {
  position: fixed;
  inset-block-end: var(--sp-6);
  inset-inline-end: var(--sp-6);
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: none;
  background: var(--brand-primary);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(10,20,30,0.22);
  transition: background var(--t-fast), box-shadow var(--t-fast);
  padding: 0;
}

#te-toggle:hover {
  background: var(--brand-primary-2);
  box-shadow: 0 4px 14px rgba(10,20,30,0.28);
}

#te-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ─── Side panel ─────────────────────────────────────────── */

#te-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  width: 320px;
  z-index: 199;
  background: var(--bg);
  border-inline-start: 1px solid var(--brand-primary);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(10,20,30,0.14);
  font-family: var(--font-sans);
  overflow: hidden;
  /* slide-in animation — translate from logical end */
  animation: te-slide-in var(--t-mid) forwards;
}

#te-panel[hidden] {
  display: none;
}

@keyframes te-slide-in {
  from { translate: 100%; }
  to   { translate: 0; }
}

[dir="rtl"] #te-panel {
  animation-name: te-slide-in-rtl;
}

@keyframes te-slide-in-rtl {
  from { translate: -100%; }
  to   { translate: 0; }
}

/* ─── Panel header ───────────────────────────────────────── */

.te-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-block-end: 1px solid var(--border);
  flex-shrink: 0;
}

.te-header h2 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0;
}

#te-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.375rem;
  line-height: 1;
  padding: 0 var(--sp-1);
  border-radius: 2px;
  transition: color var(--t-fast);
}

#te-close:hover {
  color: var(--text-primary);
}

/* ─── Panel body (scrollable) ────────────────────────────── */

.te-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ─── Section heading ────────────────────────────────────── */

.te-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.te-section-heading {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  padding-block-end: var(--sp-2);
  border-block-end: 1px solid var(--border);
}

/* ─── Picker row ─────────────────────────────────────────── */

.te-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.te-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
}

.te-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.te-color-swatch {
  width: 36px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 1px 2px;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

.te-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 2px;
}

.te-color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.te-hex-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: var(--sp-1) var(--sp-2);
  height: 28px;
  outline: none;
  transition: border-color var(--t-fast);
}

.te-hex-input:focus {
  border-color: var(--brand-primary);
}

.te-var-name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ─── Panel footer ───────────────────────────────────────── */

.te-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-block-start: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.te-btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid transparent;
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  line-height: 1.4;
}

.te-btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.te-btn-primary:hover {
  background: var(--brand-primary-2);
  border-color: var(--brand-primary-2);
}

.te-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.te-btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--brand-primary);
}

.te-export-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  min-width: 0;
}

/* ─── Panel header tagline ───────────────────────────────── */

.te-heading-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.te-tagline {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  max-width: 220px;
}

/* ─── Preset grid ────────────────────────────────────────── */

.te-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.te-preset-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  text-align: start;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.te-preset-card:hover {
  border-color: var(--brand-primary-2);
  background: var(--surface-2);
}

.te-preset-card.te-preset-active {
  border-color: var(--brand-primary);
  outline: 1px solid var(--brand-primary);
  outline-offset: -1px;
}

.te-preset-name {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.te-preset-swatches {
  display: flex;
  gap: 4px;
  align-items: center;
}

.te-preset-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Font select ────────────────────────────────────────── */

.te-font-select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: var(--sp-1) var(--sp-2);
  height: 28px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2367748a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-inline-end: 24px;
}

.te-font-select:focus {
  border-color: var(--brand-primary);
}
