/* Academia landing — brand: the app's navy and green, Tajawal (the app's typeface). */

:root {
  --navy: #1d3557;
  --navy-deep: #14263f;
  --green: #58c156;
  --green-ink: #1f7a2b;
  --mint: #e2f4dd;
  --paper: #f5f8f2;
  --white: #ffffff;
  --ink: #1b2a41;
  --muted: #55647a;
  --line: rgba(29, 53, 87, 0.13);
  --on-navy: rgba(255, 255, 255, 0.82);

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-tile: 28px;
  --radius-pill: 999px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--white);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  z-index: 20;
}

.skip:focus {
  top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 56px;
  padding: 0 1.75em;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-green {
  background: var(--green);
  color: var(--navy-deep);
}

.btn-green:hover {
  background: #6bd069;
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-deep);
}

.btn-quiet {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--line);
}

.btn-quiet:hover {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.btn-wide {
  width: 100%;
}

/* ---------- Top bar ---------- */

.top {
  background: var(--navy);
  color: var(--white);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.brand img {
  width: 168px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  font-weight: 500;
}

.top-nav a {
  text-decoration: none;
  color: var(--on-navy);
}

.top-nav a:hover {
  color: var(--white);
}

.top-nav .btn {
  min-height: 44px;
  font-size: 1rem;
  color: var(--navy-deep);
}

/* ---------- Message-request notice (home opened from a push) ---------- */

.notice {
  background: var(--mint);
  color: var(--navy);
}

.notice[hidden] {
  display: none;
}

.notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 14px;
  font-weight: 700;
}

.notice .btn {
  min-height: 44px;
  font-size: 1rem;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(40px, 7vw, 88px) clamp(64px, 9vw, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero h1 {
  font-size: clamp(2.25rem, 4.7vw, 3.7rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-lead {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  color: var(--on-navy);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}

.hero-web {
  color: var(--white);
  font-weight: 700;
  text-underline-offset: 6px;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
}

.stores {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 1rem;
  color: var(--on-navy);
}

.stores .icon {
  width: 1.3em;
  height: 1.3em;
}

/* The app's own home tiles */

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.tile {
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-tile);
  aspect-ratio: 1 / 1.08;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 8px;
  font-weight: 800;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.3;
  text-align: center;
  animation: tile-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tile img {
  width: 58%;
  aspect-ratio: 1;
  object-fit: contain;
}

.tile:nth-child(3n + 2) {
  translate: 0 28px;
}

.tile:nth-child(1) { animation-delay: 0.05s; }
.tile:nth-child(2) { animation-delay: 0.12s; }
.tile:nth-child(3) { animation-delay: 0.19s; }
.tile:nth-child(4) { animation-delay: 0.26s; }
.tile:nth-child(5) { animation-delay: 0.33s; }
.tile:nth-child(6) { animation-delay: 0.4s; }

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Who it is for ---------- */

.stages {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.stages-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-block: 22px;
}

.stages-label {
  font-weight: 800;
  color: var(--navy);
  margin-inline-end: 6px;
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  background: var(--mint);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section-head {
  max-width: 40em;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--navy);
  text-wrap: balance;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.2rem;
}

/* Features: an index of what is in the app, not a wall of cards */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}

.feature img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: contain;
}

.feature h3 {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--navy);
}

.feature p {
  margin-top: 4px;
  color: var(--muted);
}

/* ---------- Messages, groups, channels ---------- */

.talk {
  background: var(--mint);
}

.talk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.talk-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.talk-list h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
}

.talk-list p {
  color: #3d5241;
  max-width: 32em;
}

/* A drawn example of a channel in the app */

.channel {
  background: var(--white);
  border-radius: 32px;
  padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(29, 53, 87, 0.45);
  font-size: 1rem;
  line-height: 1.6;
}

.channel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--line);
}

.channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  padding: 8px;
  flex: none;
}

.channel-name {
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
}

.channel-kind {
  font-size: 0.875rem;
  color: var(--muted);
}

.live-pill {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: #e5484d;
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
}

.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--white);
}

.post {
  margin-top: 16px;
  background: var(--paper);
  border-radius: 22px;
  padding: 16px 18px;
  color: var(--ink);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted);
}

.react {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--navy);
  font-weight: 700;
}

.post-comments {
  margin-inline-start: auto;
}

.bubble {
  width: fit-content;
  max-width: 85%;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 20px;
}

.bubble-in {
  background: var(--paper);
  border-start-start-radius: 6px;
}

.bubble-out {
  margin-inline-start: auto;
  background: var(--green);
  color: var(--navy-deep);
  font-weight: 500;
  border-end-end-radius: 6px;
}

.bubble-who {
  display: block;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--green-ink);
}

/* ---------- Download band ---------- */

.get {
  background: var(--green);
  color: var(--navy-deep);
  padding-block: clamp(56px, 8vw, 96px);
}

.get-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}

.get h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  text-wrap: balance;
}

.get p {
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 500;
}

.get-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.get-actions a:not(.btn) {
  font-weight: 800;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */

.foot {
  background: var(--navy-deep);
  color: var(--on-navy);
  padding-block: 56px 32px;
  font-size: 1rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.foot img {
  width: 150px;
  margin-bottom: 16px;
}

.foot h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--white);
  text-decoration: underline;
}

.foot-contact a,
.foot-contact span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.foot-contact bdi {
  direction: ltr;
  unicode-bidi: isolate;
}

.foot-end {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
}

/* ---------- Deep link page ---------- */

.link-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
}

.link-top {
  padding: 28px var(--gutter) 0;
  display: flex;
  justify-content: center;
}

.link-top img {
  width: 150px;
}

.link-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px var(--gutter) 48px;
}

.link-card {
  width: min(100%, 460px);
  background: var(--white);
  border-radius: 32px;
  padding: clamp(24px, 6vw, 36px);
  text-align: center;
}

.link-icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  border-radius: var(--radius-tile);
  background: var(--paper);
  padding: 16px;
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.link-card h1 {
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--navy);
  text-wrap: balance;
}

.link-text {
  margin-top: 10px;
  color: var(--muted);
}

.link-actions {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.link-actions [hidden] {
  display: none;
}

.link-steps {
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  text-align: start;
  color: var(--muted);
  font-size: 1rem;
}

.link-steps p {
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.link-steps ol {
  margin: 0;
  padding-inline-start: 1.4em;
}

.link-steps[hidden],
.link-desktop[hidden] {
  display: none;
}

.link-desktop {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--mint);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}

.link-home {
  display: inline-block;
  margin-top: 22px;
  font-weight: 700;
  color: var(--navy);
  text-underline-offset: 5px;
}

/* ---------- "Open in the app" sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(13, 24, 41, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 41;
  width: min(100%, 520px);
  margin-inline: auto;
  padding: 10px 20px max(20px, env(safe-area-inset-bottom));
  background: var(--white);
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 48px rgba(13, 24, 41, 0.28);
  transform: translateY(105%);
  transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet.is-open {
  transform: none;
}

.sheet-grab {
  width: 40px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.sheet-app {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.sheet-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--line);
  flex: none;
}

.sheet-names {
  display: grid;
  line-height: 1.4;
  min-width: 0;
}

.sheet-names strong {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

.sheet-names span {
  color: var(--muted);
  font-size: 1rem;
}

.sheet-close {
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sheet-hint {
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.sheet-get {
  display: block;
  margin-top: 14px;
  padding-block: 4px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  text-underline-offset: 5px;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .top-nav a:not(.btn) {
    display: none;
  }

  .brand img {
    width: 140px;
  }

  .hero-grid,
  .talk-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiles {
    max-width: 440px;
    margin-inline: auto;
    padding-bottom: 28px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1.0625rem;
  }

  .feature {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 18px;
  }

  .feature img {
    width: 72px;
  }

  .hero-actions .btn,
  .get-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tile {
    animation: none;
  }

  .sheet,
  .sheet-backdrop {
    transition: none;
  }

  .btn {
    transition: none;
  }
}
