/* الهجده — مظلة المشاريع: رئيسية + /projects */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@500;600;700&display=swap');
@import url('brand-tokens.css');

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

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

body.home-body {
  font-family: var(--h-font);
  background: var(--h-bg);
  color: var(--h-text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-device { transform: none !important; }
}

.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  z-index: 10000;
  background: var(--h-gold);
  color: #1a140c;
  padding: 0.75rem 1.1rem;
  border-radius: var(--h-radius-sm);
  font-weight: 700;
  text-decoration: none;
  min-height: var(--h-touch);
  display: inline-flex;
  align-items: center;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--h-ink);
  outline-offset: 2px;
}

:focus-visible {
  outline: var(--h-focus);
  outline-offset: var(--h-focus-offset);
}

.paper-bloom {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 42% at 78% -8%, rgba(179, 147, 89, 0.11), transparent 60%),
    radial-gradient(ellipse 48% 36% at 8% 100%, rgba(179, 147, 89, 0.05), transparent 55%);
}
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .paper-bloom {
  background:
    radial-gradient(ellipse 58% 40% at 82% -6%, rgba(92, 118, 168, 0.14), transparent 60%),
    radial-gradient(ellipse 42% 32% at 6% 104%, rgba(196, 164, 106, 0.07), transparent 55%),
    radial-gradient(ellipse 24% 18% at 50% 38%, rgba(196, 164, 106, 0.05), transparent 70%);
}
html[data-theme="dark"] .paper-grain { opacity: 0.04; }

.page-wrap { position: relative; z-index: 10; }

/* —— Nav —— */
.home-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.1rem, 4vw, 2.5rem);
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background var(--h-duration-slow) var(--h-ease),
    border-color var(--h-duration-slow) var(--h-ease),
    backdrop-filter var(--h-duration-slow),
    padding var(--h-duration-slow) var(--h-ease);
}
.home-nav.is-scrolled {
  background: var(--h-nav);
  backdrop-filter: blur(20px) saturate(1.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.12);
  border-bottom-color: var(--h-line);
  padding: 0.7rem clamp(1.1rem, 4vw, 2.5rem);
  padding-top: max(0.7rem, env(safe-area-inset-top, 0px));
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-height: var(--h-touch);
}
.nav-brand svg {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  color: var(--h-mark);
  box-shadow: 0 0 0 1px rgba(179, 147, 89, 0.38);
  transition: box-shadow var(--h-duration) var(--h-ease), transform var(--h-duration) var(--h-ease);
}
.nav-brand:hover svg {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(179, 147, 89, 0.55), var(--h-glow-gold);
}
.nav-tools { display: flex; align-items: center; gap: 0.85rem; }
.theme-toggle {
  appearance: none;
  border: 1px solid var(--h-gold-line);
  background: rgba(255, 253, 248, 0.55);
  color: var(--h-gold-bright);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.9rem;
  border-radius: var(--h-radius-pill);
  cursor: pointer;
  letter-spacing: 0.04em;
  min-height: var(--h-touch);
  transition: border-color var(--h-duration), color var(--h-duration), background var(--h-duration);
}
html[data-theme="dark"] .theme-toggle { background: rgba(24, 30, 42, 0.7); }
.theme-toggle:hover { border-color: var(--h-gold); color: var(--h-text); }
.nav-brand-lockup { display: flex; flex-direction: column; gap: 0.04rem; line-height: 1.05; }
.nav-brand-name {
  font-family: var(--h-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--h-text);
}
.nav-brand-en {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--h-gold);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.25rem;
  list-style: none;
}
.nav-links a {
  color: var(--h-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color var(--h-duration);
  min-height: var(--h-touch);
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--h-text); }
.nav-link-quiet { opacity: 0.85; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--h-touch);
  padding: 0.7rem 1.35rem;
  border-radius: var(--h-radius-pill);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--h-duration) var(--h-ease), box-shadow var(--h-duration), background var(--h-duration), border-color var(--h-duration), color var(--h-duration);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #d4b87a, #b39359 68%, #9a7a42);
  color: #1a140c;
  box-shadow: 0 8px 24px rgba(179, 147, 89, 0.28);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(179, 147, 89, 0.38);
  filter: brightness(1.03);
}
.btn-ghost {
  background: transparent;
  color: var(--h-text);
  border-color: var(--h-line);
}
.btn-ghost:hover {
  border-color: var(--h-gold-line);
  background: rgba(179, 147, 89, 0.06);
}

/* —— Made by —— */
.made-by {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--h-gold-bright);
}
.made-by svg {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--h-gold);
}
.made-by--on-dark { color: #d8c08a; }

/* —— Hero —— */
.hero {
  width: 100%;
  min-height: 88dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: 7.5rem clamp(1.2rem, 5vw, 3.5rem) 4rem;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-copy { max-width: 36rem; }
.hero-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-gold);
}
.hero-brand {
  font-family: var(--h-display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  color: var(--h-text);
}
.hero-brand::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin: 0.95rem 0 0;
  background: linear-gradient(90deg, var(--h-gold), transparent);
  border-radius: 2px;
}
.hero-en {
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--h-gold);
  font-weight: 700;
  margin: 0 0 1.1rem;
}
.hero-lead {
  margin: 0;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--h-muted);
  max-width: 34ch;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-stage {
  perspective: 900px;
  display: flex;
  justify-content: center;
}
.hero-device {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(100%, 340px);
  aspect-ratio: 3 / 4;
  padding: 1.5rem 1.4rem 1.6rem;
  text-decoration: none;
  color: #f3eee4;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 70% 18%, rgba(196, 164, 106, 0.22), transparent 55%),
    linear-gradient(165deg, #161c28 0%, #0c1018 55%, #090c12 100%);
  border: 1px solid rgba(196, 164, 106, 0.28);
  box-shadow:
    0 24px 60px rgba(12, 16, 24, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--h-ease), box-shadow 0.4s var(--h-ease);
}
.hero-device:hover {
  box-shadow:
    0 28px 70px rgba(12, 16, 24, 0.42),
    0 0 40px rgba(196, 164, 106, 0.12);
}
.hero-device__glow {
  position: absolute;
  inset: auto -20% 35% 40%;
  height: 45%;
  background: radial-gradient(circle, rgba(196, 164, 106, 0.28), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  animation: glowPulse 7s ease-in-out infinite;
}
.hero-device__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.4px 1.4px at 72% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 40% 40%, rgba(216,192,138,.9), transparent),
    radial-gradient(1px 1px at 82% 48%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 28% 62%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 60% 72%, rgba(255,255,255,.4), transparent);
  opacity: 0.85;
}
.hero-device__moon {
  position: absolute;
  top: 18%;
  left: 22%;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0e2c0, #c4a46a 58%, #8a6f3f);
  box-shadow: 0 0 32px rgba(196, 164, 106, 0.45);
  animation: moonFloat 8s ease-in-out infinite;
}
.hero-device__moon::after {
  content: "";
  position: absolute;
  inset: -2px -2px auto auto;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  background: #0c1018;
  transform: translate(12px, -8px);
}
.hero-device .made-by {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 2;
}
.hero-device__brand {
  position: relative;
  z-index: 2;
  font-family: var(--h-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.hero-device__tag {
  position: relative;
  z-index: 2;
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: rgba(243, 238, 228, 0.72);
  line-height: 1.55;
}
.hero-device__pearls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}
.hero-device__pearls li {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 164, 106, 0.32);
  color: #d8c08a;
}

@keyframes moonFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* —— Sections —— */
.home-section {
  width: 100%;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem) 4.75rem;
}
.home-section--tight { padding-bottom: 3.25rem; }
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.section-head--center {
  text-align: center;
  flex-direction: column;
  align-items: center;
  margin-inline: auto;
  max-width: 36rem;
  margin-bottom: 2rem;
}
.section-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-gold);
}
.section-title {
  margin: 0;
  font-family: var(--h-display);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--h-text);
}
.section-lead {
  margin: 0.4rem 0 0;
  color: var(--h-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.section-link {
  color: var(--h-gold-bright);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  min-height: var(--h-touch);
  display: inline-flex;
  align-items: center;
}
.section-link:hover { color: var(--h-text); }

/* —— Category rail —— */
.cat-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-touch);
  padding: 0.35rem 1rem;
  border-radius: var(--h-radius-pill);
  border: 1px solid var(--h-line);
  background: var(--h-surface);
  color: var(--h-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color var(--h-duration), transform var(--h-duration) var(--h-ease), background var(--h-duration), color var(--h-duration);
}
.cat-pill:hover {
  border-color: var(--h-gold-line);
  transform: translateY(-1px);
}
.cat-pill.is-on {
  background: linear-gradient(135deg, #d4b87a, #b39359);
  color: #1a140c;
  border-color: transparent;
}

/* —— Cards —— */
.feat-grid,
.new-grid,
.tiny-grid,
.projects-grid,
.related-grid {
  display: grid;
  gap: 1rem;
}
.feat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.new-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tiny-grid,
.projects-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.p-card {
  display: flex;
  flex-direction: column;
  background: var(--h-surface);
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius-lg);
  overflow: hidden;
  box-shadow: var(--h-shadow-sm);
  transition:
    transform var(--h-duration) var(--h-ease),
    box-shadow var(--h-duration) var(--h-ease),
    border-color var(--h-duration);
}
.p-card:hover {
  transform: translateY(-4px);
  border-color: var(--h-gold-line);
  box-shadow: var(--h-shadow);
}
.p-card__visual {
  display: block;
  position: relative;
  min-height: 7.5rem;
  text-decoration: none;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(179, 147, 89, 0.12), transparent 50%),
    #121722;
}
.p-card--featured .p-card__visual { min-height: 11.5rem; }
.p-card--tiny .p-card__visual { min-height: 5.5rem; }
.p-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 1rem 1.05rem 1.1rem;
  flex: 1;
}
.p-card__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}
.p-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--h-gold);
  text-decoration: none;
}
.p-card__cat:hover { color: var(--h-gold-bright); }
.p-card__state {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--h-muted);
  border: 1px solid var(--h-line);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}
.p-card__name {
  margin: 0;
  font-family: var(--h-display);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.3;
}
.p-card--tiny .p-card__name { font-size: 1.08rem; }
.p-card__name a {
  color: var(--h-text);
  text-decoration: none;
}
.p-card__name a:hover { color: var(--h-gold-bright); }
.p-card__tagline {
  margin: 0;
  color: var(--h-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}
.p-card__host {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--h-gold-bright);
  direction: ltr;
  unicode-bidi: isolate;
}
.p-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.45rem;
}
.p-card__more {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--h-muted);
  text-decoration: none;
}
.p-card__more:hover { color: var(--h-gold-bright); }

/* Motifs */
.p-card__visual > span,
.hero-device span { pointer-events: none; }
.p-card__visual[data-motif="night"],
.project-visual[data-motif="night"] { background: linear-gradient(165deg, #1a2233, #0b0f16); }
.p-card__visual[data-motif="spark"],
.project-visual[data-motif="spark"] { background: linear-gradient(165deg, #2a1f18, #120e0c); }
.p-card__visual[data-motif="ticker"],
.project-visual[data-motif="ticker"] { background: linear-gradient(165deg, #102226, #0b1214); }
.p-card__visual[data-motif="tools"],
.project-visual[data-motif="tools"] { background: linear-gradient(165deg, #1c1a16, #10100e); }
.p-card__visual[data-motif="ai"],
.project-visual[data-motif="ai"] { background: linear-gradient(165deg, #1a1530, #0e0c18); }
.p-card__visual[data-motif="house"],
.project-visual[data-motif="house"] { background: linear-gradient(165deg, #1c1914, #0e0d0b); }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mot-moon {
  position: absolute;
  top: 22%;
  left: 18%;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #f0e2c0, #b39359);
  box-shadow: 0 0 18px rgba(196, 164, 106, 0.4);
}
.mot-moon::after {
  content: "";
  position: absolute;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: inherit;
  background: #0b0f16;
  inset: -4px auto auto 10px;
}
.mot-pearls {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  display: flex;
  gap: 0.3rem;
  color: #d8c08a;
  font-size: 0.62rem;
  font-weight: 700;
}
.mot-star {
  position: absolute;
  top: 28%;
  right: 28%;
  width: 0.7rem;
  height: 0.7rem;
  background: #f0e2c0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: glowPulse 5s ease-in-out infinite;
}
.mot-star--2 { top: 48%; right: 52%; width: 0.45rem; height: 0.45rem; animation-delay: 1.2s; }
.mot-orb {
  position: absolute;
  bottom: 18%;
  left: 22%;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(196,164,106,.15) 40%, transparent 70%);
  border: 1px solid rgba(196, 164, 106, 0.35);
}
.mot-row {
  display: flex;
  justify-content: space-between;
  margin: 0.45rem 0.9rem;
  padding-top: 0.55rem;
  color: #d5e8e6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(56, 184, 181, 0.18);
}
.mot-row em { font-style: normal; color: #4ec9c6; font-size: 0.68rem; }
.mot-tiles {
  position: absolute;
  inset: 22% 18%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.mot-tiles i {
  display: block;
  border-radius: 8px;
  background: rgba(196, 164, 106, 0.18);
  border: 1px solid rgba(196, 164, 106, 0.28);
}
.mot-eq {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d8c08a;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.mot-bar {
  position: absolute;
  right: 12%;
  left: 12%;
  top: 42%;
  height: 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 164, 106, 0.4);
  background: rgba(255,255,255,0.04);
}
.mot-bar::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid #c4a46a;
  border-radius: 50%;
  transform: translateY(-50%);
}
.mot-house {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 2.6rem;
  height: 1.7rem;
  background: rgba(196, 164, 106, 0.25);
  border: 1px solid rgba(196, 164, 106, 0.45);
  transform: translate(-50%, -30%);
}
.mot-house::before {
  content: "";
  position: absolute;
  top: -1.05rem;
  right: -1px;
  left: -1px;
  height: 1.15rem;
  background: #c4a46a;
  clip-path: polygon(50% 0%, 100% 100%, 0 100%);
}
.mot-page {
  position: absolute;
  inset: 22% 28%;
  border-radius: 4px 12px 8px 8px;
  background: rgba(243, 238, 228, 0.12);
  border: 1px solid rgba(196, 164, 106, 0.35);
  box-shadow: 8px 6px 0 rgba(196, 164, 106, 0.12);
}
.mot-drop {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 1.4rem;
  height: 1.4rem;
  background: #c4a46a;
  border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
  transform: translate(-50%, 0) rotate(-40deg);
}
.mot-balance {
  position: absolute;
  inset: 30% 22%;
  border-bottom: 2px solid #c4a46a;
}
.mot-balance::before,
.mot-balance::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 1.6rem;
  height: 0.9rem;
  border: 1px solid #c4a46a;
  border-radius: 0 0 40px 40px;
}
.mot-balance::before { right: 0; }
.mot-balance::after { left: 0; }
.mot-chest {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.8rem;
  height: 1.8rem;
  transform: translate(-50%, -40%);
  border: 1px solid #c4a46a;
  border-radius: 6px;
  background: rgba(196, 164, 106, 0.15);
}
.mot-sparkline {
  position: absolute;
  inset: 32% 16% 28%;
  background:
    linear-gradient(90deg, transparent 0 8%, #c4a46a 8% 10%, transparent 10% 22%, #8a7aff 22% 24%, transparent 24% 40%, #c4a46a 40% 42%, transparent 42% 70%, #8a7aff 70% 72%, transparent 72%);
  mask: linear-gradient(#000, #000);
  opacity: 0.9;
  border-bottom: 1px solid rgba(196, 164, 106, 0.25);
}
.mot-wave {
  position: absolute;
  right: 10%;
  left: 10%;
  bottom: 32%;
  height: 2px;
  background: #c4a46a;
  box-shadow: 0 10px 0 rgba(196, 164, 106, 0.35), 0 20px 0 rgba(196, 164, 106, 0.18);
  border-radius: 2px;
}
.mot-pixel {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 1.1rem;
  height: 1.1rem;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #d4b87a;
  box-shadow: 1.4rem 0 0 #8a6f3f, -1.4rem 0 0 #c4a46a;
}
.mot-grid {
  position: absolute;
  inset: 24%;
  background:
    linear-gradient(rgba(196,164,106,.25) 1px, transparent 1px) 0 0 / 28% 28%,
    linear-gradient(90deg, rgba(196,164,106,.25) 1px, transparent 1px) 0 0 / 28% 28%;
}

/* —— Story —— */
.story-block {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  padding: 2.4rem 1.4rem;
  border-radius: var(--h-radius-xl);
  border: 1px solid var(--h-gold-line);
  background:
    linear-gradient(135deg, rgba(179, 147, 89, 0.1), rgba(179, 147, 89, 0.02) 55%),
    var(--h-surface);
}
.story-block p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.85;
  color: var(--h-text);
}

/* —— Listing extras —— */
.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 1.5rem;
}
.projects-search {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 16rem;
}
.projects-search input {
  flex: 1;
  min-height: var(--h-touch);
  border-radius: var(--h-radius-pill);
  border: 1px solid var(--h-line);
  background: var(--h-surface);
  color: var(--h-text);
  font: inherit;
  padding: 0.45rem 1rem;
}
.projects-search input:focus {
  outline: none;
  border-color: var(--h-gold);
}
.projects-count {
  color: var(--h-muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.catalog-fallback,
.projects-empty,
.project-missing {
  margin: 1rem 0;
  color: var(--h-muted);
}
.archive-block {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--h-line);
}

/* —— Project detail —— */
.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-top: 7.2rem;
  padding-bottom: 3rem;
}
.project-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.7rem;
}
.project-kicker a {
  color: var(--h-gold);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}
.project-hero h1 {
  font-family: var(--h-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin: 0 0 0.6rem;
}
.project-hero .lead {
  color: var(--h-muted);
  font-size: 1.08rem;
  max-width: 36ch;
}
.project-hero .host {
  margin: 0.7rem 0 1.4rem;
  color: var(--h-gold-bright);
  font-size: 0.85rem;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
}
.project-visual {
  display: block;
  min-height: 16rem;
  border-radius: 24px;
  border: 1px solid var(--h-gold-line);
  position: relative;
  overflow: hidden;
  box-shadow: var(--h-shadow);
}

/* —— Footer —— */
.home-footer {
  padding: 2.5rem clamp(1.2rem, 4vw, 2.5rem) max(3.25rem, env(safe-area-inset-bottom, 0px));
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--h-line);
}
.home-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.home-footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--h-gold);
}
.home-footer__brand svg { width: 1.6rem; height: 1.6rem; flex-shrink: 0; margin-top: 0.15rem; }
.home-footer__brand strong {
  display: block;
  font-family: var(--h-display);
  font-size: 1.2rem;
  color: var(--h-text);
}
.home-footer__brand span {
  display: block;
  font-size: 0.8rem;
  color: var(--h-muted);
  margin-top: 0.15rem;
}
.home-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
}
.home-footer__cols > div {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 6.5rem;
}
.home-footer__col-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h-gold);
  margin-bottom: 0.15rem;
}
.home-footer__cols a {
  color: var(--h-muted);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  transition: color var(--h-duration);
}
.home-footer__cols a:hover { color: var(--h-gold-bright); }
.home-footer__meta {
  color: var(--h-muted);
  font-size: 0.8rem;
  line-height: 1.7;
  padding-top: 1.25rem;
  border-top: 1px solid var(--h-line);
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--h-ease), transform 0.7s var(--h-ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* —— Responsive —— */
@media (max-width: 980px) {
  .feat-grid { grid-template-columns: 1fr; }
  .new-grid,
  .tiny-grid,
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    padding-top: 6.5rem;
  }
  .hero-copy { margin-inline: auto; }
  .hero-brand::after { margin-inline: auto; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .project-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .project-hero .lead { margin-inline: auto; }
  .project-kicker { justify-content: center; }
}

@media (max-width: 900px) {
  .nav-brand-en { display: none; }
  .nav-link-quiet { display: none; }
}

@media (max-width: 720px) {
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; min-width: 9rem; }
  .nav-links { gap: 0.15rem 0.85rem; }
  .nav-links a { font-size: 0.88rem; }
  .home-footer__top { flex-direction: column; gap: 1.5rem; }
  .new-grid,
  .tiny-grid,
  .projects-grid { grid-template-columns: 1fr; }
  .hero-device { width: min(100%, 300px); }
}
