/* The landing page at newsera.app. Colours and fonts are the app's own
   (app/src/theme/tokens.ts). Start and end, never left and right, so the Arabic
   page mirrors by its dir attribute alone. */

@font-face { font-family: 'Space Grotesk'; font-weight: 400; font-display: swap; src: url('/fonts/SpaceGrotesk_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/SpaceGrotesk_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/fonts/SpaceGrotesk_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Space Mono'; font-weight: 400; font-display: swap; src: url('/fonts/SpaceMono_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexSansArabic_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexSansArabic_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url('/fonts/IBMPlexSansArabic_700Bold.ttf') format('truetype'); }

:root {
  color-scheme: dark;
  --bg: #191919;
  --surface: #202020;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #F2F3F3;
  --text2: #AEB2B2;
  --text3: #787E7E;
  --tick: rgba(255, 255, 255, 0.15);
  --accent: #2A8B8E;
  --accent2: #50A1A3;
  --accent-ink: #04201f;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --border: rgba(0, 0, 0, 0.09);
    --border-strong: rgba(0, 0, 0, 0.16);
    --text: #15201F;
    --text2: #566565;
    --text3: #8A9897;
    --tick: rgba(0, 0, 0, 0.13);
    --accent2: #2A8B8E;
    --accent-ink: #ffffff;
  }
}

/* Arabic has no upper case and is never letter-spaced; its labels use the text font. */
:root[lang='ar'] {
  --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; border-bottom: 1px solid var(--border); }
.logo { display: block; height: 20px; width: auto; }
.logo .ink { fill: var(--text); }
.logo .era { fill: var(--accent2); }
.lang { font-size: 15px; color: var(--text2); text-decoration: none; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; }
.lang:hover { color: var(--text); }

/* Labels in the app's timestamp style */
.stamp { font-family: var(--mono); font-size: 13px; color: var(--accent2); }
:root:not([lang='ar']) .stamp { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; padding-block: 72px 88px; }
.hero h1 { margin: 14px 0 18px; font-size: clamp(44px, 7vw, 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
:root[lang='ar'] .hero h1 { letter-spacing: 0; line-height: 1.25; }
.lead { margin: 0 0 30px; max-width: 30em; font-size: 20px; color: var(--text2); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 15px; font-weight: 500; font-size: 17px; text-decoration: none; border: 1px solid var(--border-strong); color: var(--text); }
.btn:hover { border-color: var(--accent2); }
.btn.main { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.main:hover { background: var(--accent2); border-color: var(--accent2); }
.note { margin: 18px 0 0; max-width: 34em; font-size: 14px; color: var(--text3); }

/* A screenshot in a phone outline */
.phone { margin: 0; border: 1px solid var(--border-strong); border-radius: 34px; padding: 8px; background: var(--surface); }
.phone img { border-radius: 27px; width: 100%; }

/* The three rules, on the timeline's ruler */
.rules { position: relative; padding-block: 8px 72px; padding-inline-start: 34px; }
.rules::before { content: ''; position: absolute; inset-block: 0 72px; inset-inline-start: 0; width: 9px;
  background: repeating-linear-gradient(to bottom, var(--tick) 0 1.5px, transparent 1.5px 12px); }
.rule { padding-block: 0 44px; }
.rule:last-child { padding-bottom: 0; }
.rule .row { display: flex; align-items: center; gap: 14px; }
.rule .row::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.rule h2 { margin: 14px 0 8px; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
:root[lang='ar'] .rule h2 { letter-spacing: 0; line-height: 1.35; }
.rule p { margin: 0; max-width: 34em; color: var(--text2); }

/* Inside a story */
.inside { padding-block: 64px 80px; border-top: 1px solid var(--border); }
.inside > h2 { margin: 12px 0 40px; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; font-weight: 700; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 56px; justify-content: center; }
.pair h3 { margin: 22px 0 6px; font-size: 19px; font-weight: 500; }
.pair p { margin: 0; color: var(--text2); font-size: 16px; }

/* Foot */
.foot { border-top: 1px solid var(--border); padding-block: 28px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--text3); font-size: 14px; }
.foot .logo { height: 14px; }
.foot .logo path { fill: var(--text3); }
.foot p { margin: 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-block: 48px 64px; }
  .hero .phone { max-width: 300px; margin-inline: auto; }
  .btn { flex: 1 1 100%; }
  .pair { grid-template-columns: minmax(0, 300px); gap: 48px; }
  .rules { padding-inline-start: 26px; }
}
