/* ============================================================
   RUSTLE — Landing page styles. Built on brand/tokens.css.
   Reuses the brand DNA: signal-bars mark, serif display,
   EVENTS.LOG card, mono event vocabulary, iris-for-interactive.
   Desktop-first, responsive down to mobile.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 56px; }

/* ---- shared section heading ---- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--t-eyebrow); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--iris);
  margin: 0 0 18px;
}
.sec-title {
  font-family: var(--font-display); font-weight: 500; font-size: 42px;
  line-height: 1.05; letter-spacing: -.02em; margin: 0 0 18px; color: var(--text);
}
.sec-title em { font-style: italic; }
.sec-intro {
  font-size: var(--t-lead); line-height: 1.6; color: var(--subtle); max-width: 620px; margin: 0;
}
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 56px; }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: var(--r-btn); cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, filter .2s, border-color .2s, color .2s;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn-pri { background: var(--iris); color: var(--on-iris); }
.btn-pri:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-sec {
  background: transparent; color: var(--text);
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
  border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 7px 2px;
}
.btn-sec:hover { border-color: var(--iris); color: var(--iris); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--base) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.lockup { display: flex; align-items: center; gap: 12px; }
.sig { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.sig i { display: block; width: 4px; background: var(--iris); border-radius: 1px; }
.sig i:nth-child(1){ height: 8px; animation: sig 2.4s ease-in-out infinite; }
.sig i:nth-child(2){ height: 14px; animation: sig 2.4s ease-in-out infinite .25s; }
.sig i:nth-child(3){ height: 22px; animation: sig 2.4s ease-in-out infinite .5s; }
@keyframes sig { 0%,100%{ opacity:.35; } 50%{ opacity:1; } }
.word { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.word .tld { color: var(--iris); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--subtle); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--iris); }
.nav-right { display: flex; align-items: center; gap: 22px; }
/* ---- hamburger (mobile only; shown in the <920px query) ---- */
.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: var(--r-btn);
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  align-items: center; justify-content: center; transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--iris); }
.nav-toggle .bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle .bars i { display: block; width: 17px; height: 2px; background: var(--subtle); border-radius: 1px; transition: transform .2s, opacity .2s, background .2s; }
.nav-toggle:hover .bars i { background: var(--iris); }
.nav.open .nav-toggle .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* ---- nav language toggle (points to the other locale; compact for mobile) ---- */
.lang-link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--subtle);
  border: 1px solid var(--line-strong); border-radius: var(--r-chip); padding: 4px 9px; line-height: 1;
  transition: color .2s, border-color .2s;
}
.lang-link:hover { color: var(--iris); border-color: var(--iris); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 92px 0 104px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--gap-columns); align-items: center; }
.hero .ref { font-family: var(--font-mono); font-size: var(--t-eyebrow); letter-spacing: .16em; text-transform: uppercase; color: var(--iris); margin: 0 0 24px; }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: 72px; line-height: 1.0; letter-spacing: -.025em; margin: 0 0 26px; }
.hero h1 em { font-style: italic; color: var(--text); }
.hero .sub { font-size: var(--t-lead); line-height: 1.66; color: var(--subtle); max-width: 510px; margin: 0 0 36px; }
.hero .sub code { font-family: var(--font-mono); font-size: 15px; background: var(--iris-soft); color: var(--iris); padding: 1px 6px; border-radius: var(--r-chip); }
.hero .ctas { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* ---- EVENTS.LOG card (brand hero motif) ---- */
.ev-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.ev-card .ch { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ev-card .live { display: flex; align-items: center; gap: 6px; color: var(--iris); }
.ev-card .live .d { width: 6px; height: 6px; border-radius: 50%; background: var(--iris); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }
.ev-rows { padding: 6px 0; }
.ev-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: baseline; gap: 16px; padding: 11px 18px; font-family: var(--font-mono); font-size: 13.5px; border-bottom: 1px solid var(--line); transition: background .4s; }
.ev-row:last-child { border-bottom: none; }
.ev-row.fresh { background: var(--overlay); }
.ev-row .ix { color: var(--muted); font-size: 11px; }
.ev-row .ev { color: var(--text); }
.ev-row .ev .verb { color: var(--subtle); }
.ev-row .st { display: flex; align-items: center; gap: 7px; font-size: 11.5px; justify-self: end; }
.ev-row .st .d { width: 6px; height: 6px; border-radius: 50%; }
.st.delivered { color: var(--foam); } .st.delivered .d { background: var(--foam); }
.st.retrying  { color: var(--gold); } .st.retrying  .d { background: var(--gold); }
.st.failed    { color: var(--love); } .st.failed    .d { background: var(--love); }
.ev-row .t { color: var(--muted); font-size: 11.5px; justify-self: end; min-width: 60px; text-align: right; }
.ev-card .foot { padding: 13px 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--t-micro); color: var(--muted); display: flex; justify-content: space-between; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--iris); margin-left: 2px; vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,50%{ opacity:1; } 50.01%,100%{ opacity:0; } }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.step { background: var(--base); padding: 34px 32px 38px; }
.step .num { font-family: var(--font-mono); font-size: 13px; color: var(--iris); letter-spacing: .1em; margin-bottom: 18px; }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 23px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; color: var(--text); }
.step p { font-size: 15px; line-height: 1.6; color: var(--subtle); margin: 0; }
.step p code { font-family: var(--font-mono); font-size: 13px; color: var(--text); }

/* ============================================================
   EVENT CATALOG
   ============================================================ */
.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 26px 14px; }
.cat-card .cat-h { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.evt { padding: 14px 0; border-bottom: 1px solid var(--line); }
.evt:last-child { border-bottom: none; }
.evt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evt .name { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.evt .name .verb { color: var(--subtle); }
.evt .desc { font-size: 13px; line-height: 1.5; color: var(--subtle); margin-top: 5px; }
.evt.is-planned .name { color: var(--subtle); }
.evt.is-planned .desc { color: var(--muted); }
/* ---- Live / Planned status pill (reused by integration tiles) ---- */
.evt-status, .tile .badge {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-chip); white-space: nowrap; flex-shrink: 0;
}
.is-live { color: var(--foam); background: color-mix(in srgb, var(--foam) 14%, transparent); }
.is-planned { color: var(--muted); background: var(--overlay); }

/* ============================================================
   WHERE IT LANDS
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; transition: border-color .2s, transform .12s; cursor: default; }
.tile:hover { border-color: var(--iris); transform: translateY(-2px); }
.tile.is-planned-tile { opacity: .82; }
.tile .badge { position: absolute; top: 9px; right: 9px; }
.tile .glyph { width: 26px; height: 26px; color: var(--muted); transition: color .2s; }
.tile.is-planned-tile .glyph { color: var(--muted); }
.tile:hover .glyph { color: var(--iris); }
.tile .nm { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.tile .glyph svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   BUILT FOR DEVELOPERS (forced-dark code panel)
   ============================================================ */
.dev-panel { border-radius: var(--r-card); border: 1px solid var(--line-strong); background: var(--base); overflow: hidden; box-shadow: var(--shadow-card); }
.dev-grid { display: grid; grid-template-columns: 1.35fr 1fr; }
.code-col { padding: 0; }
.code-col + .code-col { border-left: 1px solid var(--line); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.dot3 { display: flex; gap: 6px; margin-right: 6px; }
.dot3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--overlay); display: block; }
pre { margin: 0; padding: 22px 24px; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--subtle); overflow-x: auto; }
pre .k { color: var(--text); }
pre .s { color: var(--subtle); }
pre .p { color: var(--muted); }
pre .c { color: var(--muted); font-style: italic; }
pre .cmd { color: var(--text); }
pre .flag { color: var(--iris); }
.dev-cap { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: center; margin: 22px 0 0; }

/* ============================================================
   WHY NOT JUST SCRIPT IT
   ============================================================ */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col { border-radius: var(--r-card); border: 1px solid var(--line); padding: 30px 30px 34px; }
.col.hack { background: transparent; }
.col.rustle { background: var(--surface); border-color: var(--line-strong); }
.col .col-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.col .col-h .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.col.rustle .col-h .lbl { color: var(--iris); }
.col .col-h .tag { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--subtle); }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.clist li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; }
.clist .mk { font-family: var(--font-mono); font-size: 14px; line-height: 1.45; }
.col.hack .clist li { color: var(--muted); } .col.hack .mk { color: var(--muted); }
.col.rustle .clist li { color: var(--text); } .col.rustle .mk { color: var(--iris); }
.compare-quote { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.3; letter-spacing: -.015em; text-align: center; margin: 56px auto 0; max-width: 720px; color: var(--text); }
.compare-quote em { font-style: italic; color: var(--iris); }

/* ============================================================
   PRICING
   ============================================================ */
/* The heading/intro stay in the normal 1140px column; only the Stripe table
   breaks out wider (centered on the page) so its plans fit in one row. */
.pricing {
  display: block;
  width: min(1640px, 100vw - 48px);
  margin-left: 50%;
  transform: translateX(-50%);
}
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 32px 30px 34px; display: flex; flex-direction: column; }
.tier.featured { border-color: var(--iris); box-shadow: 0 0 0 1px var(--iris); }
.tier .tier-name { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.tier.featured .tier-name { color: var(--iris); }
.tier .badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--on-iris); background: var(--iris); padding: 3px 8px; border-radius: var(--r-chip); }
.tier .price { font-family: var(--font-display); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -.02em; color: var(--text); margin-bottom: 4px; }
.tier .price .todo { color: var(--muted); }
.tier .price .per { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.tier .placeholder-flag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--overlay); padding: 3px 8px; border-radius: var(--r-chip); display: inline-block; margin-bottom: 22px; }
.tier .feats { list-style: none; margin: 0 0 28px; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tier .feats li { font-size: 14px; line-height: 1.45; color: var(--subtle); display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.tier .feats li .mk { color: var(--iris); font-family: var(--font-mono); }
.tier .feats li b { color: var(--text); font-weight: 600; }
.tier .btn { justify-content: center; width: 100%; }
.tier:not(.featured) .btn-pri { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.tier:not(.featured) .btn-pri:hover { border-color: var(--iris); color: var(--iris); filter: none; transform: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .f-links { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 13px; color: var(--subtle); }
.footer .f-links a:hover { color: var(--iris); }
.footer .copy { font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }
/* ---- footer language switcher (full EN | FR) ---- */
.lang-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: var(--r-btn);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.lang-seg a {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em; line-height: 1.2;
  color: var(--muted); padding: 4px 10px; border-radius: calc(var(--r-btn) - 3px);
  transition: color .15s, background .15s;
}
.lang-seg a:hover { color: var(--subtle); }
.lang-seg a.active { color: var(--text); background: var(--overlay); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .wrap { padding: 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 56px; }
  .steps { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .dev-grid { grid-template-columns: 1fr; }
  .code-col + .code-col { border-left: none; border-top: 1px solid var(--line); }
  .compare { grid-template-columns: 1fr; }
  .sec-title { font-size: 34px; }
  .section { padding: 76px 0; }

  /* Hamburger replaces the inline links below 920px */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line-strong);
    padding: 8px 32px 16px;
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav-links a:last-child { border-bottom: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 22px; }
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 44px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .ev-row { gap: 10px; font-size: 12.5px; }
  .compare-quote { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
