/*
Theme Name: Eric Dybala
Theme URI: https://ericdybala.com
Author: Eric Dybala
Description: Personal site and portfolio for Eric Dybala. Brand system v2.1: graphite/amber identity, cyan/green function colors, IBM Plex Sans/Mono. Dark mode default with manual toggle.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: eric-dybala
*/

/* ---------- Brand tokens ---------- */
:root {
  --color-graphite: #1A1816;
  --color-amber: #D97706;

  /* dark mode (default) */
  --bg: #121110;
  --surface: #1A1816;
  --text-primary: #ECE8E3;
  --text-secondary: #A39E97;
  --text-tertiary: #6B655D;
  --cyan: #22D3EE;
  --green: #4ADE80;
  --border: #2A2724;

  /* Not part of the brand identity/function palette. Validation states need
     a signal color the brand doc doesn't define; kept out of :root's
     light-mode override below since it reads fine on both backgrounds. */
  --error: #DC2626;
}

html[data-theme="light"] {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --text-primary: #1A1816;
  --text-secondary: #5C564E;
  --text-tertiary: #9A938A;
  --cyan: #0E7490;
  --green: #16A34A;
  --border: #E5E1DA;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

img { max-width: 100%; height: auto; }

.project-featured-image {
  margin: 24px 0;
}

.project-featured-image img {
  width: 100%;
  height: auto;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: "IBM Plex Sans", -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 5vw, 2.25rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-secondary); }

a { color: var(--color-amber); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, .mono, .tag, .stat, time, label {
  font-family: "IBM Plex Mono", monospace;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .container { padding: 0 32px; }
}

/* ---------- Header (mobile-first: stacked, wraps to a row at desktop) ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 0;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 0;
}

.site-title a { color: inherit; text-decoration: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The inline nav list is desktop-only. On mobile the same links render
   again inside the #ed-nav-mobile slide-out panel instead. */
.primary-nav__menu {
  display: none;
  list-style: none;
}

.primary-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.primary-nav a:hover,
.primary-nav a.current-menu-item-link { color: var(--text-primary); text-decoration: none; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-tertiary); }

/* Party mode trigger — hidden at rest (opacity, not display, so it stays
   tappable/discoverable), revealed once active. Found via the Konami code
   or a deliberate click. */
.party-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.party-trigger.is-active { opacity: 1; }

/* ---- Hamburger (mobile-only) ---- */
.ed-nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
  cursor: pointer;
}

.ed-hamburger__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ed-nav__hamburger[aria-expanded="true"] .ed-hamburger__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ed-nav__hamburger[aria-expanded="true"] .ed-hamburger__bar:nth-child(2) { opacity: 0; }
.ed-nav__hamburger[aria-expanded="true"] .ed-hamburger__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Mobile slide-out nav panel ---- */
.ed-nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 24px;
  z-index: 30;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.ed-nav-mobile.is-open { transform: translateX(0); }

.ed-nav-mobile__menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.ed-nav-mobile__menu a {
  color: var(--text-primary);
  font-size: 1.1rem;
}
.ed-nav-mobile__menu a:hover { color: var(--color-amber); text-decoration: none; }

.ed-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 29;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ed-nav-overlay.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ed-nav-mobile, .ed-nav-overlay, .ed-hamburger__bar { transition: none; }
}

@media (min-width: 641px) {
  .site-header .container { flex-wrap: nowrap; padding-top: 20px; padding-bottom: 20px; }
  .site-title { font-size: 1rem; }
  .primary-nav__menu { display: flex; gap: 28px; margin: 0; padding: 0; }
  .theme-toggle { font-size: 0.8rem; padding: 6px 10px; margin-left: 24px; }
  .party-trigger:hover { opacity: 0.25; }
  .ed-nav__hamburger,
  .ed-nav-mobile,
  .ed-nav-overlay { display: none; }
}

/* ---------- Hero (mobile-first) ---------- */
.hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  color: var(--color-amber);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: block;
}

.hero p.lede {
  font-size: 1.05rem;
  max-width: 620px;
}

@media (min-width: 641px) {
  .hero { padding: 96px 0 64px; }
  .hero .eyebrow { font-size: 0.85rem; margin-bottom: 16px; }
  .hero p.lede { font-size: 1.15rem; }
}

/* ---- Hero portrait ---- */
.hero__portrait {
  display: none;
}

.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

@media (min-width: 900px) {
  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 64px;
    align-items: center;
  }

  .hero__portrait {
    display: block;
  }
}

/* ---- Status pill (e.g. "Open to Work") ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ---- Hero role line (beneath the h1, not above it) ---- */
.hero-role {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}

/* ---- Buttons ---- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--color-amber);
  color: #FFFFFF;
  border: 1px solid var(--color-amber);
}
.btn--primary:hover,
.btn--primary:focus-visible { background: #B85F05; border-color: #B85F05; }

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover,
.btn--secondary:focus-visible { border-color: var(--color-amber); color: var(--color-amber); }

.btn--small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ---- Homepage stat row ---- */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
}

.stat-tile {
  background: var(--surface);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.stat-tile__number {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-amber);
  line-height: 1;
}

.stat-tile__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (min-width: 641px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-tile { padding: 32px 28px; }
  .stat-tile__number { font-size: 2.25rem; }
}

/* ---- Platform logo strip (infinite scroll, pauses on hover/focus) ----
   Logos are each platform's own official brand asset, shown at native
   colors on a single solid background, never recolored or redrawn.
   The "Experienced In" label exists specifically so this section reads
   as a skills list, not a partnership/endorsement claim. */
.platform-strip {
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.platform-strip__label {
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 20px;
}

.platform-strip__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: platform-scroll 28s linear infinite;
}

.platform-strip:hover .platform-strip__track,
.platform-strip:focus-within .platform-strip__track {
  animation-play-state: paused;
}

.platform-strip__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 36px;
}

.platform-strip__item a {
  display: flex;
  align-items: center;
}

.platform-strip__item img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 140px;
}

.platform-strip__text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  white-space: nowrap;
}

.platform-strip__item a:hover .platform-strip__text,
.platform-strip__item a:focus-visible .platform-strip__text {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.platform-strip__logo--dark { display: none; }

html[data-theme="dark"] .platform-strip__logo--light { display: none; }
html[data-theme="dark"] .platform-strip__logo--dark { display: block; }

@keyframes platform-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (min-width: 641px) {
  .platform-strip { padding: 36px 0; }
  .platform-strip__item { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .platform-strip__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}

/* ---------- Sections (mobile-first) ---------- */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

@media (min-width: 641px) {
  .section { padding: 64px 0; }
  .section-label { font-size: 0.8rem; margin-bottom: 24px; }
}

/* ---------- Cards / project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}

.card h3 { margin-bottom: 8px; }
.card .card-meta {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin-bottom: 12px;
  display: block;
}

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
  .card { padding: 24px; }
}

/* ---------- Project showcase (archive-project.php) ---------- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  margin: -20px -20px 16px;
  background: var(--bg);
}

.project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card h3 { margin-bottom: 6px; }
.project-card h3 a { color: var(--text-primary); }
.project-card h3 a:hover,
.project-card h3 a:focus-visible { color: var(--color-amber); text-decoration: none; }

.project-card__eyebrow {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.project-card p { flex: 1; }

.project-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

@media (min-width: 560px) {
  .project-card__media { margin: -24px -24px 20px; }
}

/* ---------- Brand components ---------- */
.callout {
  border-left: 3px solid var(--color-amber);
  padding: 12px 20px;
  margin: 24px 0;
  background: transparent;
}
.callout.analysis { border-left-color: var(--cyan); }

.callout .callout-label {
  font-weight: 600;
  color: var(--text-primary);
}

.growth-tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: lowercase;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 3px 12px;
  margin: 4px 4px 4px 0;
}

/* ---------- Forms (Contact Form 7) ---------- */
.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
}

.wpcf7 form p { margin: 0; color: inherit; }

.wpcf7-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 480px) {
  .wpcf7-row { grid-template-columns: 1fr 1fr; }
}

.wpcf7 label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.wpcf7-form-control {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form-control::placeholder { color: var(--text-tertiary); }

textarea.wpcf7-form-control { min-height: 140px; resize: vertical; }

.wpcf7-form-control:hover { border-color: var(--text-tertiary); }

.wpcf7-form-control:focus-visible {
  outline: none;
  border-color: var(--color-amber);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

.wpcf7-submit {
  align-self: flex-start;
  background: var(--color-amber);
  border: none;
  border-radius: 4px;
  color: #FFFFFF;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.wpcf7-submit:hover { background: #B85F05; }
.wpcf7-submit:focus-visible { outline: 2px solid var(--color-amber); outline-offset: 2px; }
.wpcf7-submit[disabled] { opacity: 0.6; cursor: default; }

.wpcf7-spinner { margin-left: 12px; }

.wpcf7-not-valid-tip {
  display: block;
  color: var(--error);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  margin-top: 6px;
}

.wpcf7-form-control.wpcf7-not-valid { border-color: var(--error); }

.wpcf7-response-output {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 12px 20px;
  font-size: 0.9rem;
  margin: 0 0 20px;
  max-width: 560px;
}

form.wpcf7-form.sent .wpcf7-response-output {
  border-left-color: var(--color-amber);
  color: var(--text-primary);
}

form.wpcf7-form.invalid .wpcf7-response-output,
form.wpcf7-form.unaccepted .wpcf7-response-output,
form.wpcf7-form.payment-required .wpcf7-response-output,
form.wpcf7-form.spam .wpcf7-response-output,
form.wpcf7-form.aborted .wpcf7-response-output {
  border-left-color: var(--error);
  color: var(--error);
}

@media (min-width: 641px) {
  .wpcf7 form { gap: 24px; }
}

/* ---------- Weather map (About page) ---------- */
.weather-map {
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.weather-map__note {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 12px;
  margin-bottom: 0;
}

.weather-map .leaflet-control-layers {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.85rem;
  box-shadow: none;
}

.weather-map .leaflet-control-layers-toggle {
  filter: invert(0.85);
}

.weather-map .leaflet-bar a {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.weather-map .leaflet-bar a:hover {
  background: var(--bg);
  color: var(--color-amber);
}

.weather-map .leaflet-control-attribution {
  background: var(--surface);
  color: var(--text-tertiary);
}

.weather-map .leaflet-control-attribution a {
  color: var(--text-secondary);
}

.weather-readout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
}

.weather-readout__temp {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-amber);
}

.weather-readout__wind,
.weather-readout__loading {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (min-width: 641px) {
  .weather-map { height: 440px; }
}

/* ---------- Project toolbar (single project page, below featured image) ---------- */
.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.project-toolbar__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 200px;
}

.project-toolbar__icon {
  display: flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-amber);
  margin-top: 2px;
}

.project-toolbar__icon svg { display: block; width: 100%; height: 100%; }

.project-toolbar__label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.project-toolbar__value {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Device preview (single project page) ----------
   CSS-only laptop/phone bezels around uploaded screenshots, no custom
   graphic work needed: upload a desktop and mobile screenshot, this
   frames them. */
.device-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px;
  margin: 32px 0;
}

.device-frame__screen {
  display: block;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
}

.device-frame__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.device-frame--desktop {
  flex: 1 1 480px;
  max-width: 640px;
}

.device-frame--desktop .device-frame__screen {
  aspect-ratio: 16 / 10;
  border: 10px solid var(--surface);
  border-bottom-width: 26px;
  border-radius: 8px;
}

.device-frame--mobile {
  flex: 0 0 180px;
  max-width: 220px;
}

.device-frame--mobile .device-frame__screen {
  aspect-ratio: 9 / 19.5;
  border: 8px solid var(--surface);
  border-radius: 22px;
}

@media (max-width: 640px) {
  .device-preview { flex-direction: column; align-items: center; }
}

/* ---------- Brand snapshot (single project page) ----------
   An on-page "at a glance" summary of the client's own brand: tagline,
   colors, type, voice. Not a PDF embed, just a condensed equivalent. */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  margin: 24px 0;
}

@media (min-width: 900px) {
  .project-detail-grid { grid-template-columns: 1fr 1fr; }
}

.brand-snapshot {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 24px;
  margin: 0;
}

.brand-snapshot__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

.brand-snapshot__tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.brand-snapshot__colors {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.brand-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.brand-swatch__chip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: block;
}

.brand-swatch__name {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.brand-swatch__hex {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.brand-snapshot__type {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.brand-snapshot__type-label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-snapshot__type-name {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
}

.brand-snapshot__type-sublabel {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-snapshot__tag-group {
  margin-bottom: 16px;
}

.brand-snapshot__tag-group .brand-snapshot__type-label {
  display: block;
  margin-bottom: 8px;
}

.brand-snapshot__voice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-voice-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: lowercase;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.contact-grid__info {
  display: flex;
  flex-direction: column;
}

.contact-grid__info h2 { margin-bottom: 12px; }

.contact-grid__form .wpcf7 form {
  max-width: none;
}

.info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
  flex: 1;
}

.info-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
}

.info-card__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}

.info-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; }
  .info-cards { grid-template-columns: 1fr 1fr; }
}

/* ---- CTA band (pricing next-step) ---- */
.cta-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.cta-band__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cta-band__eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.cta-band h2 { margin-bottom: 8px; }

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 768px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .cta-band__actions { flex-shrink: 0; }
}

/* ---- FAQ accordion (native <details>, no JS) ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  background: var(--surface);
}

.faq-item__question {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

.faq-item__question::-webkit-details-marker { display: none; }

.faq-item__question::before {
  content: "+";
  display: inline-block;
  width: 1em;
  color: var(--color-amber);
  font-family: "IBM Plex Mono", monospace;
}

.faq-item[open] .faq-item__question::before { content: "\2212"; }

.faq-item__answer {
  margin: 12px 0 0;
  color: var(--text-secondary);
}

/* ---------- QR code generator ---------- */
.qr-tool {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.qr-tool__controls p { margin: 0 0 16px; }

.qr-tool__controls label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.qr-tool__controls input[type="text"],
.qr-tool__controls select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  padding: 10px 12px;
}

.qr-tool__controls input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 4px;
}

.qr-tool__controls input[type="file"] {
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.qr-tool__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.qr-tool__checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-tool__checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-transform: none;
  font-size: 0.9rem;
  margin: 0;
}

.qr-tool__preview {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#ed-qr-canvas {
  width: 100%;
  max-width: 420px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

@media (min-width: 900px) {
  .qr-tool { grid-template-columns: 380px 1fr; }
  #ed-qr-canvas { max-width: 480px; }
}

/* ---------- 404 ---------- */
.error-404 {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.error-404 .eyebrow { display: block; text-align: center; }

.error-404__code {
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 600;
  color: var(--color-amber);
  line-height: 1;
  margin: 0 0 8px;
}

.error-404 h1 { margin-bottom: 12px; }

.error-404 .lede {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.error-404__search {
  max-width: 420px;
  margin: 28px auto;
}

.error-404__search .search-form {
  display: flex;
  gap: 10px;
}

.error-404__search .search-field {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  padding: 10px 14px;
}

.error-404__search .search-submit {
  background: var(--color-amber);
  border: 1px solid var(--color-amber);
  border-radius: 4px;
  color: #FFFFFF;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
}

.error-404 .hero-actions { justify-content: center; }

/* ---------- Footer (mobile-first: stacked, becomes a row at desktop) ---------- */
.site-footer {
  padding: 32px 0;
  color: var(--text-tertiary);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.site-footer__name {
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 4px;
}

.site-footer__tagline { margin: 0; color: var(--text-tertiary); }

.site-footer__menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
}

.site-footer a { color: var(--text-tertiary); }
.site-footer a:hover { color: var(--text-primary); }

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 20px;
}

.site-footer__bottom p { margin: 0; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.site-footer__legal span { color: var(--text-tertiary); }

@media (min-width: 641px) {
  .site-footer { padding: 40px 0; }
  .site-footer__grid { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
}

/* ---- Dice roll easter egg ---- */
.ed-dice-trigger {
  display: inline-flex;
  width: 24px;
  height: 24px;
  padding: 2px;
  background: transparent;
  border: 0;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
}

.ed-dice-trigger svg { display: block; width: 100%; height: 100%; }

.ed-dice-trigger:hover,
.ed-dice-trigger:focus-visible { color: var(--color-amber); }

.ed-dice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: none;
  pointer-events: none;
}
.ed-dice-overlay canvas { display: block; width: 100%; height: 100%; }
.ed-dice-overlay.is-active { display: block; }

.ed-dice-result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 9991;
  pointer-events: none;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: clamp(1.75rem, 8vw, 3rem);
  letter-spacing: 0.02em;
  color: var(--color-amber);
  background: var(--surface);
  border: 2px solid var(--color-amber);
  border-radius: 6px;
  padding: 0.4em 0.7em;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.ed-dice-result.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- Party mode easter egg ----
   Triggered by clicking .party-trigger or the Konami code
   (↑ ↑ ↓ ↓ ← → ← → B A). Body gets class .party-mode and the
   nav/header cycle through a full rainbow hue rotation — this is
   the one place on the site the locked brand palette is deliberately
   suspended, since it's a temporary, dismissible novelty state. */
@keyframes party-hue {
  0%   { filter: hue-rotate(0deg)   saturate(3) brightness(1.2); }
  14%  { filter: hue-rotate(51deg)  saturate(3) brightness(1.2); }
  28%  { filter: hue-rotate(103deg) saturate(3) brightness(1.2); }
  42%  { filter: hue-rotate(154deg) saturate(3) brightness(1.2); }
  57%  { filter: hue-rotate(205deg) saturate(3) brightness(1.2); }
  71%  { filter: hue-rotate(257deg) saturate(3) brightness(1.2); }
  85%  { filter: hue-rotate(308deg) saturate(3) brightness(1.2); }
  100% { filter: hue-rotate(360deg) saturate(3) brightness(1.2); }
}

@keyframes party-border {
  0%   { border-bottom-color: hsl(0,   100%, 55%); }
  16%  { border-bottom-color: hsl(60,  100%, 55%); }
  33%  { border-bottom-color: hsl(120, 100%, 45%); }
  50%  { border-bottom-color: hsl(180, 100%, 45%); }
  66%  { border-bottom-color: hsl(240, 100%, 65%); }
  83%  { border-bottom-color: hsl(300, 100%, 55%); }
  100% { border-bottom-color: hsl(360, 100%, 55%); }
}

body.party-mode .primary-nav__menu a,
body.party-mode .ed-nav-mobile__menu a {
  animation: party-hue 1.2s linear infinite;
  text-shadow: 0 0 8px currentColor;
}

body.party-mode .primary-nav__menu > li:nth-child(1) a,
body.party-mode .ed-nav-mobile__menu > li:nth-child(1) a { animation-delay: 0s; }
body.party-mode .primary-nav__menu > li:nth-child(2) a,
body.party-mode .ed-nav-mobile__menu > li:nth-child(2) a { animation-delay: 0.15s; }
body.party-mode .primary-nav__menu > li:nth-child(3) a,
body.party-mode .ed-nav-mobile__menu > li:nth-child(3) a { animation-delay: 0.3s; }
body.party-mode .primary-nav__menu > li:nth-child(4) a,
body.party-mode .ed-nav-mobile__menu > li:nth-child(4) a { animation-delay: 0.45s; }
body.party-mode .primary-nav__menu > li:nth-child(5) a,
body.party-mode .ed-nav-mobile__menu > li:nth-child(5) a { animation-delay: 0.6s; }

body.party-mode .site-header {
  animation: party-border 1.2s linear infinite;
}

body.party-mode .party-trigger {
  opacity: 1;
  animation: party-hue 1.2s linear infinite;
}

/* Every button and CTA joins the party — current ones and any added later
   (native buttons, .btn/.cta utility classes, Gutenberg button blocks,
   form submit/button inputs). The light/dark toggle is excluded on purpose:
   it's a stable utility control, not a decorative element, so it should
   stay legible and predictable even while party mode is active. */
body.party-mode button:not(.theme-toggle),
body.party-mode .btn,
body.party-mode .cta,
body.party-mode .wp-block-button__link,
body.party-mode input[type="submit"],
body.party-mode input[type="button"] {
  animation: party-hue 1.2s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  body.party-mode .primary-nav__menu a,
  body.party-mode .ed-nav-mobile__menu a,
  body.party-mode .site-header,
  body.party-mode .party-trigger,
  body.party-mode button:not(.theme-toggle),
  body.party-mode .btn,
  body.party-mode .cta,
  body.party-mode .wp-block-button__link,
  body.party-mode input[type="submit"],
  body.party-mode input[type="button"] {
    animation: none;
    filter: none;
  }
}
