/* ============ ARABIC DISPLAY TYPOGRAPHY RULES ============
   Arabic display headlines (hero h1):
   - Long phrases (3+ words) at font-size > 4rem → font-weight: 700
     Reason: Tajawal 800 at large sizes creates excessive ink density on
     multi-word Arabic phrases, making text feel crowded.
   - Short phrases (1–2 words) or Latin text → font-weight: 800 is fine.
   - Never use negative letter-spacing on Arabic text — it breaks letterform
     connections (Arabic is a cursive script; letters must join their neighbors).
     Max allowed: letter-spacing: 0 on Arabic headings.
*/

/* ============ NAVBAR ============ */
site-header {
  display: block;
  background: var(--teal-200);
  border-block-end: 1px solid var(--line-on-teal);
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  min-height: 66px;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line-on-teal);
  padding-block: 5px;
  padding-inline-start: 12px;
  padding-inline-end: 5px;
  border-radius: 999px;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  flex-shrink: 0;
}

.brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -6px rgba(0, 56, 46, 0.25);
}

.brand-mark {
  width: 28px; height: 28px;
  background: var(--teal-800);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  border-radius: 999px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500;
  color: var(--ink-on-teal);
}

.brand-name .dot { color: var(--teal-500); font-weight: 600; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 12px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-on-teal);
  border-radius: 999px;
  background: transparent;
  transition: background 120ms var(--ease-out), color 120ms var(--ease-out);
  white-space: nowrap;
}

.nav-link:hover { background: var(--bg); color: var(--teal-800); }

.nav-link.active { background: var(--bg); color: var(--teal-800); }

.nav-link.active::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--teal-500);
  margin-inline-end: 4px;
}

.nav-cta {
  background: var(--teal-800);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
  flex-shrink: 0;
}

.nav-cta:hover { background: var(--teal-900); }
.nav-cta:active { transform: scale(0.97); }

.mobile-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--line-on-teal);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink-on-teal);
  font-size: 12px;
  font-weight: 500;
  margin-inline-start: auto;
}

/* ============ HERO ============ */
.hero {
  background: var(--teal-100);
  padding: 96px 32px 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: ''; position: absolute;
  inset-block-start: 40px; inset-inline-end: 8%;
  width: 180px; height: 180px;
  background: var(--teal-200);
  border-radius: 50%; opacity: 0.35;
  z-index: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.hero::after {
  content: ''; position: absolute;
  inset-block-end: 40px; inset-inline-start: 6%;
  width: 80px; height: 80px;
  background: var(--teal-300);
  border-radius: 50%; opacity: 0.35;
  z-index: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.hero-inner {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0; transform: translateY(10px);
  animation: rise 700ms var(--ease-out) 80ms forwards;
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-on-teal);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  color: var(--teal-800);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-block-end: 32px;
}

.hero-eyebrow .pulse {
  width: 6px; height: 6px;
  background: var(--teal-500);
  border-radius: 50%;
  position: relative;
}

.hero-eyebrow .pulse::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: 50%; background: var(--teal-500);
  opacity: 0.3;
  animation: pulse 2s var(--ease-in-out) infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50%       { transform: scale(1.6); opacity: 0; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 112px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
}

.hero h1 .dot { color: var(--teal-700); }

.hero .tagline {
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-on-teal);
  margin: 0 auto 32px;
  max-width: 480px;
  line-height: 1.6;
}

.btn-primary {
  background: var(--teal-800);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
  display: inline-block;
}

.btn-primary:hover { background: var(--teal-900); }
.btn-primary:active { transform: scale(0.97); }

/* ============ UPDATES ============ */
.updates {
  background: var(--teal-50);
  padding: 64px 0 56px;
  border-block-end: 1px solid var(--line-mid);
}

.updates-head {
  display: flex; align-items: center;
  gap: 12px;
  margin-block-end: 32px;
}

.live-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal-500);
  position: relative;
  flex-shrink: 0;
}

.live-dot::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%; background: var(--teal-500);
  opacity: 0.3;
  animation: pulse 2s var(--ease-in-out) infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.updates-head .live-label {
  font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 600;
}

.updates-head h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 500;
  margin: 0;
  color: var(--ink);
  margin-inline-start: auto;
}

.update {
  display: grid;
  grid-template-columns: 130px 110px 1fr 20px;
  gap: 24px;
  padding: 18px 0;
  border-block-end: 1px solid var(--line-mid);
  align-items: center;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
  color: inherit;
}

.update:last-child { border-block-end: none; }
.update:hover { transform: translateX(-6px); }

.update .date {
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.update .tag {
  font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 600;
  border: 1px solid var(--teal-300);
  background: var(--bg);
  padding: 5px 10px;
  border-radius: 999px;
  text-align: center;
  justify-self: start;
}

.update .headline {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.6;
}

.update:hover .headline { color: var(--teal-800); }

.update .arrow {
  color: var(--teal-700);
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}

.update:hover .arrow { opacity: 1; }

/* ============ SECTIONS ============ */
section.std { padding: 88px 0 32px; }
.section-head { margin-block-end: 48px; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-head .lede { margin: 0; font-size: 14px; color: var(--ink-2); }

.section-head .eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 600;
  margin-block-end: 12px;
}

.section-head .eyebrow .sep { color: var(--ink-3); margin: 0 6px; }

.section-head .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.section-head.center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-700);
  letter-spacing: 0.1em;
  border-block-end: 1px solid var(--teal-300);
  padding-block-end: 2px;
  white-space: nowrap;
  transition: color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.view-all:hover { color: var(--teal-800); border-block-end-color: var(--teal-700); }

/* ============ ARTICLES & LESSONS (newspaper style) ============ */
.articles { border-block-start: 2px solid var(--ink); }

.article {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-block-end: 1px solid var(--line);
  align-items: baseline;
  cursor: pointer;
  transition: padding-inline-start 120ms var(--ease-out);
  color: inherit;
}

.article:hover { padding-inline-start: 8px; }

.article .meta-col {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
}

.article .meta-col .category {
  color: var(--teal-700);
  display: block;
  margin-block-end: 6px;
  font-weight: 600;
}

.article h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--ink);
}

.article p {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.7;
}

.article .read {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  transition: color 140ms var(--ease-out);
}

.article:hover .read { color: var(--teal-700); }

/* ============ RANDOM THOUGHTS ============ */
.thoughts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.thought {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 28px 32px;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), border-color 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}

.thought:hover {
  transform: translateY(-3px);
  border-color: var(--teal-300);
  box-shadow: 0 12px 28px -16px rgba(0, 56, 46, 0.25);
}

.thought .num {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 18px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

.thought .body {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  text-align: center;
}

.thought.accent-teal { border-color: var(--teal-400); border-width: 1.5px; }
.thought.accent-deep  { border-color: var(--teal-700); border-width: 1.5px; }

/* ============ TILE GRID ============ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.tile {
  position: relative;
  padding: 40px 24px 36px;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg);
  transition: background 120ms var(--ease-out);
  cursor: pointer;
}

.tile:hover { background: var(--teal-50); }

.tile.tile--soon {
  cursor: default;
  opacity: 0.6;
}

.tile.tile--soon:hover { background: var(--bg); }

.tile .illus {
  width: 96px; height: 96px;
  margin-block-end: 24px;
  transition: transform 120ms var(--ease-out);
}

.tile:hover .illus { transform: translateY(-3px) rotate(-1deg); }
.tile.tile--soon:hover .illus { transform: none; }

.tile .name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}

.tile .desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  margin: 0 0 12px;
}

.tile .platform {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tile.featured {
  background: var(--teal-800);
  color: var(--bg);
  cursor: pointer;
  opacity: 1;
}

.tile.featured .name    { color: var(--bg); }
.tile.featured .desc    { color: rgba(255, 255, 255, 0.78); }
.tile.featured .platform { color: var(--teal-200); }
.tile.featured:hover    { background: var(--teal-900); }

.coming-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-700);
  border: 1px solid var(--teal-300);
  padding: 3px 8px;
  border-radius: 999px;
  margin-block-end: 8px;
}

/* ============ ABOUT ============ */
.about-wrap {
  background: var(--teal-50);
  margin-block-start: 88px;
  padding: 80px 0;
  border-block: 1px solid var(--line-mid);
}

.about {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.about h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--ink);
}

.about p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 8px;
  line-height: 1.85;
}

.about .more {
  display: inline-block;
  margin-block-start: 28px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-700);
  border-block-end: 1px solid var(--teal-300);
  padding-block-end: 2px;
  transition: color 140ms var(--ease-out);
}

.about .more:hover { color: var(--teal-800); }

/* ============ CONTACT ============ */
.contact {
  background: var(--teal-200);
  padding: 80px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: ''; position: absolute;
  inset-block-start: -60px; inset-inline-end: -60px;
  width: 220px; height: 220px;
  background: var(--teal-300);
  border-radius: 50%;
  opacity: 0.35;
}

.contact-inner {
  position: relative; z-index: 1;
  max-width: 540px;
  margin: 0 auto;
}

.contact .eyebrow {
  font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-800);
  font-weight: 600;
  margin: 0 0 16px;
}

.contact h3 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.contact p {
  font-size: 15px;
  color: var(--ink-on-teal);
  margin: 0 0 32px;
  line-height: 1.7;
}

/* ============ FOOTER ============ */
site-footer {
  display: block;
  padding: 56px 32px 40px;
  text-align: center;
  background: var(--ink);
  color: var(--bg);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin-block-end: 24px;
  color: var(--bg);
}

.footer-brand .dot { color: var(--teal-300); }

.social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-block-end: 24px;
}

.social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.social a:hover { background: var(--teal-500); color: var(--bg); border-color: var(--teal-500); }
.social a:active { transform: scale(0.95); }

.copyright {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* ============ SCROLL PERF ============ */
.scrolling .update,
.scrolling .article,
.scrolling .tile,
.scrolling .thought,
.scrolling .nav-link {
  transition: none !important;
}
.scrolling *:hover {
  transform: none !important;
}
