/* ═══════════════════════════════════════════════
   anything.network — Infrastructure Editorial
   Warm parchment meets engineering precision
   ═══════════════════════════════════════════════ */

:root {
  --bg: #f5f0e6;
  --paper: #fffaf1;
  --ink: #142311;
  --muted: #4a5c44;
  --brand: #e2671f;
  --brand-deep: #a53d00;
  --brand-glow: rgba(226, 103, 31, 0.15);
  --line: #d6c5ac;
  --signal: #0f9983;
  --signal-glow: rgba(15, 153, 131, 0.12);
  --shadow-sm: 0 2px 8px rgba(20, 35, 17, 0.06);
  --shadow: 0 18px 50px rgba(20, 35, 17, 0.12);
  --shadow-hover: 0 24px 60px rgba(20, 35, 17, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Fraunces", serif;
  background:
    radial-gradient(ellipse 80% 60% at 8% 4%, rgba(226, 103, 31, 0.09), transparent 50%),
    radial-gradient(ellipse 70% 50% at 92% 8%, rgba(15, 153, 131, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(166, 136, 95, 0.08), transparent 50%),
    linear-gradient(180deg, #fdf7eb 0%, var(--bg) 40%, #efe6d7 100%);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise grain overlay — added via ::after on body */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  color: inherit;
}

::selection {
  background: var(--brand-glow);
  color: var(--ink);
}

/* ─── Shell ─── */

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ─── Topbar ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(253, 247, 235, 0.78);
  border-bottom: 1px solid rgba(166, 136, 95, 0.22);
  transition: background 300ms var(--ease);
}

.topbar .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand-mark {
  font-family: "Bebas Neue", cursive;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 200ms var(--ease);
}

.brand-mark:hover {
  opacity: 0.7;
}

.brand-mark span {
  color: var(--brand);
}

.nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 200ms var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--brand);
  transition: width 280ms var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--brand-deep);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

/* ─── Hero ─── */

.hero {
  padding: 5rem 0 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.accent {
  color: var(--brand-deep);
  font-style: italic;
}

.hero p {
  margin: 1.3rem 0 0;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  max-width: 56ch;
  color: var(--muted);
  font-weight: 300;
}

/* ─── Bento Cards ─── */

.bento {
  display: grid;
  gap: 0.75rem;
}

.card {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(166, 136, 95, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.25rem;
  transition:
    transform 360ms var(--ease),
    box-shadow 360ms var(--ease),
    border-color 360ms var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(226, 103, 31, 0.3);
}

.card h3 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--brand-deep);
  font-weight: 700;
}

.card p {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ─── Panel Grid ─── */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  transition:
    transform 360ms var(--ease),
    box-shadow 360ms var(--ease);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--signal));
  opacity: 0;
  transition: opacity 360ms var(--ease);
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.panel:hover::before {
  opacity: 1;
}

.panel h4 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--brand-deep);
  font-weight: 700;
}

.panel p {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
}

/* ─── Sections ─── */

section {
  padding: 3.5rem 0;
}

section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.subline {
  max-width: 68ch;
  color: var(--muted);
  margin-top: 0;
  font-weight: 300;
  font-size: 1.05rem;
}

/* ─── Playbook / Blog List ─── */

.playbook-list,
.blog-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    transform 360ms var(--ease),
    border-color 300ms var(--ease),
    box-shadow 360ms var(--ease);
}

.entry::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-glow), transparent 60%);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.entry:hover,
.entry:focus-visible {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.entry:hover::before,
.entry:focus-visible::before {
  opacity: 1;
}

.entry small {
  display: inline-block;
  font-family: "IBM Plex Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.entry h3 {
  margin: 0.4rem 0 0.55rem;
  font-size: 1.3rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.entry-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  margin-right: 0.35rem;
  margin-top: 0.6rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.entry:hover .tag {
  border-color: rgba(226, 103, 31, 0.35);
  color: var(--brand-deep);
}

/* ─── CTA Band ─── */

.cta-band {
  border: 1px solid rgba(166, 136, 95, 0.3);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(226, 103, 31, 0.08), rgba(15, 153, 131, 0.08) 60%, rgba(166, 136, 95, 0.06));
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(15, 153, 131, 0.06), transparent 70%);
  pointer-events: none;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.cta-band p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.cta-row {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */

.button {
  text-decoration: none;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1.5px solid var(--brand-deep);
  padding: 0.6rem 1.15rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition:
    background 200ms var(--ease),
    color 200ms var(--ease),
    transform 200ms var(--ease-bounce),
    box-shadow 200ms var(--ease);
}

.button.primary {
  background: var(--brand-deep);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(226, 103, 31, 0.3);
}

.button.ghost {
  background: transparent;
  color: var(--brand-deep);
}

.button.ghost:hover {
  background: var(--brand-deep);
  color: #fff;
  transform: translateY(-2px);
}

/* ─── Waitlist Form ─── */

.waitlist-band {
  border: 1px solid rgba(15, 153, 131, 0.28);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(15, 153, 131, 0.07), rgba(226, 103, 31, 0.05) 80%);
  padding: 2rem;
  margin: 0.5rem 0 0;
  position: relative;
  overflow: hidden;
}

.waitlist-band::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 40%;
  height: 180%;
  background: radial-gradient(ellipse, var(--signal-glow), transparent 70%);
  pointer-events: none;
}

.waitlist-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.waitlist-band p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 58ch;
}

.waitlist-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 480px;
}

.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition:
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-glow);
}

.waitlist-form button {
  cursor: pointer;
  transition:
    background 200ms var(--ease),
    transform 200ms var(--ease-bounce),
    box-shadow 200ms var(--ease);
}

.waitlist-form button:hover {
  background: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(226, 103, 31, 0.3);
}

.waitlist-success {
  display: none;
  padding: 0.65rem 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  color: var(--signal);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ─── VE Badge ─── */

.ve-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    color 200ms var(--ease),
    border-color 200ms var(--ease),
    background 200ms var(--ease);
}

.ve-badge:hover {
  color: var(--brand-deep);
  border-color: var(--line);
  background: rgba(255, 250, 241, 0.6);
}

.ve-badge .ve-mark {
  color: var(--brand);
  font-weight: 700;
}

/* ─── Footer ─── */

footer {
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  border-top: 1px solid rgba(166, 136, 95, 0.15);
}

footer .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 180ms; }
.reveal:nth-child(4) { transition-delay: 250ms; }

/* Stagger for grid items */
.entry,
.panel,
.card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease),
    box-shadow 360ms var(--ease),
    border-color 300ms var(--ease);
}

.entry.visible,
.panel.visible,
.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Blog Article ─── */

.article {
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: 3.5rem 0;
}

.article h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.94;
  margin-bottom: 0.9rem;
  letter-spacing: -0.015em;
}

.article-meta {
  font-family: "IBM Plex Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.article p,
.article li {
  font-size: 1.08rem;
  line-height: 1.7;
}

.article-hero {
  margin: 0.8rem 0 1.6rem;
}

.article-hero img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.md-figure {
  margin: 1.4rem 0;
}

.md-image {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.md-figure figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: "IBM Plex Sans", sans-serif;
}

.article blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--brand);
  background: rgba(226, 103, 31, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.article blockquote p {
  margin: 0;
}

.callout {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(15, 153, 131, 0.28);
  background: rgba(15, 153, 131, 0.06);
  border-radius: var(--radius-sm);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.6;
}

.article h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(166, 136, 95, 0.15);
}

.article h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ─── Tables ─── */

.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  -webkit-overflow-scrolling: touch;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
}

.article thead {
  border-bottom: 2px solid var(--line);
}

.article th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.article td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(166, 136, 95, 0.15);
  color: var(--ink);
}

.article tbody tr:hover {
  background: rgba(226, 103, 31, 0.04);
}

.article tbody tr:last-child td {
  border-bottom: none;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article li {
  margin-bottom: 0.35rem;
}

.article strong {
  font-weight: 700;
  color: var(--ink);
}

.article code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
  background: rgba(166, 136, 95, 0.12);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.article a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: rgba(165, 61, 0, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms var(--ease);
}

.article a:hover {
  text-decoration-color: var(--brand-deep);
}

/* ─── Responsive ─── */

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3.5rem;
  }

  .panel-grid,
  .playbook-list,
  .blog-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar .shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero h1 {
    line-height: 0.96;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  section {
    padding: 2.5rem 0;
  }

  .cta-band,
  .waitlist-band {
    padding: 1.4rem;
  }

  .article h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    line-height: 0.98;
  }

  .entry {
    padding: 1rem;
  }
}

/* ─── Print ─── */

@media print {
  body::after,
  .topbar,
  .waitlist-band,
  .cta-band {
    display: none !important;
  }

  .reveal,
  .entry,
  .panel,
  .card {
    opacity: 1 !important;
    transform: none !important;
  }
}
