/* =========================================================================
   AI With Remy — Link in Bio
   Brand: "Sophisticated Digital Nostalgia". Mobile-first, density-tuned.
   Tokens lifted verbatim from the live aiwithremy.com styles.css.
   Signature element: the Web 1.0 raised button, used as the link-tree row.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Silkscreen:wght@400;700&display=swap');

@font-face {
  font-family: 'PP Neue Bit';
  src: url('assets/fonts/ppneuebit-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour — Blueprint Blue as sparse accent */
  --color-bg: #FFFFFF;
  --color-text: #121212;
  --color-text-secondary: #7E7E7E;
  --color-text-muted: #AAAAAA;
  --color-accent: rgb(64, 64, 255);
  --color-accent-light: rgba(64, 64, 255, 0.1);
  --color-gray-100: #F8F8F8;
  --color-gray-200: #F2F2F2;
  --color-gray-300: #E3E3E3;
  --color-gray-400: #CCCCCC;
  --color-border: rgba(33, 33, 33, 0.12);
  --color-border-strong: rgba(33, 33, 33, 0.25);

  /* Type */
  --font-display: 'PP Neue Bit', 'Space Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-pixel: 'Silkscreen', 'Space Mono', monospace;

  /* Spacing scale (fixed) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;

  /* Layout */
  --col: 440px;
  --radius-sm: 4px;
  --radius-md: 8px;

  --transition-fast: 150ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }  /* must beat display:flex on .cgate / .links */

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.45;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(64, 64, 255, 0.04), transparent 60%);
  background-repeat: no-repeat;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-3);
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }

.head__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 0.95;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.head__tagline {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  max-width: 32ch;
}

/* ---------- Social row ---------- */
.socials {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-sm);
  box-shadow: inset -2px -2px 0 0 var(--color-gray-300);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.social svg { width: 19px; height: 19px; display: block; }
.social:hover { background: var(--color-gray-100); }
.social:active { box-shadow: inset 2px 2px 0 0 var(--color-gray-300); transform: translateY(1px); }
.social:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Featured capture card (the universal fallback) ---------- */
.featured {
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  box-shadow: 0 2px 0 0 var(--color-gray-300), 0 8px 20px rgba(0,0,0,0.06);
}

.featured__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  margin: 3px;
  padding: 4px 6px 4px 9px;
  background: linear-gradient(90deg, var(--color-accent), #2a2ad6);
  color: #fff;
}
.featured__bar-text {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.featured__bar-dots { display: flex; gap: 4px; }
.featured__bar-dots i { width: 7px; height: 7px; background: rgba(255,255,255,0.85); display: block; }

.featured__body { padding: var(--space-4) var(--space-4) var(--space-4); text-align: center; }

.featured__kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.featured__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.featured__blurb {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

#featured-cta { width: 100%; }

/* ---------- Signup form ---------- */
.signup { display: flex; flex-direction: column; gap: var(--space-2); }

.signup__input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: 16px; /* >=16px stops iOS zoom-on-focus */
  color: var(--color-text);
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px #000;
  border-radius: 0;
  outline: none;
}
.signup__input::placeholder { color: var(--color-text-muted); }
.signup__input:focus { box-shadow: inset 1px 1px #000, 0 0 0 2px var(--color-accent-light); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-sm);
  box-shadow: inset -2px -2px 0 0 var(--color-gray-300);
  transition: background var(--transition-fast);
}
.btn:hover { background: var(--color-gray-100); }
.btn:active { box-shadow: inset 2px 2px 0 0 var(--color-gray-300); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

.btn--primary {
  color: #fff;
  background: var(--color-accent);
  border-color: #2a2ad6;
  box-shadow: inset -2px -2px 0 0 #2a2ad6;
}
.btn--primary:hover { background: #3535ee; }
.btn--primary:active { box-shadow: inset 2px 2px 0 0 #2a2ad6; }

.signup__msg {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  min-height: 1em;
  text-align: center;
}
.signup__msg--ok { color: var(--color-accent); }
.signup__msg--err { color: #b00000; }

/* ---------- Link stack (the link tree) ---------- */
.links { display: flex; flex-direction: column; gap: var(--space-2); }

.link {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-sm);
  box-shadow: inset -2px -2px 0 0 var(--color-gray-300);
  transition: background var(--transition-fast);
}
.link:hover { background: var(--color-gray-100); }
.link:active { box-shadow: inset 2px 2px 0 0 var(--color-gray-300); }
.link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.link__diamond { color: var(--color-accent); font-size: 0.6rem; flex-shrink: 0; }

.link__text { flex: 1; min-width: 0; text-align: left; }
.link__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.link__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--color-text-secondary);
  text-transform: none;
  letter-spacing: normal;
  margin-top: 1px;
}

.link__badge {
  flex-shrink: 0;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-accent);
  padding: 2px 5px;
}

.link__arrow { flex-shrink: 0; color: var(--color-text-muted); transition: transform var(--transition-fast); }
.link:hover .link__arrow { transform: translateX(2px); color: var(--color-text); }

/* ---------- Campaign cards (email-gated) ---------- */
.link--campaign { width: 100%; cursor: pointer; text-align: left; font: inherit; }
.link__lock { flex-shrink: 0; font-size: 0.8rem; opacity: 0.55; }
.link--campaign:hover .link__lock { opacity: 1; }

/* ---------- Email gate modal ---------- */
.cgate { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(18,18,18,0.45); }
.cgate__panel { width: 100%; max-width: 360px; background: var(--color-bg); border: 1px solid var(--color-border-strong); box-shadow: 0 2px 0 0 var(--color-gray-300), 0 18px 44px rgba(0,0,0,0.22); }
.cgate__bar { display: flex; align-items: center; justify-content: space-between; margin: 3px; padding: 5px 6px 5px 10px; background: linear-gradient(90deg, var(--color-accent), #2a2ad6); color: #fff; }
.cgate__bar-text { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase; }
.cgate__x { width: 20px; height: 18px; display: flex; align-items: center; justify-content: center; background: #C0C0C0; color: #000; border: 1px solid #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.cgate__body { padding: var(--space-5) var(--space-4) var(--space-4); text-align: center; }
.cgate__kicker { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-1); }
.cgate__name { font-family: var(--font-body); font-weight: 700; font-size: 1.0625rem; line-height: 1.2; margin-bottom: var(--space-3); }

/* ---------- Footer ---------- */
.foot {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding-top: var(--space-2);
}

.foot__pill {
  display: inline-flex; flex-direction: column; align-items: stretch;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #dfdfdf #000 #000 #dfdfdf;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #808080, 3px 3px 0 rgba(0,0,0,0.35);
}
.foot__pill-chrome {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--color-accent), #2a2ad6);
  padding: 3px 6px; margin: 2px 2px 0;
}
.foot__pill-dots { display: flex; gap: 3px; }
.foot__pill-dots i { width: 6px; height: 6px; background: #fff; display: block; opacity: 0.9; }
.foot__pill-url { font-family: var(--font-mono); font-size: 8px; color: #fff; background: rgba(255,255,255,0.18); padding: 1px 6px; letter-spacing: 0.3px; }
.foot__pill-page { background: #fff; margin: 3px; padding: 5px 12px; display: flex; }
.foot__pill-page img { height: 17px; width: auto; display: block; }

.foot__copy {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.7;
}

.page-end { width: 100%; overflow: hidden; }
.page-end__dither {
  width: 100%; height: 52px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect x='0' y='0' width='1' height='1' fill='%23AAAAAA'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect x='2' y='2' width='1' height='1' fill='%23AAAAAA'/%3E%3C/svg%3E");
  background-size: 4px 4px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

/* ---------- Entrance motion (respect reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(8px); animation: rise 420ms ease forwards; }
  .reveal:nth-child(1) { animation-delay: 40ms; }
  .reveal:nth-child(2) { animation-delay: 90ms; }
  .reveal:nth-child(3) { animation-delay: 140ms; }
  .reveal:nth-child(4) { animation-delay: 190ms; }
  .reveal:nth-child(5) { animation-delay: 240ms; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* Larger screens: column stays narrow, just a touch more breathing room */
@media (min-width: 600px) {
  .wrap { padding-top: var(--space-6); gap: var(--space-4); }
  .head__name { font-size: 2.25rem; }
}
