/* ─────────────────────────────────────────────────────────────
   protected/mobile/mobile.css — minimal mobile view.

   Design intent: the desktop site is an animated editorial
   experience; this file is the legible fallback. Zero animations,
   zero dependencies beyond /fenja/colors_and_type.css (loaded
   first for the font-face declarations). Every class here is
   `m-`-prefixed so there is no accidental cascade overlap with
   the desktop CSS in protected/index.html.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:      #faf6ee;
  --paper-2:    #f3efe4;
  --paper-3:    #ece4d1;
  --ink:        #2e2e28;
  --ink-soft:   #5f5e5e;
  --ink-dim:    #8a887f;
  --line:       rgba(46, 46, 40, 0.12);
  --line-soft:  rgba(46, 46, 40, 0.06);
  --crimson:    #8a3a2f;
  --copper:     #6d8c7c;
  --ochre:      #c29d59;
  --terracotta: #b96b58;
  --accent:     #b96b58;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* belt-and-suspenders — the arc + carousel both
                        rely on horizontal overflow, so we make sure
                        the page itself never horizontally scrolls. */
}

/* ─── Masthead ───────────────────────────────────────────── */
.m-masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 18px 26px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.m-logo,
.m-logo:link,
.m-logo:visited,
.m-logo:hover,
.m-logo:active {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  border-bottom: 0;
  -webkit-tap-highlight-color: transparent;
}
.m-logo img {
  height: 48px;
  width: auto;
  display: block;
  border: 0;
}

/* ─── Main layout ────────────────────────────────────────── */
.m-main {
  padding-bottom: 48px;
}
/* Default section = generous vertical rhythm. Individual sections
   override this where they need their own breathing. */
.m-section {
  padding: 56px 22px;
}

/* ─── Shared type ────────────────────────────────────────── */
.m-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 22px 0;
  text-wrap: pretty;
}
.m-title em { font-style: italic; font-weight: 700; }

.m-section-head {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 18px 0;
  text-wrap: pretty;
}
.m-section-head em { font-style: italic; font-weight: 700; }

.m-section-eyebrow {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px 0;
}

.m-body {
  margin: 0 0 14px 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.m-body em { font-style: italic; font-weight: 700; color: var(--ink); }

/* Crimson bottom paragraph — consistent with the desktop intro */
.m-body--accent,
.m-body--accent em { color: var(--crimson); }

/* ─── Intro ──────────────────────────────────────────────── */
.m-intro {
  padding: 44px 22px 48px;
}

/* ─── Timeline carousel ──────────────────────────────────── */
.m-timeline {
  background: var(--paper-2);
  padding: 56px 0 64px;  /* track bleeds edge-to-edge; use inner padding */
}
.m-timeline-intro {
  padding: 0 22px 18px;
}
.m-swipe-hint {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.m-swipe-hint span { letter-spacing: 0.22em; }

.m-timeline-track {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 22px;
  padding: 6px 22px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-timeline-track::-webkit-scrollbar { display: none; }

.m-event {
  flex: 0 0 84vw;
  max-width: 340px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 22px 20px 18px;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 10px 22px -18px rgba(46, 46, 40, 0.28);
}
.m-event-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.m-event-kind {
  font-weight: 700;
  color: var(--ink);
}
.m-event[data-accent="crimson"]    .m-event-kind { color: var(--crimson);    }
.m-event[data-accent="copper"]     .m-event-kind { color: var(--copper);     }
.m-event[data-accent="ochre"]      .m-event-kind { color: var(--ochre);      }
.m-event[data-accent="terracotta"] .m-event-kind { color: var(--terracotta); }
.m-event-date { color: var(--ink-dim); font-weight: 500; }
.m-event-hed {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 10px 0;
  color: var(--ink);
  text-wrap: pretty;
}
.m-event-hed em { font-style: italic; font-weight: 700; }
.m-event-body {
  margin: 0 0 12px 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.m-event-source {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.m-event-index {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 13px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.m-event-index span {
  color: var(--accent);
  font-weight: 600;
}

/* ─── Transition strip ───────────────────────────────────── */
.m-transition {
  padding: 88px 22px;
  text-align: center;
}
.m-rule-top,
.m-rule-bottom {
  display: block;
  width: 44px;
  height: 1px;
  margin: 0 auto 20px;
  background: var(--ink-dim);
}
.m-rule-bottom { margin: 20px auto 0; }
.m-transition-eyebrow {
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.m-transition-eyebrow em { font-style: italic; font-weight: 700; color: var(--accent); }

/* ─── Hero ───────────────────────────────────────────────── */
.m-hero {
  background: var(--paper-2);
  padding: 72px 22px 80px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.m-hero-mark {
  margin: 0 0 28px 0;
  line-height: 0;
}
.m-hero-mark img {
  height: 36px;
  width: auto;
  display: inline-block;
  opacity: 0.95;
}
.m-eyebrow {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px 0;
}
.m-hero-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0 0 22px 0;
  text-wrap: pretty;
}
.m-hero-title em { font-style: italic; font-weight: 700; color: var(--accent); }
.m-hero-lede {
  margin: 0 auto 32px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 44ch;
}
.m-support {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 18px 0;
  border-top: 1px solid var(--line);
}
.m-support-label {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.m-support-name {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: #3c6b6b;
}

/* ─── Capabilities ───────────────────────────────────────── */
.m-caps {
  padding: 88px 22px 88px;
}
.m-cap {
  position: relative;
  padding: 24px 22px 24px;
  margin: 0 0 18px 0;
  border-radius: 10px;
  box-shadow:
    0 16px 28px -22px rgba(46, 46, 40, 0.45),
    0 4px 10px -6px rgba(46, 46, 40, 0.18);
  min-height: 120px;
  /* Per-layer backgrounds match the desktop palette: sage, slate,
     clay, plum. Text is flipped to paper for contrast. */
  background: #7a8c70;  /* default = layer 0, overridden below */
  color: #fbf6e9;
  /* Clip the oversized corner icon so it reads as "tucked into the
     corner" rather than floating outside the tile. */
  overflow: hidden;
}
.m-cap:last-child { margin-bottom: 0; }
.m-cap:nth-of-type(1) { background: #7a8c70; }  /* sage  — The AI        */
.m-cap:nth-of-type(2) { background: #7b9399; }  /* slate — The Knowledge */
.m-cap:nth-of-type(3) { background: #b07556; }  /* clay  — The Tools     */
.m-cap:nth-of-type(4) { background: #8a7a92; }  /* plum  — The Agents    */

.m-cap-icon {
  position: absolute;
  /* Negative offsets push the icon up and into the corner, past the
     card edges. The parent's overflow: hidden clips the overflow so
     the icon reads as a corner ornament that's been tucked into the
     tile rather than sitting inside it. */
  top: -18px;
  right: -18px;
  width: 148px;
  height: 148px;
  object-fit: contain;
  object-position: right top;
  opacity: 1;
  pointer-events: none;
}
.m-cap-num {
  display: inline-block;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: 13.5px;
  color: rgba(251, 246, 233, 0.85);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  /* Keep clear of the icon in the top-right. */
  padding-right: 120px;
}
.m-cap-eyebrow {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 246, 233, 0.8);
  margin: 0 0 10px 0;
  padding-right: 120px;
}
.m-cap-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
  color: #fbf6e9;
  text-wrap: pretty;
  padding-right: 120px;
}
.m-cap-title b {
  font-weight: 700;
  font-style: normal;
}
.m-cap-title em {
  font-style: italic;
  font-weight: 700;
  color: #fff9ea;
}
.m-cap-body {
  margin: 0;
  padding-right: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(251, 246, 233, 0.88);
}
.m-cap-body em {
  font-style: italic;
  font-weight: 700;
  color: #fff9ea;
}

/* ─── Project Bifrost reveal ─────────────────────────────── */
.m-bifrost {
  position: relative;
  overflow: hidden;
  padding: 120px 22px 110px;
  background: linear-gradient(to bottom,
    var(--paper) 0%, var(--paper-2) 40%, var(--paper-2) 60%, var(--paper) 100%);
  text-align: center;
}
/* The arc is drawn in an SVG that's wider than the viewport so the
   gradient ends are always cropped at the screen edges — the bridge
   runs off the sides instead of shrinking into a thin ribbon. */
.m-bifrost-arc {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 190%;
  max-width: 900px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.98;
}
.m-bifrost-arc svg {
  display: block;
  width: 100%;
  height: auto;
}
.m-bifrost-content {
  position: relative;
  z-index: 2;
}
.m-bifrost-eyebrow {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px 0;
}
.m-bifrost-name {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 26px 0;
}
.m-bifrost-name em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}
.m-bifrost-sub {
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 38ch;
}
.m-bifrost-sub em { font-style: italic; font-weight: 700; color: var(--accent); }

/* ─── What Bifrost means ─────────────────────────────────── */
.m-meaning {
  padding: 80px 22px 72px;
}
.m-meaning-lede {
  margin: 0 0 40px 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.m-meaning-lede em { font-style: italic; font-weight: 700; color: var(--ink); }
.m-stop {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.m-stop:first-of-type { border-top: none; padding-top: 8px; }
.m-stop-illust {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 0 20px 0;
  /* SVG illustrations have white-ish backgrounds; let them sit on
     paper without a frame. */
}
.m-stop-eyebrow {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 8px 0;
}
.m-stop-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 8px 0;
}
.m-stop-title em { font-style: italic; font-weight: 700; color: var(--accent); }
.m-stop-sub {
  margin: 0 0 14px 0;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
}
.m-stop-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

/* ─── Join CTA — the most emphatic section on the page ───── */
.m-join {
  padding: 100px 22px 120px;
  background: var(--paper-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.m-join-panel {
  text-align: center;
  padding: 40px 24px 36px;
  background: #fffdf6;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow:
    0 30px 50px -24px rgba(46, 46, 40, 0.28),
    0 8px 18px -10px rgba(46, 46, 40, 0.14);
  position: relative;
}
.m-join-panel::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 1.5px;
  background: var(--accent);
}
.m-join-eyebrow {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px 0;
}
.m-join-headline {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.014em;
  margin: 0 0 28px 0;
  text-wrap: pretty;
}
.m-join-headline em { font-style: italic; font-weight: 700; color: var(--accent); }
.m-join-button {
  all: unset;
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 18px 34px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow:
    0 14px 26px -14px rgba(46, 46, 40, 0.55),
    0 4px 10px -6px rgba(46, 46, 40, 0.3);
}
.m-join-button:active {
  background: #000;
  transform: translateY(1px);
}
.m-join-button:disabled { opacity: 0.55; cursor: progress; }
.m-join-subtext {
  margin: 24px 0 0 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.m-confirm-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.m-confirm-list li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.m-confirm-list li:first-child { border-top: none; }
.m-confirm-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.m-confirm-list em { font-style: italic; font-weight: 700; color: var(--accent); }

/* ─── Footer (stacked brand marks) ───────────────────────── */
.m-foot {
  padding: 44px 22px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.m-foot-mark {
  line-height: 0;
  color: var(--ink);
}
.m-foot-mark--project {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.m-foot-mark--project em {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}
.m-foot-mark--fenja {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.92;
}
.m-foot-mark--innov {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #3c6b6b;
  line-height: 1;
}
.m-innov-mark {
  width: 9px;
  height: 16px;
  display: block;
}
.m-innov-word {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  color: #3c6b6b;
}
