/* ==========================================================================
   Channels — Brutalist Editorial Landing Page
   Theme colors sourced from lib/core/theme/app_colors.dart (Channels app)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  /* ---- Colors (mapped 1:1 from Channels' own AppColorTokens) ---- */
  --color-carbon-black: #000000;      /* AppColorTokens.brandPrimary */
  --color-paper-white: #ffffff;       /* AppColorTokens.neutralWhite */
  --color-warm-canvas: #e5e5e5;       /* AppColorTokens.neutral300 / borderLight */
  --color-mist-gray: #f5f5f5;         /* AppColorTokens.neutral100 */
  --color-ash: #cccccc;               /* AppColorTokens.neutral350 */
  --color-smoke: #999999;             /* AppColorTokens.neutral500 */
  --color-slate: #666666;             /* AppColorTokens.neutral600 */
  --color-graphite: #1a1a1a;          /* AppColorTokens.neutral900 */

  /* Channels' actual brand accent (app-icon adaptive background) stands in
     for the reference system's mint/yellow accent pair. */
  --color-accent-pale: #fbe7c2;       /* pale tint — tag pills, backgrounds */
  --color-accent: #f5bc46;            /* Channels brand gold — micro-highlights */

  /* Muted category tones — used only on the hero 3D render, echoing how the
     reference system reserves extra color strictly for its cube imagery. */
  --color-cat-sage: #b7c9ae;
  --color-cat-dust: #aec2d6;
  --color-cat-clay: #d9a679;

  --color-error: #f44336;

  /* ---- Typography ---- */
  --font-display: 'Anton', 'SuisseIntlCond', Impact, sans-serif;
  --font-body: 'Inter', 'SuisseIntl', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SuisseIntlMono', ui-monospace, Menlo, monospace;

  /* ---- Spacing ---- */
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-40: 40px;
  --spacing-64: 64px;
  --spacing-80: 80px;
  --spacing-96: 96px;

  /* ---- Layout ---- */
  --page-max-width: 1200px;
  --section-gap: 80px;

  /* ---- Radius ---- */
  --radius-btn: 8px;
  --radius-card: 32px;
  --radius-card-lg: 64px;
  --radius-pill: 48px;
  --radius-tag: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-warm-canvas);
  color: var(--color-carbon-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.wrap {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-40);
}

section {
  padding: var(--section-gap) 0;
}

/* ---- Type scale ---- */
.display-xl {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(48px, 8.5vw, 130px);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 6vw, 80px);
}

.heading {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 3.4vw, 40px);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.03em;
  line-height: 1.6;
  text-transform: uppercase;
}

.body-lg {
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-slate);
}

.body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-slate);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  padding: 16px 24px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-filled {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
  border: 1.5px solid var(--color-carbon-black);
}

.btn-filled:hover {
  opacity: 0.8;
}

.btn-ghost {
  background: transparent;
  color: var(--color-slate);
  border: 1.5px solid var(--color-slate);
}

.btn-ghost:hover {
  border-color: var(--color-carbon-black);
  color: var(--color-carbon-black);
}

.btn-inverted {
  background: var(--color-paper-white);
  color: var(--color-carbon-black);
  border: 1.5px solid var(--color-paper-white);
}

.btn-inverted:hover {
  opacity: 0.85;
}

.link {
  font-size: 16px;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

/* ---- Tag ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent-pale);
  color: var(--color-carbon-black);
  border-radius: var(--radius-tag);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--spacing-24);
  background: linear-gradient(to bottom, var(--color-warm-canvas) 70%, transparent);
}

.nav-pill {
  max-width: var(--page-max-width);
  margin: 0 auto;
  background: var(--color-paper-white);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 24px;
  overflow: hidden;
  transition: background-color 0.35s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  transition: color 0.35s ease;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
  fill: var(--color-carbon-black);
  transition: fill 0.35s ease;
}

/* Context-aware nav: master.js tracks which section sits behind the sticky
   pill and toggles this class so the nav inverts over black sections instead
   of a black-on-black button disappearing. */
body.nav-on-dark .nav-pill {
  background: var(--color-carbon-black);
}

body.nav-on-dark .nav-brand,
body.nav-on-dark .nav-links a {
  color: var(--color-paper-white);
}

body.nav-on-dark .nav-links a:hover {
  color: var(--color-accent);
}

body.nav-on-dark .nav-brand svg {
  fill: var(--color-paper-white);
}

body.nav-on-dark .nav-cta .btn-filled {
  background: var(--color-accent);
  color: var(--color-carbon-black);
  border-color: var(--color-accent);
}

body.nav-on-dark .nav-cta .btn-ghost {
  color: var(--color-paper-white);
  border-color: var(--color-paper-white);
}

body.nav-on-dark .nav-toggle-lines span {
  background: var(--color-paper-white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-24);
}

.nav-links a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate);
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--color-carbon-black);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
}

.nav-cta .btn {
  padding: 12px 20px;
  /* .btn's default 8px radius reads as a mismatched rectangle jammed inside
     the fully-rounded (stadium) .nav-pill. Match the pill's own capsule
     shape here instead — border-radius bigger than half the button's own
     height just clamps to a full stadium end, so this doesn't need to be
     tuned to the pill's exact radius/padding to look concentric. */
  border-radius: var(--radius-pill);
}

/* ---- Language switch (EN / AR) ---- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-mist-gray);
  border-radius: var(--radius-pill);
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-slate);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
  color: var(--color-carbon-black);
}

.lang-btn.is-active {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
}

.lang-btn.is-active:hover {
  color: var(--color-paper-white);
}

body.nav-on-dark .lang-switch {
  background: rgba(255, 255, 255, 0.12);
}

body.nav-on-dark .lang-btn {
  color: var(--color-paper-white);
  opacity: 0.6;
}

body.nav-on-dark .lang-btn:hover {
  opacity: 1;
}

body.nav-on-dark .lang-btn.is-active {
  background: var(--color-accent);
  color: var(--color-carbon-black);
  opacity: 1;
}

.mobile-panel .lang-switch {
  margin-top: var(--spacing-8);
  align-self: flex-start;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-carbon-black);
  position: relative;
}

.nav-toggle span {
  position: absolute;
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-lines span {
  width: 18px;
  height: 1.5px;
  background: var(--color-carbon-black);
  display: block;
}

.mobile-panel {
  display: none;
  max-width: var(--page-max-width);
  margin: 8px auto 0;
  background: var(--color-paper-white);
  border-radius: 24px;
  padding: var(--spacing-16);
  flex-direction: column;
  gap: var(--spacing-8);
  transition: background-color 0.35s ease;
}

.mobile-panel a {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-panel a:hover {
  background: var(--color-mist-gray);
}

.mobile-panel .btn {
  margin-top: var(--spacing-8);
}

body.nav-on-dark .mobile-panel {
  background: var(--color-carbon-black);
}

body.nav-on-dark .mobile-panel a {
  color: var(--color-paper-white);
}

body.nav-on-dark .mobile-panel a:hover {
  background: var(--color-graphite);
}

body.nav-open .mobile-panel {
  display: flex;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: var(--spacing-64);
  padding-bottom: 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden; /* Prevent scrolling if video scales out */
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--spacing-64);
  align-items: center;
  padding-right: 0;
  width: 100%;
}

.hero-copy .tag {
  margin-bottom: var(--spacing-24);
}

.hero-copy h1 {
  margin-bottom: var(--spacing-24);
}

.hero-copy .body-lg {
  max-width: 46ch;
  margin-bottom: var(--spacing-40);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
  flex-wrap: wrap;
}

.hero-note {
  margin-top: var(--spacing-24);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-smoke);
  text-transform: uppercase;
}

/* ---- Hero visual: real device screenshots ----
   Deliberately plain: no 3D, no animation beyond the page's normal scroll
   reveal. The most credible thing a marketplace hero can show is the actual
   product — see CLAUDE.md for why this replaced two rounds of 3D hero. */
.hero-visual {
  position: relative;
  height: 520px;
}

.hero-device-stack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-device {
  position: absolute;
  height: auto; /* override the <img height="707"> attribute — only `width` should size these */
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.18));
}

.hero-device--back {
  width: 220px;
  top: 4%;
  right: 6%;
}

.hero-device--front {
  width: 290px;
  z-index: 1;
}

.float-card {
  position: absolute;
  background: var(--color-paper-white);
  border-radius: var(--radius-card);
  padding: var(--spacing-24);
}

.float-card--chat {
  width: 210px;
  left: 0;
  bottom: 4%;
  background: var(--color-accent);
  transform: rotate(5deg);
  z-index: 2;
}

.float-card--chat .mono-label {
  color: var(--color-carbon-black);
  opacity: 0.6;
  margin-bottom: 8px;
}

.float-card--chat p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

/* ==========================================================================
   Marquee strip
   ========================================================================== */

.marquee {
  border-top: 1.5px solid var(--color-ash);
  border-bottom: 1.5px solid var(--color-ash);
  padding: var(--spacing-24) 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: var(--spacing-64);
  width: max-content;
  animation: scroll-left 28s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--color-smoke);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Features
   ========================================================================== */

.section-head {
  max-width: 640px;
  margin-bottom: var(--spacing-64);
}

.section-head .tag {
  margin-bottom: var(--spacing-24);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-24);
}

.feature-card {
  background: var(--color-paper-white);
  border-radius: var(--radius-card);
  padding: var(--spacing-24);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-card .mono-label {
  color: var(--color-smoke);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.feature-card p {
  font-size: 14px;
  color: var(--color-slate);
  line-height: 1.5;
}

.feature-card--accent {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
}

.feature-card--accent .mono-label {
  color: var(--color-accent);
}

.feature-card--accent p {
  color: #b3b3b3;
}

/* ==========================================================================
   App preview — device mockups
   ========================================================================== */

.device-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--spacing-40);
  flex-wrap: wrap;
}

.device-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-24);
}

/* margin (not transform) so it isn't clobbered by the [data-reveal].is-visible
   rule, which sets its own transform once this figure scrolls into view */
.device-figure--mid {
  margin-bottom: 32px;
}

.device-figure figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.device-figure figcaption .mono-label {
  color: var(--color-smoke);
}

.device-figure figcaption strong {
  font-size: 16px;
  font-weight: 600;
}

.device-shot {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.16));
  transition: transform 0.25s ease;
}

.device-figure:hover .device-shot {
  transform: translateY(-6px);
}

/* ==========================================================================
   AI spotlight (inverted section)
   ========================================================================== */

.ai-section {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
  border-radius: var(--radius-card-lg) var(--radius-card-lg) 0 0;
}

.ai-section .wrap {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-64);
}

.ai-copy {
  max-width: 640px;
}

.ai-copy .tag {
  margin-bottom: var(--spacing-24);
  background: var(--color-accent);
}

.ai-copy h2 {
  margin-bottom: var(--spacing-24);
}

.ai-copy p {
  color: #b3b3b3;
  max-width: 44ch;
  margin-bottom: var(--spacing-40);
  font-size: 16px;
  line-height: 1.5;
}

/* Bold, editorial 3-up panel replacing the earlier phone-chat mockup —
   each cell states one step of the AI flow instead of simulating a chat UI. */
.ai-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.ai-flow-item {
  background: var(--color-graphite);
  padding: var(--spacing-40) var(--spacing-24);
  transition: background-color 0.25s ease;
}

.ai-flow-item:hover {
  background: #262626;
}

.ai-flow-index {
  display: block;
  color: var(--color-accent);
  margin-bottom: var(--spacing-16);
}

.ai-flow-item h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.ai-flow-item p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-smoke);
  max-width: 32ch;
}

.ai-prompts {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
}

.ai-prompts > .mono-label {
  color: var(--color-smoke);
}

.ai-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ai-prompt-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--color-paper-white);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.ai-prompt-chip:hover {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ==========================================================================
   How it works
   ========================================================================== */

.steps {
  background: var(--color-carbon-black);
  padding-top: 0;
}

.steps-inner {
  padding-top: var(--spacing-80);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-24);
}

.step-card {
  background: var(--color-paper-white);
  border-radius: var(--radius-card);
  padding: var(--spacing-24);
  transition: transform 0.25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-smoke);
  margin-bottom: var(--spacing-40);
  display: block;
}

.step-card h3 {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.step-card p {
  font-size: 14px;
  color: var(--color-slate);
}

/* ==========================================================================
   CTA / Download
   ========================================================================== */

/* Background + top-arc live on the full-width section itself (same
   convention as .ai-section / .steps / .site-footer) so the white surface
   spans edge-to-edge instead of sitting inset inside .wrap as a card. */
.cta {
  background: var(--color-paper-white);
  border-radius: var(--radius-card-lg) var(--radius-card-lg) 0 0;
  padding-top: var(--spacing-96);
  padding-bottom: 0;
}

.cta-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-head .tag {
  margin-bottom: var(--spacing-24);
}

.cta-head h2 {
  max-width: 16ch;
  margin-bottom: var(--spacing-24);
}

.cta-head .body-lg {
  max-width: 46ch;
  margin-bottom: var(--spacing-64);
}

/* Bold split-panel, two full-bleed columns divided by a hairline — same
   editorial "big label + one-liner" language as .ai-flow, styled for light
   surfaces. Replaces the earlier small pill-style store buttons. */
.cta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--color-warm-canvas);
  margin: 0 calc(var(--spacing-40) * -1);
}

.cta-split-item {
  padding: var(--spacing-64) var(--spacing-40);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  transition: background-color 0.25s ease;
}

.cta-split-item:hover {
  background: var(--color-mist-gray);
}

.cta-split-item + .cta-split-item {
  border-left: 1px solid var(--color-warm-canvas);
}

.cta-split-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-16);
}

.cta-split-item h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-size: clamp(24px, 3.2vw, 40px);
}

.cta-split-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--color-carbon-black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.cta-split-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-carbon-black);
  transition: fill 0.25s ease;
}

.cta-split-item:hover .cta-split-icon {
  background: var(--color-carbon-black);
  transform: translate(3px, -3px);
}

.cta-split-item:hover .cta-split-icon svg {
  fill: var(--color-paper-white);
}

.cta-split-item p {
  color: var(--color-slate);
  font-size: 14px;
  max-width: 34ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
  padding: var(--spacing-80) 0 var(--spacing-24);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-64);
  padding-bottom: var(--spacing-40);
  border-bottom: 1px solid #2f2f2f;
  margin-bottom: var(--spacing-24);
  flex-wrap: wrap;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  max-width: 320px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
}

.footer-brand svg {
  width: 32px;
  height: 32px;
  fill: var(--color-paper-white);
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.5;
  color: #b3b3b3;
}

.footer-social {
  display: flex;
  gap: var(--spacing-16);
  margin-top: 4px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-graphite);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: var(--color-paper-white);
}

.footer-social a:hover {
  background: var(--color-accent);
}

.footer-social a:hover svg {
  fill: var(--color-carbon-black);
}

.footer-cols {
  display: flex;
  gap: var(--spacing-64);
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--color-smoke);
  margin-bottom: var(--spacing-16);
  letter-spacing: -0.02em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: #d9d9d9;
  transition: color 0.25s ease;
}

.footer-col a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-col a:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-16);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-smoke);
  text-transform: uppercase;
}

.footer-back-top {
  color: var(--color-smoke);
}

.footer-back-top:hover {
  color: var(--color-paper-white);
  text-decoration: underline;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-right: var(--spacing-40);
  }

  .hero-visual {
    height: 440px;
    margin-top: var(--spacing-40);
  }

  .hero-device--front {
    width: 220px;
  }

  .hero-device--back {
    width: 170px;
  }

  .ai-flow {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .device-figure--mid {
    margin-bottom: 0;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-cta .btn,
  .nav-cta .lang-switch {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .device-row {
    flex-direction: column;
    align-items: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .cta {
    padding-top: var(--spacing-64);
  }

  .cta-split {
    grid-template-columns: 1fr;
  }

  .cta-split-item {
    padding: var(--spacing-40) var(--spacing-24);
  }

  .cta-split-item + .cta-split-item {
    border-left: none;
    border-top: 1px solid var(--color-warm-canvas);
  }

  section {
    padding: var(--spacing-64) 0;
  }

  .hero {
    padding-top: var(--spacing-40);
    padding-bottom: var(--spacing-64);
  }
}

@media (max-width: 480px) {
  .float-card--chat {
    width: 170px;
  }

  .hero-visual {
    height: 380px;
  }

  .hero-device--front {
    width: 180px;
  }

  .hero-device--back {
    width: 140px;
  }
}

/* ==========================================================================
   Secondary pages (about.php, support.php)
   ========================================================================== */

.page-header {
  padding-top: var(--spacing-96);
  padding-bottom: var(--spacing-40);
}

.page-header .tag {
  margin-bottom: var(--spacing-24);
}

.page-header-lead {
  max-width: 56ch;
  margin-top: var(--spacing-24);
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-40);
}

.about-col {
  max-width: 52ch;
}

/* Sticky in-page jump nav + content column, used on about.php/support.php
   in place of a plain stacked-sections layout — see CLAUDE.md's "Secondary
   page redesign" note for the dayos.com pages this was adapted from. */
.page-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--spacing-64);
  align-items: start;
}

.page-nav {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding-right: var(--spacing-24);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.page-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-slate);
  transition: color 0.25s ease;
}

.page-nav a:hover {
  color: var(--color-carbon-black);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-96);
  min-width: 0;
}

.page-block .tag {
  margin-bottom: var(--spacing-24);
}

.page-block h2 {
  margin-bottom: var(--spacing-40);
}

/* Bold hairline-divided row list — "number + headline + description" — used
   for Values (about.php) and FAQ (support.php) instead of a card grid. */
.numbered-list {
  display: flex;
  flex-direction: column;
}

.numbered-row {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: var(--spacing-24);
  padding: var(--spacing-24) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.numbered-row:first-child {
  border-top: none;
  padding-top: 0;
}

.numbered-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-ash);
}

.numbered-row h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.numbered-row p {
  font-size: 14px;
  color: var(--color-slate);
  line-height: 1.55;
}

.ai-section .contact-wrap {
  display: block;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-lead {
  color: #b3b3b3;
  font-size: 16px;
  line-height: 1.6;
  margin-top: var(--spacing-24);
}

@media (max-width: 720px) {
  .page-header {
    padding-top: var(--spacing-64);
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .page-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-40);
  }

  .page-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spacing-24);
    padding-right: 0;
    padding-bottom: var(--spacing-24);
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .page-content {
    gap: var(--spacing-64);
  }

  .numbered-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
  }
}

/* ==========================================================================
   RTL (Arabic)
   ========================================================================== */
/* Most of the site needs zero changes here: flex/grid "row" direction, and
   plain block text-align, already flip automatically once `dir="rtl"` is set
   on <html> (see master.js's language switcher). This section only covers
   the handful of rules that use *physical* left/right values, which the CSS
   spec does not flip automatically. If a new component uses `left`/`right`,
   `margin-left`/`-right`, `padding-left`/`-right`, or an asymmetric
   `border-*-radius`, check whether it needs a mirrored entry here too. */

[dir="rtl"] {
  --font-display: 'Tajawal', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Tajawal', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Tajawal', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* .display/.display-xl lean on Anton's own weight for boldness; Tajawal
   needs an explicit weight bump to read with the same punch in Arabic. */
[dir="rtl"] .display,
[dir="rtl"] .display-xl {
  font-weight: 800;
}

/* Anton/JetBrains Mono's negative tracking is tuned for those Latin
   typefaces and actively breaks Arabic letterforms (they're designed to
   join up; tracking pulls them apart). Every component below sets its own
   explicit letter-spacing, which normally always wins over an inherited
   value regardless of specificity — hence !important here, the one place
   on this site it's deliberate: this is a blanket script-level reset, not a
   component override. */
[dir="rtl"] * {
  letter-spacing: normal !important;
}

/* Nav pill: asymmetric padding gives breathing room on the side the brand
   sits on. Flex row auto-mirrors which side that is, so the padding must
   mirror with it. */
[dir="rtl"] .nav-pill {
  padding: 12px 24px 12px 12px;
}

/* Underline-sweep hover: should sweep from the reading-start side, which is
   the right edge in RTL. */
[dir="rtl"] .nav-links a::after,
[dir="rtl"] .footer-col a::after {
  transform-origin: right;
}

/* Hero device stack + floating chat card use physical left/right/top offsets
   to peek out from behind the front screenshot — mirror them so the
   composition still reads correctly once .hero-visual swaps sides. */
[dir="rtl"] .hero .wrap {
  padding-right: var(--spacing-40);
  padding-left: 0;
}

[dir="rtl"] .hero-device--back {
  right: auto;
  left: 6%;
}

[dir="rtl"] .float-card--chat {
  left: auto;
  right: 0;
  transform: rotate(-5deg);
}

/* Split-panel divider: the border belongs on the edge that faces the other
   column, which flips sides once grid auto-mirrors in RTL. */
[dir="rtl"] .cta-split-item + .cta-split-item {
  border-left: none;
  border-right: 1px solid var(--color-warm-canvas);
}

@media (max-width: 720px) {
  [dir="rtl"] .hero .wrap {
    padding-right: var(--spacing-40);
    padding-left: var(--spacing-40);
  }

  [dir="rtl"] .cta-split-item + .cta-split-item {
    border-right: none;
    border-top: 1px solid var(--color-warm-canvas);
  }
}

/* Sidebar divider on about.php/support.php: same logic as the CTA split. */
[dir="rtl"] .page-nav {
  padding-right: 0;
  padding-left: var(--spacing-24);
  border-right: none;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

@media (max-width: 720px) {
  [dir="rtl"] .page-nav {
    padding-left: 0;
    border-left: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }
}
