/* GoML — "Wild" theme fork. Design test inspired by animalhub.earth's
   editorial layout language: condensed display headings, serif body,
   gradient blob shapes, pill buttons, and lively hover states.
   Same brand constraint as the primary theme: black, white, #ed7d31 only. */

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/caveat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-black: #0a0a0a;
  --color-white: #ffffff;
  --color-orange: #ed7d31;
  --color-orange-dark: #c9631d;
  --color-orange-tint: #fdf2ea;
  --color-gray-100: #f5f5f5;
  --color-gray-300: #d9d9d9;
  --color-gray-600: #5c5c5c;
  --font-display: "Caveat", cursive;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-handwritten: "Caveat", cursive;
  --max-width: 1120px;
  --space-section: clamp(48px, 8vw, 96px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.6;
  font-size: 18px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-black);
}

::selection {
  background: var(--color-orange);
  color: var(--color-white);
}

/* Headings — taken as-is from the main theme's typography system */

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700; /* must stay >= 600 per brand rule */
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500; /* must stay lower than h1's weight */
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2em;
}

/* Keyphrase / keyword highlight — orange, used inside h1/h2 */
.accent {
  color: var(--color-orange);
}

/* Handwritten treatment for a single word inside h1 */
.script {
  font-family: var(--font-handwritten);
  font-weight: 600;
  color: var(--color-orange);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-600);
  margin-bottom: 0.75em;
}

p {
  margin: 0 0 1.2em;
  max-width: 68ch;
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.5em;
  max-width: 68ch;
}

li:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--color-gray-100);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  background: var(--color-gray-100);
  border-left: 4px solid var(--color-orange);
  border-radius: 0 8px 8px 0;
}

blockquote p {
  font-size: 1.15rem;
  font-style: italic;
  margin-bottom: 0.5em;
  max-width: none;
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-gray-600);
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-gray-300);
  max-width: none;
}

th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--color-gray-600);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--color-gray-300);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-black);
}

.site-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

@media (max-width: 480px) {
  .site-nav {
    gap: 16px;
  }
}

.site-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 3px;
}

/* CSS-only underline-grow hover effect */
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-orange);
  transition: right 0.25s var(--ease);
}

.site-nav a:not(.btn):hover::after {
  right: 0;
}

/* Buttons / CTAs — pill-shaped, lift + gradient shift on hover */

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.3s var(--ease);
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 2px 0 rgba(10, 10, 10, 0.08);
}

.btn-primary:hover {
  background: linear-gradient(100deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(237, 125, 49, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(237, 125, 49, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-black);
  border: 1.5px solid var(--color-gray-300);
}

.btn-secondary:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
  transform: translateY(-2px);
}

/* Main content — full-width section bands, .container constrains content */

main {
  padding: 0;
  overflow-x: clip;
}

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.section-tint {
  background: var(--color-orange-tint);
}

/* Hero */

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-layout {
    grid-template-columns: 1.2fr 1fr;
  }
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-gray-600);
}

.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

/* Gradient blob — decorative shape behind the hero illustration */
.blob {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(420px, 90%);
  aspect-ratio: 1;
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
  background: linear-gradient(135deg, var(--color-orange-tint) 0%, #ffffff 100%);
  animation: blob-float 8s var(--ease) infinite alternate;
  z-index: 0;
}

@keyframes blob-float {
  from { border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%; transform: rotate(0deg); }
  to   { border-radius: 58% 42% 35% 65% / 55% 60% 40% 45%; transform: rotate(6deg); }
}

.hero-figure svg {
  position: relative;
  z-index: 1;
  width: 62%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* Post hero — blog / case study top band. Heading + pencil graphic,
   targeted at ~20% of viewport height. min-height (not fixed) so it
   can grow on short viewports instead of clipping the heading. */

.post-hero {
  min-height: 20vh;
  display: flex;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.post-hero .container {
  width: 100%;
}

.post-hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 700px) {
  .post-hero-layout {
    grid-template-columns: 1.5fr 1fr;
  }
}

.post-hero-text .eyebrow {
  margin-bottom: 0.4em;
}

/* Scaled down from the homepage hero H1 to fit the ~20vh budget;
   weight, color, letter-spacing, and .accent/.script still inherit
   from the shared h1 rule — only size changes. */
.post-hero-text h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  margin-bottom: 0;
}

.post-hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Matches the blob's max width so the absolutely-positioned blob is
     fully contained and never overflows into the heading above it. */
  min-height: 180px;
}

.post-hero-figure .blob {
  width: min(180px, 80%);
}

.post-hero-figure svg {
  position: relative;
  z-index: 1;
  width: 72%;
  max-width: 150px;
  height: auto;
}

/* Extra breathing room once the figure stacks below the heading on mobile */
@media (max-width: 699px) {
  .post-hero-figure {
    margin-top: 12px;
  }
}

.lede {
  font-size: 1.15rem;
  color: var(--color-gray-600);
  max-width: 68ch;
}

.tldr {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  border-left: 3px solid var(--color-orange);
  padding: 4px 0 4px 20px;
  margin-bottom: 2em;
  max-width: 68ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 1.5em;
}

/* Logo reel — customer wordmarks, muted until hovered */

.logo-reel-section .container {
  text-align: center;
}

.logo-reel-section h2 {
  margin-bottom: 0.3em;
}

.logo-reel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 2em;
}

.logo-reel img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.25s var(--ease), opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.logo-reel img:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-3px);
}

/* Stat strip — big Anton numerals + caption, reusing real figures from copy */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
  margin-top: 2em;
}

.stat {
  border-top: 3px solid var(--color-orange);
  padding-top: 12px;
}

.stat-number {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3rem);
  color: var(--color-orange);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  display: block;
  margin-top: 6px;
}

/* Feature grid — highlighted components, lift-on-hover cards */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 24px;
  margin-top: 1.5em;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--color-white);
  border-top: 4px solid var(--color-orange);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(10, 10, 10, 0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(10, 10, 10, 0.1);
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.feature-card p {
  margin-bottom: 0;
}

/* Card grid — case studies, lift-on-hover */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 24px;
  margin-top: 1.5em;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-gray-100);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  background: var(--color-orange-tint);
}

.card p,
.card li {
  margin-bottom: 0;
}

.card strong {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-orange);
  display: block;
  margin-bottom: 4px;
}

/* Numbered system grid — checker pattern, scale-in on hover */

.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 1.5em;
  padding: 0;
  list-style: none;
}

.system-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.system-card:nth-child(even) {
  background: var(--color-orange-tint);
  border-color: transparent;
}

.system-card:hover {
  transform: scale(1.03);
  border-color: var(--color-orange);
}

.system-index {
  font-family: var(--font-body);
  font-weight: 800;
  color: var(--color-orange);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.system-label {
  max-width: none;
}

/* Numbered stages (engagement process) */

.stage-list {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
  display: grid;
  gap: 24px;
}

.stage {
  border-top: 1px solid var(--color-gray-300);
  padding-top: 24px;
}

.stage h3 {
  margin-top: 0;
}

/* Tag / pill list — industry coverage, short enumerations */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 1.5em 0 0;
  list-style: none;
}

.tag-list li {
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: 999px;
  padding: 8px 20px;
  margin: 0;
  font-size: 0.95rem;
  max-width: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.tag-list li:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Tag grid — fixed columns so short tag lists sit in explicit rows
   instead of flex-wrapping into a single line on wide screens. */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 12px;
}

@media (max-width: 700px) {
  .tag-grid {
    grid-template-columns: repeat(2, max-content);
  }
}

@media (max-width: 420px) {
  .tag-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer — dark, multi-column */

.site-footer {
  background: var(--color-black);
  padding-top: var(--space-section);
  padding-bottom: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

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

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

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-logo img {
  width: 140px;
  height: auto;
  display: block;
}

.footer-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  max-width: 42ch;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-social a:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
}

.footer-heading {
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-col a:hover {
  color: var(--color-orange);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--color-orange);
}

/* Contact popup */

.contact-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(480px, 90vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.contact-dialog::backdrop {
  background: rgba(10, 10, 10, 0.6);
}

.contact-dialog-inner {
  padding: 32px;
  position: relative;
}

.contact-dialog h2 {
  margin-top: 0;
  margin-bottom: 0.4em;
}

.contact-dialog-sub {
  font-size: 0.95rem;
  color: var(--color-gray-600);
  margin-bottom: 1.4em;
  max-width: none;
}

.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-black);
  transition: transform 0.2s var(--ease);
}

.contact-close:hover {
  transform: rotate(90deg);
  color: var(--color-orange);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-black);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-form select {
  cursor: pointer;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px var(--color-orange-tint);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form input[aria-invalid="true"] {
  border-color: #c0392b;
}

.field-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin: 4px 0 0;
  max-width: none;
}

.contact-form .honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}

.contact-form-status[data-state="error"] {
  color: #c0392b;
}

.contact-form-status[data-state="success"] {
  color: #1e7d32;
}

/* Resource grid — case study / blog cards on the Resources landing page */

.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 1.5em;
}

@media (min-width: 640px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.resource-card {
  display: block;
  text-decoration: none;
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(10, 10, 10, 0.1);
  border-color: var(--color-orange);
}

.resource-card-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background: var(--color-gray-100);
  overflow: hidden;
  transition: background 0.25s var(--ease);
}

.resource-card:hover .resource-card-figure {
  background: var(--color-orange-tint);
}

.resource-card-figure .blob {
  width: min(140px, 70%);
}

.resource-card-figure svg {
  position: relative;
  z-index: 1;
  width: 64%;
  max-width: 72px;
  height: auto;
  transition: transform 0.3s var(--ease);
}

.resource-card:hover .resource-card-figure svg {
  transform: scale(1.1) rotate(-3deg);
}

.resource-card-body {
  padding: 20px 24px 24px;
}

.resource-card-body h3 {
  margin: 0 0 0.4em;
  font-size: 1.15rem;
  transition: color 0.2s var(--ease);
}

.resource-card:hover .resource-card-body h3 {
  color: var(--color-orange);
}

.resource-card-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-gray-600);
  max-width: none;
}

.resource-card-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-orange);
  margin-bottom: 0.5em;
}

/* Utility */

.stub-notice {
  background: var(--color-gray-100);
  border: 1px dashed var(--color-gray-300);
  padding: 24px;
  border-radius: 8px;
  color: var(--color-gray-600);
}
