/* ═══════════════════════════════════════════════════════════════
   EditorialCard — card chrome, clipping and paper grain

   The artwork itself is drawn in editorial-card.js. This file owns
   only what CSS is better at: the rounded clip, the shadow, and the
   grain that ties the generated paper to the page's own paper ground.

   Grain reuses --paper-grain / --paper-mottle from new-styles.css
   rather than defining a third noise: one texture, one definition.
   ═══════════════════════════════════════════════════════════════ */

/* The art slot. Everything decorative lives inside this clip — nothing
   a generated shape does can escape the card's corners. */
.ec-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;   /* decorative: never a drag or click target */
  border-radius: inherit;
  overflow: hidden;
}

.ec-art-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Grain over the art, never under it, and deliberately weak. Paper is a
   fibre you notice on the second look; at the strength that reads on a
   flat fill it speckles a drawn shape into mud. */
.ec-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--paper-grain), var(--paper-mottle);
  background-size: 130px 130px, 330px 330px;
  background-blend-mode: overlay, overlay;
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

/* A hairline of the page's ink inside the clip: a cut-paper card sits on
   the ground, it is not a window into it. */
.ec-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(45, 35, 22, 0.07) inset;
}

/* ── Standalone card, for anywhere that is not the people rail ──── */
.ec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ec-card-art {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 21;
  border-radius: clamp(22px, 2vw, 30px);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(45, 35, 22, 0.06),
    0 14px 34px -14px rgba(45, 35, 22, 0.26);
}

.ec-card-body {
  position: relative;
  z-index: 1;
}

/* Print and forced-colours both want the content, not the collage. */
@media print {
  .ec-art { display: none; }
}

@media (forced-colors: active) {
  .ec-art { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FOLLOW THE BUILD — the social row

   Four tiles, each carrying its service's own colour. Grain comes
   from the page's --paper-grain so a brand colour still reads as
   printed stock rather than as a flat web swatch.
   ═══════════════════════════════════════════════════════════════ */
.loop-section {
  padding: clamp(72px, 7.5vw, 112px) 0 clamp(80px, 8vw, 120px);
  text-align: center;
  position: relative;
}

.loop-heading {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-heading);
  margin-bottom: 16px;
}

.loop-lead {
  font-size: clamp(14.5px, 1.2vw, 17px);
  line-height: 1.6;
  color: var(--ink-body);
  max-width: 56ch;
  margin: 0 auto clamp(40px, 4.4vw, 64px);
}

.loop-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.loop-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: clamp(230px, 22vw, 290px);
  padding: clamp(22px, 2.2vw, 32px) clamp(16px, 1.6vw, 24px);
  border-radius: clamp(18px, 1.8vw, 24px);
  background: var(--brand);
  color: var(--ink-heading);
  box-shadow:
    0 0 0 1px rgba(45, 35, 22, 0.06),
    0 14px 34px -16px rgba(45, 35, 22, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.loop-card-dark {
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.14),
    0 16px 38px -16px rgba(25, 20, 15, 0.45);
}

/* Printed stock, not a web swatch. */
.loop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--paper-grain), var(--paper-mottle);
  background-size: 150px 150px, 380px 380px;
  background-blend-mode: overlay, overlay;
  mix-blend-mode: soft-light;
  opacity: 0.5;
}

.loop-card > * {
  position: relative;
  z-index: 1;
}

/* The icon sits on its own inset plate, as in the reference — it reads
   as an app tile rather than as a glyph printed on the card. */
.loop-tile {
  display: grid;
  place-items: center;
  width: clamp(56px, 5.4vw, 72px);
  aspect-ratio: 1;
  margin-bottom: 18px;
  border-radius: 24%;
  background: #FCFCFB;
  /* currentColor carries the brand down to the glyph, so fill AND the
     envelope's stroke both pick it up from one declaration. */
  color: var(--brand);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06) inset,
    0 8px 20px -10px rgba(0, 0, 0, 0.55);
}

.loop-tile svg {
  width: 54%;
  height: 54%;
  fill: currentColor;
}

/* A stroked icon declares fill="none" on the root, and the rule above
   overrides that presentation attribute — which turned the envelope into
   a filled black blob. Stroked marks opt back out. */
.loop-tile svg[fill="none"] {
  fill: none;
}

.loop-handle {
  font-size: clamp(12.5px, 1.05vw, 14px);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* An address is not a handle: upper-casing it is wrong to read and wrong
   to copy, and the wide tracking that suits SURYANSH2846CODE pushes it
   past the card. */
.loop-handle-mail {
  text-transform: none;
  letter-spacing: 0.005em;
  font-size: clamp(12px, 1vw, 13.5px);
  word-break: break-all;
}

.loop-sub {
  font-size: clamp(12.5px, 1.05vw, 14px);
  line-height: 1.45;
  opacity: 0.66;
  max-width: 22ch;
}

a.loop-card:hover {
  transform: translateY(-3px);
}

a.loop-card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

/* A card with no handle yet is not a link and must not pretend to be
   one: no pointer, no lift, and the handle reads as the placeholder it
   is. Same rule the people rail follows with "Full Name". */
.loop-card-pending {
  cursor: default;
}

.loop-card-pending .loop-handle {
  opacity: 0.55;
}

@media (max-width: 920px) {
  .loop-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .loop-row {
    grid-template-columns: 1fr;
    max-width: 340px;
  }

  .loop-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loop-card { transition: none; }
  a.loop-card:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — one dark panel inset from the page edges
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  /* Above the page-wide paper wash. body::after lays a soft-light grain over
     everything at opacity .95, which is right for a cream ground and wrong
     for a dark panel — it was lifting #121110 to a warm brown. The footer is
     its own stock and keeps its own grain below. */
  position: relative;
  z-index: 1;
  padding: clamp(18px, 2vw, 30px) clamp(14px, 2.4vw, 30px) clamp(14px, 2vw, 24px);
}

.footer-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(24px, 2.4vw, 32px);
  background: #060606;
  /* A hairline of light inside the edge, so the panel reads as a printed
     surface with a thickness rather than as a hole cut in the page. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  padding: clamp(40px, 4.6vw, 74px) clamp(26px, 3.6vw, 62px) clamp(22px, 2.4vw, 34px);
  color: rgba(255, 255, 255, 0.72);
}

/* Film grain, not sandpaper. The difference is frequency and alpha: the
   page's --paper-grain is a coarse speckle at high opacity meant to be felt
   through a cream ground, and over near-black it read as grit. This is a
   fine fractalNoise whose ALPHA varies too, so most pixels stay fully
   transparent and only a scatter of them lift — which is what film grain
   actually is. 300px tile with stitchTiles, so no seam and nothing the eye
   can lock onto as a repeat. */
.footer-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Additive light grain lifts the mean as it gets stronger, so the base is
     dropped to #060606 to pay for it: measured, this lands the panel at
     ~#1B1B1B with a grain sigma of 7.7 — about 70% more texture than the
     first pass, still unambiguously matte black. */
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch' result='n'/%3E%3CfeColorMatrix type='saturate' values='0' in='n' result='m'/%3E%3CfeComponentTransfer in='m'%3E%3CfeFuncA type='linear' slope='0.75' intercept='-0.12'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* One very wide, very weak lift so the field is not dead flat. Far too
   large and too faint to register as a gradient. */
.footer-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 22% 8%,
    rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 62%);
}

.footer-panel > * {
  position: relative;
  z-index: 1;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 44px);
}

.footer-head {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* A second group in the same column, set off by a rule rather than by a
   heading — the reference's "Legal" and "Learn" blocks do the same. */
/* Qualified with the element, or `.footer-col ul` above — two classes and a
   type, against this one class — wins on specificity and the divider
   collapses back onto the item above it. */
.footer-col ul.footer-sub {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-col a {
  font-size: 14.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.64);
  transition: color 140ms ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
  border-radius: 3px;
}

.footer-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
  max-width: 24ch;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(36px, 4vw, 60px);
  padding-top: clamp(18px, 2vw, 26px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
}

.footer-mark img {
  border-radius: 4px;
}

.footer-legal {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
}

@media (max-width: 1080px) {
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
}

@media (max-width: 760px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .cta-btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 460px) {
  .footer-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-btn, .cta-btn .arr { transition: none; }
  .cta-btn:hover { transform: none; }
  .cta-btn:hover .arr { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   THE LAST ASK — one green panel: the pitch and the form

   The green is drawn by editorial-card.js (wash · sage) over a light
   base, so the art can never darken the field the form sits on.
   ═══════════════════════════════════════════════════════════════ */
.waitlist-section {
  padding: clamp(40px, 4.4vw, 72px) 0 clamp(30px, 3vw, 46px);
}

.join-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 68px);
  align-items: start;
  padding: clamp(32px, 4.2vw, 64px) clamp(26px, 3.6vw, 58px);
  border-radius: clamp(22px, 2.2vw, 32px);
  background: #CFE0CD;
  box-shadow:
    0 1px 2px rgba(45, 35, 22, 0.05),
    0 22px 52px -22px rgba(45, 35, 22, 0.32);
}

.join-panel .ec-art {
  z-index: 0;
  opacity: 0.45;
}

.join-panel > *:not(.ec-art) {
  position: relative;
  z-index: 1;
}

.join-kicker {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(27, 42, 30, 0.6);
  margin-bottom: 14px;
}

.join-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 50px);
  font-weight: 450;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #1B2A1E;
  margin-bottom: 14px;
}

.join-lead {
  font-size: clamp(14px, 1.15vw, 16.5px);
  line-height: 1.55;
  color: rgba(27, 42, 30, 0.74);
  max-width: 34ch;
}

.join-points {
  list-style: none;
  margin: clamp(20px, 2.2vw, 30px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.join-points li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(27, 42, 30, 0.74);
}

/* A tick drawn in CSS, not a dingbat: an emoji ignores currentColor. */
.join-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 8px;
  height: 4.5px;
  border-left: 1.8px solid rgba(27, 42, 30, 0.6);
  border-bottom: 1.8px solid rgba(27, 42, 30, 0.6);
  transform: rotate(-45deg);
}

.join-source {
  display: inline-block;
  margin-top: clamp(20px, 2.2vw, 30px);
  font-size: 14.5px;
  font-weight: 600;
  color: #1B2A1E;
  border-bottom: 1px solid rgba(27, 42, 30, 0.3);
  padding-bottom: 2px;
}

.join-source:hover {
  border-bottom-color: #1B2A1E;
}

/* The form sits on its own light card — a translucent input on a textured
   green field is unreadable, and this is the one place on the page a
   person has to type. */
.join-form-wrap {
  background: rgba(253, 252, 250, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  border-radius: clamp(16px, 1.6vw, 22px);
  padding: clamp(22px, 2.4vw, 34px);
  box-shadow:
    0 0 0 1px rgba(27, 42, 30, 0.07),
    0 14px 34px -18px rgba(27, 42, 30, 0.4);
}

.join-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.join-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.join-row .join-field { margin-bottom: 0; }
.join-row { margin-bottom: 14px; }

.join-field label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-body);
}

.join-field .req { color: var(--accent-gold); }
.join-field .opt { font-weight: 400; color: var(--ink-light); }

.join-input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-heading);
  background: #fff;
  border: 1px solid rgba(45, 35, 22, 0.14);
  border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.join-input::placeholder { color: var(--ink-light); }

.join-input:focus {
  outline: none;
  border-color: #6E8C72;
  box-shadow: 0 0 0 3px rgba(110, 140, 114, 0.18);
}

.join-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
  padding: 15px 22px;
  border-radius: 999px;
  background: #17150F;
  color: #FAF7F2;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 24px -12px rgba(23, 21, 15, 0.7);
  transition: transform 150ms ease;
}

.join-submit:hover { transform: translateY(-2px); }
.join-submit:disabled { opacity: 0.6; transform: none; cursor: default; }
.join-submit .arr { transition: transform 150ms ease; }
.join-submit:hover .arr { transform: translateX(3px); }

.join-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
}

.join-success { text-align: center; padding: clamp(10px, 1.4vw, 22px) 0; }

.join-success-badge {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(110, 140, 114, 0.16);
  color: #3F5C3A;
}

.join-success-badge svg { width: 22px; height: 22px; }

.join-success h3 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 450;
  color: var(--ink-heading);
  margin-bottom: 6px;
}

.join-success p { font-size: 14.5px; color: var(--ink-body); }
.join-success .success-note { margin-top: 8px; font-size: 13px; color: var(--ink-muted); }

.join-error {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(190, 70, 50, 0.08);
}

.join-error .error-msg { font-size: 13.5px; color: #9A3B28; }

@media (max-width: 900px) {
  .join-panel { grid-template-columns: 1fr; }
  .join-lead { max-width: none; }
}

@media (max-width: 520px) {
  .join-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .join-submit, .join-submit .arr { transition: none; }
  .join-submit:hover, .join-submit:hover .arr { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   THE WORLD — cloud marginalia down the page

   One ornamental cloud, reused. Everything that varies is a custom
   property on the element, so adding another is one line of HTML.
   ═══════════════════════════════════════════════════════════════ */
/* Carries the marginalia only. The contour ground is fixed, on body::before
   — the clouds and birds still scroll, because they are drawn ON the page
   and the terrain is what the page is laid over. */
.world {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Clouds and birds hang off both edges on purpose; this is what stops
     that becoming a horizontal scrollbar. */
  overflow: hidden;
}

/* Ink marginalia: birds, a village, a dotted trail. Same positioning
   contract as the clouds, so adding one is a single line of HTML. */
.wm {
  position: absolute;
  top: var(--t);
  left: var(--x);
  width: var(--w);
  opacity: var(--o, 0.26);
  transform: rotate(var(--r, 0deg));
  mix-blend-mode: multiply;
}

.wm svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  /* No margins to draw in on a narrow screen, and a flock over body copy
     is noise rather than atmosphere. */
  .wm-trail,
  .wm-village { display: none; }
  .wm-birds { opacity: calc(var(--o, 0.26) * 0.55); }
}

.wc {
  position: absolute;
  top: var(--t);
  left: var(--x);
  width: var(--w);
  aspect-ratio: 1200 / 465;
  opacity: var(--o, 0.12);
  transform: rotate(var(--r, 0deg));
  background: url("/cloud-swirl.webp") center / contain no-repeat;
  /* Multiply so the gold sinks into the paper instead of sitting on it —
     over a cream ground this is the difference between a watermark and a
     sticker. */
  mix-blend-mode: multiply;
}

.wc-flip {
  transform: rotate(var(--r, 0deg)) scaleX(-1);
}

@media (max-width: 760px) {
  /* Narrow screens have no margins to put marginalia in. */
  .wc { opacity: calc(var(--o, 0.12) * 0.6); }
}
