/* meerail marketing site.
   The landing styles are lifted from the meerkat landing page (app/static/css/app.css)
   so the two sites read as one family. Additions specific to this site are grouped
   at the bottom under "meerail additions". */

html, body {
  margin: 0;
  background: #fff;
  scroll-behavior: smooth;
}

.landing {
  color: #1f2328;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.landing a { color: #2185d0; text-decoration: none; }
.landing a:hover { text-decoration: underline; }

/* ---- Top nav ---- */
.landing-nav {
  border-bottom: 1px solid #e6e8eb;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.landing-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1f2328 !important;
}
.landing-brand img { height: 1.9em; width: auto; }
.landing-brand:hover { text-decoration: none; }
.landing-nav-links { display: flex; align-items: center; gap: 1.4rem; }
.landing-nav-links a { color: #57606a; font-weight: 500; }
.landing-nav-links a:hover { color: #1f2328; text-decoration: none; }
.landing-nav-links .button { color: #fff !important; }

/* ---- Hero ---- */
.landing-hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.landing-hero-copy {
  flex: 1 1 0;
  min-width: 0;
}
.landing-logo {
  flex: 0 0 auto;
  width: 320px;
  max-width: 45%;
  height: auto;
  margin: 0;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.14));
}
.landing-title {
  font-size: 2.7rem;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: .25rem 0 .9rem;
}
.landing-subtitle {
  font-size: 1.2rem;
  color: #57606a;
  margin: 0;
}

/* ---- Boxed section (used for the AI / skill block) ---- */
.landing-login-section {
  max-width: 1000px;
  margin: 3.5rem auto 0;
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #cfe3f6;
  border-radius: 18px;
  background: linear-gradient(180deg, #f1f8ff 0%, #ffffff 70%);
  box-shadow: 0 10px 34px rgba(33,133,208,.12);
}
.landing-login-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
  text-align: center;
}
.landing-login-lede {
  color: #57606a;
  font-size: 1.12rem;
  max-width: 620px;
  margin: 0 auto 1.75rem;
  text-align: center;
}

/* ---- Features sections ---- */
.landing-features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 1rem;
  text-align: center;
}
.landing-section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}
.landing-section-lede {
  font-size: 1.12rem;
  color: #57606a;
  max-width: 620px;
  margin: 0 auto 2.75rem;
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: left;
}
.landing-card {
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.landing-card:hover {
  border-color: #d0d7de;
  box-shadow: 0 6px 20px rgba(27,31,36,.08);
  transform: translateY(-2px);
}
.landing-card-body { padding: 1.5rem; }
.landing-card-icon {
  font-size: 2rem;
  line-height: 1;
  color: #2185d0;
  margin-bottom: .85rem;
}
.landing-card-icon i.icon { margin: 0; }
.landing-card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.landing-card p { color: #57606a; margin: 0; }

/* ---- Footer ---- */
.landing-footer {
  margin-top: 4rem;
  border-top: 1px solid #e6e8eb;
  background: #f6f8fa;
  text-align: center;
  padding: 1.75rem 1.25rem;
}
.landing-footer p {
  max-width: 640px;
  margin: 0 auto;
  color: #6e7781;
  font-size: .9rem;
}

/* ===== meerail additions ===== */

/* Hero call-to-action row. */
.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}

/* Shell snippets inside cards and the skill box. */
.landing-code {
  margin: .9rem 0 0;
  padding: .8rem .9rem;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #f6f8fa;
  color: #1f2328;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}
.landing code {
  background: #f6f8fa;
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .9em;
}

/* A card that spans the whole grid row, for a feature worth extra room.
   Its body lays out as copy + illustration side by side. */
.landing-card-wide { grid-column: 1 / -1; }
.landing-card-wide .landing-card-body { padding: 2rem; }
.landing-card-wide-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.landing-card-wide-copy { flex: 1 1 0; min-width: 0; }
.landing-card-wide h3 { font-size: 1.35rem; }

/* Right-hand column of a wide card, holding a snippet or a stack of buttons
   beside the copy. */
.landing-card-wide-aside {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.landing-card-wide-aside .landing-code { margin-top: 0; }
.landing-card-wide-aside .ui.button { margin: 0; white-space: nowrap; }

/* File-type chips under the attachment card's copy. */
.landing-filetypes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
}
.landing-filetype {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #f6f8fa;
  color: #57606a;
  font-size: .85rem;
  font-weight: 600;
}
.landing-filetype .icon { margin: 0; color: #2185d0; }

/* Three headline figures from the statistics panel, on the analytics card.
   Real numbers from the screenshot beside it, so the card and the shot agree. */
.landing-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
}
.landing-stat {
  display: inline-flex;
  flex-direction: column;
  gap: .1rem;
  padding: .5rem .8rem;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  font-size: .78rem;
  color: #5b5e63;
  background: #fbfcfd;
}
.landing-stat b {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1b1c1d;
}

/* Mock of the composer's live preview, on the markdown card: the markers are
   dimmed rather than dropped, which is the whole point of the feature. */
.landing-md {
  margin-top: 1.1rem;
  padding: .6rem .75rem;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  background: #fafbfc;
  color: #1b1c1d;
  font-size: .88rem;
  line-height: 1.9;
}
.landing-md-mark { color: #b0b4ba; }
.landing-md-h { font-size: 1.15em; }
.landing-md-link { color: #2185d0; text-decoration: underline; }

/* Miniature message rows showing the age tint ramping up. --t mirrors the
   --age-t the app sets per row, and the rgb/alpha match mail.css's light theme
   so the card shows the real colour rather than an approximation of it. */
.landing-age {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.landing-age-row {
  padding: .4rem .6rem;
  border-radius: 7px;
  font-size: .82rem;
  color: #5b5e63;
  background: rgba(255, 69, 58, calc(var(--t) * .34));
}

/* Keycaps illustrating the keyboard-control card. */
.landing-keys {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.1rem;
}
.landing-key {
  min-width: 1.9rem;
  text-align: center;
  padding: .2rem .5rem;
  border: 1px solid #d0d7de;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #f6f8fa;
  color: #57606a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  font-weight: 600;
}

/* Skill download block inside the boxed AI section. */
.landing-skill {
  width: 100%;
  max-width: 560px;
  text-align: left;
}
.landing-skill-lede {
  font-weight: 600;
  margin: 0 0 .5rem;
}
.landing-skill .landing-code { background: #fff; margin-bottom: 1rem; }
.landing-skill-note {
  text-align: center;
  color: #6e7781;
  font-size: .9rem;
  margin: .9rem 0 0;
}
.landing-skill-note .icon { color: #8c959f; }

/* Example questions under the AI section. */
.landing-asks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  max-width: 720px;
}
.landing-ask {
  padding: .35rem .75rem;
  border: 1px solid #bfe0fb;
  border-radius: 999px;
  background: #eef7fe;
  color: #2185d0;
  font-size: .88rem;
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .landing-grid { grid-template-columns: 1fr; }
  /* Four thumbnails across is unreadable on a phone; two is still small. */
  .landing-shot-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-lightbox { padding: 3.5rem 1rem 1rem; }
  .landing-lightbox-figure img { max-height: calc(100vh - 13rem); }
  /* The wide card stacks and its chips go full width. */
  .landing-card-wide .landing-card-body { padding: 1.5rem; }
  .landing-card-wide-inner { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .landing-card-wide h3 { font-size: 1.18rem; }
  .landing-filetypes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .landing-card-wide-aside .landing-code { font-size: .78rem; }
  .landing-login-section { margin: 2.5rem 1.25rem 0; padding: 2.5rem 1.5rem; }
  .landing-title { font-size: 2.05rem; }
  .landing-subtitle { font-size: 1.08rem; }
  .landing-hero {
    flex-direction: column;
    gap: 2rem;
    padding-top: 2.5rem;
    text-align: center;
  }
  .landing-hero-copy { flex: 0 1 auto; }
  .landing-hero-actions { justify-content: center; }
  .landing-logo { width: 180px; max-width: 60%; margin-left: auto; margin-right: auto; }
  .landing-subtitle { max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 480px) {
  /* The nav links duplicate the in-page sections on small screens. */
  .landing-nav-links a:not(.button) { display: none; }
}

/* --- Screenshots ------------------------------------------------------- */
/* Small thumbnails only — the detail lives in the lightbox, so these just have
   to be recognisable and invite the click. */
.landing-shots {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 0;
  text-align: center;
}
.landing-shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.landing-shot { margin: 0; }

/* The clickable frame. A button so it's keyboard-reachable for free. */
.landing-shot-btn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.landing-shot-btn:hover,
.landing-shot-btn:focus-visible {
  border-color: #2185d0;
  box-shadow: 0 8px 22px rgba(31, 35, 40, .14);
  transform: translateY(-2px);
  outline: none;
}
.landing-shot-btn img {
  display: block;
  width: 100%;
  height: auto;
  /* Dense UI at thumbnail size: show the whole frame rather than cropping, so
     the three-pane shape stays readable even when the text doesn't. */
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

/* Magnifier badge, revealed on hover/focus. */
.landing-shot-zoom {
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 6px;
  background: rgba(31, 35, 40, .72);
  color: #fff;
  font-size: .8rem;
  opacity: 0;
  transition: opacity .15s ease;
}
.landing-shot-zoom .icon { margin: 0; }
.landing-shot-btn:hover .landing-shot-zoom,
.landing-shot-btn:focus-visible .landing-shot-zoom { opacity: 1; }

.landing-shot figcaption {
  margin-top: .6rem;
  color: #57606a;
  font-size: .88rem;
  font-weight: 600;
}

/* --- Lightbox ---------------------------------------------------------- */
.landing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: rgba(15, 18, 21, .88);
  cursor: zoom-out;
}
.landing-lightbox[hidden] { display: none; }
.landing-lightbox-figure {
  margin: 0;
  max-width: 1400px;
  width: 100%;
  text-align: center;
}
.landing-lightbox-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  /* Leave room for the caption under the image. */
  max-height: calc(100vh - 11rem);
  margin: 0 auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  cursor: default;
}
.landing-lightbox-figure figcaption {
  max-width: 68ch;
  margin: 1.1rem auto 0;
  color: #d0d7de;
  font-size: .95rem;
  line-height: 1.5;
  cursor: default;
}
.landing-lightbox-figure figcaption strong { color: #fff; font-weight: 600; }
.landing-lightbox-figure figcaption code {
  background: rgba(255, 255, 255, .12);
  border-radius: 4px;
  padding: .1em .35em;
}
.landing-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s ease;
}
.landing-lightbox-close:hover,
.landing-lightbox-close:focus-visible { background: rgba(255, 255, 255, .24); outline: none; }
.landing-lightbox-close .icon { margin: 0; }
