/* ==========================================================================
   mireda.app — v3
   Design tokens are inherited from the Nocturne system; retune them here.
   No build step, no framework, no external JS.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-section: #262a60;
  --color-section-glow: #353b80;

  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-md: 0 0 0 1px var(--color-neutral-700), 0 6px 18px rgba(0, 0, 0, .55);
  --shadow-lg: 0 0 0 1px var(--color-neutral-500), 0 16px 40px rgba(0, 0, 0, .65);

  --nav-h: 64px;
  --gutter: clamp(20px, 5vw, 72px);
  --max-w: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--color-accent) 25%, transparent);
  background:
    radial-gradient(1100px 640px at 78% -140px, color-mix(in srgb, var(--color-accent-900) 85%, transparent), transparent 62%),
    radial-gradient(1000px 700px at -8% 110%, color-mix(in srgb, black 45%, transparent), transparent 58%),
    color-mix(in srgb, var(--color-bg) 62%, black);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
}

p { margin: 0; }

a {
  color: var(--color-accent-300);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover { color: var(--color-accent-200); }

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

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--color-accent-400);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--solid { fill: currentColor; stroke: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--color-accent-800);
  color: var(--color-accent-100);
  font-size: 14px;
  transition: top .2s var(--ease);
}

.skip-link:focus-visible { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section-title {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.012em;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(to right, transparent, var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent);
}

/* --------------------------------------------------------------------------
   4. Buttons and tags
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}

.btn .icon { font-size: 17px; }

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: var(--color-accent-200);
  border-color: var(--color-accent-600);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.btn-ghost {
  color: var(--color-neutral-200);
  border-color: var(--color-neutral-700);
}

@media (hover: hover) {
  .btn-primary:hover {
    color: var(--color-accent-100);
    border-color: var(--color-accent-400);
    background: color-mix(in srgb, var(--color-accent) 20%, transparent);
  }

  .btn-ghost:hover {
    color: var(--color-text);
    border-color: var(--color-neutral-500);
    background: color-mix(in srgb, var(--color-text) 7%, transparent);
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  letter-spacing: .02em;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

.tag-accent {
  background: var(--color-accent-800);
  color: var(--color-accent-100);
}

.tag-outline {
  border: 1px solid var(--color-accent-700);
  color: var(--color-accent-300);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  border-bottom-color: color-mix(in srgb, var(--color-neutral-700) 60%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--nav-h);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-text);
}

.nav-brand:hover { color: var(--color-text); }

.nav-brand .icon {
  font-size: 21px;
  color: var(--color-accent);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--color-accent) 60%, transparent));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:not(.btn) {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-neutral-200);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

@media (hover: hover) {
  .nav-links a:not(.btn):hover {
    color: var(--color-accent-200);
    background: color-mix(in srgb, var(--color-text) 6%, transparent);
  }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.nav-toggle .icon { font-size: 22px; }

.nav-toggle .icon-close,
.nav[data-open="true"] .nav-toggle .icon-menu { display: none; }

.nav[data-open="true"] .nav-toggle .icon-close { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(var(--nav-h) - 4px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--color-neutral-700);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--color-bg) 96%, black);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }

  .nav[data-open="true"] .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-links a:not(.btn) {
    padding: 13px 14px;
    font-size: 15px;
  }

  .nav-links .btn { margin-top: 4px; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 48px clamp(32px, 5vw, 80px);
  padding: clamp(44px, 7vw, 96px) 0 clamp(56px, 7vw, 80px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid var(--color-accent-800);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulseDot 2.2s ease-out infinite;
}

.hero h1 {
  margin: 24px 0 0 -.04em;
  font-size: clamp(38px, 5.6vw, 72px);
  line-height: 1.06;
  letter-spacing: -.018em;
}

.hero h1 span { display: block; }

.hero h1 .grad {
  background: linear-gradient(100deg, var(--color-accent-200), var(--color-accent-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: .08em;
}

.hero-lead {
  max-width: 54ch;
  margin-top: 22px;
  font-size: clamp(15.5px, 1.4vw, 17px);
  line-height: 1.65;
  color: var(--color-neutral-200);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

/* Fleet status panel */
.panel-wrap { position: relative; }

.panel-wrap::before {
  content: "";
  position: absolute;
  inset: -40px -30px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 72%);
  filter: blur(30px);
  animation: glowPulse 5s ease-in-out infinite;
  pointer-events: none;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-neutral-800) 80%, transparent), color-mix(in srgb, var(--color-neutral-900) 60%, transparent));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: floaty 7s ease-in-out infinite;
}

.panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-accent) 8%, transparent), transparent);
  animation: sweep 6s ease-in-out infinite;
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-neutral-800);
}

.panel-head-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-neutral-300);
}

.panel-head-label .icon { font-size: 16px; color: var(--color-accent); }

.panel-head-state {
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.panel-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
}

.panel-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: var(--radius-sm);
}

.panel-row .dot { width: 8px; height: 8px; }

.panel-row-name {
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-row-kind {
  margin-left: 6px;
  font-size: 12.5px;
  color: var(--color-neutral-400);
}

.panel-row-meta {
  font-size: 12px;
  color: var(--color-neutral-300);
  font-variant-numeric: tabular-nums;
}

.panel-foot {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--color-neutral-800);
}

.panel-foot-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-neutral-400);
}

.panel-foot-label b {
  font-weight: 500;
  color: var(--color-accent-300);
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-800);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  width: 99.9%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-accent-700), var(--color-accent-400));
  box-shadow: 0 0 10px color-mix(in srgb, var(--color-accent) 50%, transparent);
  transform-origin: left;
  animation: barGrow 1.6s .5s var(--ease) both;
}

/* --------------------------------------------------------------------------
   7. Stats band
   -------------------------------------------------------------------------- */
.stats {
  background:
    radial-gradient(900px 420px at 85% -40%, color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%),
    var(--color-section);
  padding: clamp(40px, 6vw, 56px) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 28px;
}

.stat-value {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin: 8px 0 0;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 64%, transparent);
}

/* --------------------------------------------------------------------------
   8. Works
   -------------------------------------------------------------------------- */
.works { padding: clamp(56px, 8vw, 84px) 0 0; }

.works-head { margin-bottom: 36px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.work {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--color-accent-900) 40%, transparent), transparent 45%),
    linear-gradient(180deg, var(--color-neutral-800), color-mix(in srgb, var(--color-neutral-900) 75%, black));
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}

.work::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px 200px at 100% 0%, color-mix(in srgb, var(--color-accent) 12%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .28s var(--ease);
  pointer-events: none;
}

@media (hover: hover) {
  .work:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-600);
    box-shadow: 0 8px 40px color-mix(in srgb, var(--color-accent) 18%, transparent), var(--shadow-lg);
  }

  .work:hover::after { opacity: 1; }

  .work:hover .work-cta .icon { transform: translate(2px, -2px); }
}

.work:focus-visible {
  border-color: var(--color-accent-400);
  outline-offset: 4px;
}

.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--color-accent-700);
  border-radius: var(--radius-md);
  color: var(--color-accent-200);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--color-accent) 22%, transparent);
}

.work-icon .icon { font-size: 24px; }

.work-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -.01em;
}

.work-host {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--color-accent-300);
  overflow-wrap: anywhere;
}

.work-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-neutral-200);
}

.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

.work-platforms {
  font-size: 12px;
  color: var(--color-neutral-400);
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-accent-300);
}

.work-cta .icon {
  font-size: 15px;
  transition: transform .28s var(--ease);
}

.work-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 26px;
  border: 1px dashed var(--color-neutral-600);
  border-radius: var(--radius-lg);
  color: var(--color-neutral-300);
}

.work-next h3 {
  font-size: 19px;
  color: var(--color-neutral-200);
}

.work-next p {
  font-size: 13.5px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Principles
   -------------------------------------------------------------------------- */
.principles { padding: clamp(56px, 8vw, 84px) 0 0; }

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin-top: 32px;
}

.principle {
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--color-neutral-700) 70%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-neutral-900) 45%, transparent);
}

.principle .icon {
  font-size: 22px;
  color: var(--color-accent-300);
  margin-bottom: 14px;
}

.principle h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.principle p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-neutral-300);
}

/* --------------------------------------------------------------------------
   10. About
   -------------------------------------------------------------------------- */
.about { padding: clamp(56px, 8vw, 84px) 0 0; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px clamp(32px, 5vw, 80px);
  margin-top: clamp(36px, 5vw, 56px);
}

.about-body p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--color-neutral-200);
}

.about-body p + p { margin-top: 16px; }

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   11. Contact band
   -------------------------------------------------------------------------- */
.contact { padding: clamp(64px, 9vw, 100px) 0 clamp(40px, 6vw, 64px); }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--color-accent-800);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 300px at 100% 0%, color-mix(in srgb, var(--color-accent-900) 80%, transparent), transparent 70%),
    color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
}

.contact-card h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 10px;
}

.contact-card p {
  max-width: 46ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-neutral-300);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.footer { padding: 0 0 48px; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 28px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-note .icon { font-size: 16px; color: var(--color-accent-300); }

/* --------------------------------------------------------------------------
   13. Reveal on scroll
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

/* --------------------------------------------------------------------------
   14. Keyframes
   -------------------------------------------------------------------------- */
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 50%, transparent); }
  60% { box-shadow: 0 0 0 7px transparent; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes sweep {
  0% { top: -20%; opacity: 0; }
  12% { opacity: 1; }
  55% { top: 110%; opacity: 0; }
  100% { top: 110%; opacity: 0; }
}

@keyframes glowPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .panel-wrap { max-width: 520px; width: 100%; }
  .panel { animation: none; }
  .panel-wrap::before { inset: -24px -16px; }
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { margin-left: 0; }
  .work { padding: 22px; }
  .contact-card { flex-direction: column; align-items: flex-start; }
  .contact-card .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .about-links .btn { flex: 1 1 auto; }

  /* Roomier hit area for the one small link left on the page. */
  .footer-inner a { display: inline-block; padding: 6px 0; }
}

/* Below this the app name would ellipsis-clip, and the name matters more
   than the category label sitting next to it. */
@media (max-width: 380px) {
  .panel-row-kind { display: none; }
}

/* Short landscape phones: give the fixed background a rest */
@media (max-height: 520px) and (orientation: landscape) {
  body { background-attachment: scroll; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .panel-wrap, .contact { display: none; }
}
