/* One system for quartz.gg, euca.ly and nova.quartz.gg.
   Shared: tokens, type, buttons, the hero, Bento tiles and the footer.
   Each site designs its own middle from these parts. */

:root {
  --head: 'Lexend', system-ui, sans-serif;
  --body: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --logo-h: 34px;
  --r: 26px;
  --bar-h: 76px;
}
[data-brand="quartz"] { --night: #0F0F11; --night-2: #1C1C1F; --accent: #EBB9A4; --accent-deep: #D9987C; --ink: #0F0F11; --muted: #5C5A60; }
[data-brand="eucaly"] { --night: #14212B; --night-2: #1F3341; --accent: #95B3C9; --accent-deep: #5F86A3; --pale: #D8EBF8; --ink: #14212B; --muted: #4F606D; }
[data-brand="nova"] { --night: #000000; --night-2: #1A1A1A; --accent: #FFFFFF; --accent-deep: #000000; --ink: #000000; --muted: #5A5A5A; --logo-h: 40px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }

/* Section blocks: full-bleed colour, generous space */
.block { padding: 7.5rem 0; background: var(--bg, #fff); color: var(--fg, var(--ink)); position: relative; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 0.85rem; margin-bottom: 1.25rem; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.big { font-size: clamp(2.75rem, 6.4vw, 5.25rem); }
.huge { font-size: clamp(3.5rem, 11vw, 9.5rem); letter-spacing: -0.055em; line-height: 0.92; }
.lead { font-size: 1.2rem; max-width: 46ch; margin-top: 1.4rem; opacity: 0.8; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--night);
  color: #fff;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.4rem;
  border-radius: 14px;
  transition: box-shadow 0.15s ease;
}
.btn:hover { box-shadow: inset 0 0 0 99px rgba(255, 255, 255, 0.14); }
.btn--light:hover { box-shadow: inset 0 0 0 99px rgba(0, 0, 0, 0.07); }
.btn svg { width: 18px; height: 18px; }
.btn--light { background: #fff; color: var(--night); }
.btn--ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn--sm { padding: 0.65rem 1rem; font-size: 0.93rem; border-radius: 12px; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--icon { padding-left: 0; padding-right: 0; width: 2.75rem; justify-content: center; }
.btn--sm.btn--icon { width: 2.55rem; }
button.btn { border: 0; cursor: pointer; }
.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.actions { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; }
.btn:focus-visible, .link:focus-visible, .nav a:focus-visible, .brand:focus-visible, .tile:focus-visible, .lang summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Bento: flat opaque tiles on one board. No borders, no shadows. */
.board { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  padding: 1.75rem;
  background: var(--fill, #F2F3F5);
  color: var(--tile-fg, inherit);
  overflow: hidden;
  text-decoration: none;
}
:where(.tile) h3 { font-size: 1.6rem; letter-spacing: -0.025em; }
:where(.tile) p { margin-top: 0.6rem; opacity: 0.75; font-size: 1rem; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; opacity: 0.75; }
.tag svg { width: 15px; height: 15px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.r2 { grid-row: span 2; }

/* Hero: night, the brand's mark large and quiet, bleeding off the corner */
.hero {
  position: relative;
  background: var(--night);
  color: #fff;
  overflow: hidden;
  min-height: min(100svh, 860px);
  display: flex;
  flex-direction: column;
}
.hero-mark { position: absolute; right: -2vw; bottom: -10%; height: 92%; width: auto; max-width: none; pointer-events: none; }
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--night); }
.top { display: flex; align-items: center; justify-content: space-between; height: var(--bar-h); }
.hero { padding-top: var(--bar-h); }
.brand img { height: var(--logo-h); width: auto; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 0.97rem; font-weight: 500; transition: color 0.15s ease; }
.nav a:hover { color: #fff; }
.hero-copy { position: relative; width: 100%; margin: auto; padding-top: 3rem; padding-bottom: 6rem; }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6.4rem); letter-spacing: -0.05em; line-height: 0.95; max-width: 11ch; }
.hero .lead { color: rgba(255, 255, 255, 0.75); opacity: 1; margin: 1.75rem 0 0; }
.hero .actions { margin-top: 2.75rem; }

/* Footer: the same everywhere */
.foot { background: var(--night); color: #fff; padding: 5rem 0 2.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.foot-logo { height: calc(var(--logo-h) * 0.9); width: auto; }
.foot-blurb { margin-top: 1rem; color: rgba(255, 255, 255, 0.6); max-width: 30ch; font-size: 0.95rem; }
.foot h4 { font-family: var(--body); font-size: 0.85rem; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, 0.5); margin-bottom: 1rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.foot ul a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.95rem; }
.foot ul a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); font-size: 0.88rem; }
.made-by { color: inherit; text-decoration: none; }
.made-by:hover { color: #fff; }
.foot-bottom img { height: 18px; width: auto; display: inline-block; vertical-align: -4px; margin-left: 0.35rem; }

/* Arabic: Readex Pro throughout, no tight tracking, the mark bleeds off the other corner */
[dir="rtl"] { --head: 'Readex Pro', system-ui, sans-serif; --body: 'Readex Pro', system-ui, sans-serif; }
[dir="rtl"] :is(h1, h2, h3, h4, .huge) { letter-spacing: 0; line-height: 1.2; }
[dir="rtl"] .hero-mark { right: auto; left: -2vw; }
[dir="rtl"] .made-by { color: inherit; text-decoration: none; }
.made-by:hover { color: #fff; }
.foot-bottom img { margin-left: 0; margin-right: 0.35rem; }
[dir="rtl"] .lang-menu a { font-family: var(--body); }

/* Language menu (Nova): a globe that opens English / Arabic */
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: rgba(255, 255, 255, 0.75); cursor: pointer; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: #fff; background: rgba(255, 255, 255, 0.1); }
.lang summary svg { width: 19px; height: 19px; }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 11rem; padding: 0.35rem; background: #fff; border-radius: 14px; z-index: 10; }
.lang-menu a { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.7rem; border-radius: 10px; color: #000 !important; text-decoration: none; font-size: 0.95rem; }
.lang-menu a:hover { background: #F2F2F2; }
.lang-menu .flag { width: 21px; height: 15px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }

@media (max-width: 900px) {
  .board > .tile { grid-column: span 12; }
  .board > .tile.half-sm { grid-column: span 6; }
  .head-row { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
  .foot-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 1rem; }
  .block { padding: 4.5rem 0; }
  :root { --bar-h: 64px; }
  .brand img { height: calc(var(--logo-h) * 0.82); }
  .nav { gap: 1.1rem; }
  .nav .nav-hide { display: none; }
  .hero { min-height: 660px; }
  .hero-mark { height: 56%; right: -20vw; bottom: -8%; }
  [dir="rtl"] .hero-mark { right: auto; left: -20vw; }
  .hero-copy { padding-top: 2rem; padding-bottom: 12rem; }
  .tile { padding: 1.4rem; }
  .board > .tile.half-sm { grid-column: span 12; }
  .foot-bottom { flex-direction: column; }
}
