/* ==========================================================================
   Mobah — styles
   1. Design tokens
   2. Base / reset
   3. Utilities
   4. Buttons, chips, tags
   5. Header / nav
   6. Hero (+ phone mockup)
   7. Sections & cards
   8. Services
   9. Work / portfolio
   10. Contact band & footer
   11. Reveal-on-scroll
   12. Responsive
   13. Reduced motion
   14. Print
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */
:root {
  /* Colors */
  --color-bg: #0a0a12;
  --color-bg-alt: #0e0e19;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-strong: rgba(255, 255, 255, 0.07);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-text: #f4f4f8;
  --color-text-muted: #a8a8bd;     /* ~8:1 on bg */
  --color-text-subtle: #8c8ca3;    /* ~5.9:1 on bg */
  --color-violet: #8b5cf6;
  --color-blue: #3b82f6;
  --color-cyan: #06b6d4;
  --color-violet-soft: #c4b5fd;
  --color-cyan-soft: #67e8f9;
  --color-white: #ffffff;
  --color-header-bg: rgba(10, 10, 18, 0.6);
  --color-header-bg-scrolled: rgba(10, 10, 18, 0.82);
  --color-focus: #67e8f9;
  --color-phone-frame: #16161f;
  --color-phone-screen: #0f0f1a;
  --color-shadow: rgba(0, 0, 0, 0.45);
  --color-glow-violet: rgba(139, 92, 246, 0.35);
  --color-glow-blue: rgba(59, 130, 246, 0.3);
  --color-glow-cyan: rgba(6, 182, 212, 0.28);

  /* Gradients */
  --gradient-brand: linear-gradient(120deg, var(--color-violet) 0%, var(--color-blue) 50%, var(--color-cyan) 100%);
  /* Darker stops so white button text meets WCAG AA (>= 4.5:1) */
  --gradient-button: linear-gradient(120deg, #7c3aed 0%, #2563eb 55%, #0e7490 100%);
  --gradient-text: linear-gradient(100deg, #a78bfa 0%, #60a5fa 50%, #22d3ee 100%);
  --gradient-icon-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.18));

  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 4.4vw, 4.5rem);
  --lh-tight: 1.08;
  --lh-base: 1.6;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --container-max: 1200px;
  --container-pad: 16px;
  --nav-height: 68px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-phone: 40px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-card: 0 20px 40px -20px var(--color-shadow);
  --shadow-glow: 0 18px 50px -18px var(--color-glow-violet), 0 10px 40px -20px var(--color-glow-cyan);
  --blur-glass: 14px;
  --transition-fast: 160ms ease;
  --transition-base: 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --reveal-distance: 24px;
  --reveal-duration: 700ms;
}

/* 2. Base / reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* fallback for browsers without overflow: clip */
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

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

button {
  font: inherit;
  color: inherit;
}

svg { display: block; }

[hidden] { display: none !important; }

section[id],
footer[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--space-4));
}

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

/* #main is focusable (tabindex="-1") only as the skip-link target */
#main:focus,
#main:focus-visible {
  outline: none;
}

/* 3. Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-white);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: none;
}

.gradient-text {
  color: var(--color-violet-soft); /* fallback when background-clip: text is unsupported */
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* 4. Buttons, chips, tags
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn--sm {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
}

.btn--primary {
  background: var(--gradient-button);
  color: var(--color-white);
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px -18px var(--color-glow-violet), 0 12px 46px -18px var(--color-glow-cyan);
}

.btn--ghost {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn--ghost:hover {
  background: var(--color-surface-strong);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.chip {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.chip:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.3);
}

.chip[aria-pressed="true"] {
  background: var(--gradient-button);
  border-color: transparent;
  color: var(--color-white);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tags li {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
}

/* 5. Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header-bg);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(140%);
  backdrop-filter: blur(var(--blur-glass)) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  background: var(--color-header-bg-scrolled);
  border-bottom-color: var(--color-border);
  box-shadow: 0 10px 30px -18px var(--color-shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__links {
  display: flex;
  gap: var(--space-5);
}

.nav__links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.nav__links a:hover {
  color: var(--color-text);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8) var(--space-8);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.hero__glow--violet {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -140px;
  background: var(--color-glow-violet);
}

.hero__glow--cyan {
  width: 480px;
  height: 480px;
  top: 80px;
  right: -160px;
  background: radial-gradient(circle, var(--color-glow-cyan), var(--color-glow-blue) 60%, transparent 75%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: var(--space-7);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px var(--color-cyan);
}

.hero__title {
  margin-top: var(--space-5);
  font-size: var(--fs-h1);
  font-weight: 700;
}

.hero__sub {
  margin-top: var(--space-5);
  max-width: 34rem;
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* Phone mockup */
.hero__visual {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 9 / 19;
  padding: 12px;
  border-radius: var(--radius-phone);
  background: var(--color-phone-frame);
  border: 1px solid var(--color-border-strong);
  box-shadow:
    0 40px 80px -30px var(--color-shadow),
    0 0 0 6px rgba(255, 255, 255, 0.03),
    0 30px 90px -30px var(--color-glow-violet);
  animation: float 6s ease-in-out infinite;
}

.phone__notch {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  width: 32%;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #000;
  transform: translateX(-50%);
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 14px 16px 12px;
  border-radius: calc(var(--radius-phone) - 12px);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(139, 92, 246, 0.25), transparent 60%),
    var(--color-phone-screen);
  overflow: hidden;
}

.app__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
}

.app__status-icons { display: flex; gap: 3px; }
.app__status-icons i {
  display: block;
  width: 10px;
  height: 6px;
  border-radius: 2px;
  background: var(--color-text);
  opacity: 0.85;
}

.app__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.app__hello { font-size: 11px; color: var(--color-text-muted); }
.app__name { font-family: var(--font-heading); font-size: 18px; font-weight: 700; }

.app__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-brand);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.app__card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--gradient-button);
}

.app__card-label { font-size: 10px; color: rgba(255, 255, 255, 0.85); }
.app__card-value { font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1.2; }

.app__bar {
  height: 6px;
  margin-top: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.app__bar span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-white);
}

.app__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
}

.app__chart span {
  flex: 1;
  height: var(--h);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--color-cyan), var(--color-violet));
  opacity: 0.9;
}

.app__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.app__dot { width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0; }
.app__dot--violet { background: var(--color-violet); }
.app__dot--blue { background: var(--color-blue); }
.app__dot--cyan { background: var(--color-cyan); }

.app__line {
  height: 6px;
  width: 80%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
}
.app__line--short { width: 55%; }

.app__tabbar {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.app__tabbar i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}

.app__tabbar i.is-active { background: var(--gradient-brand); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}

/* Above-the-fold entrance: CSS only and transform only, so content is visible
   immediately even if script.js never runs */
.hero__copy,
.hero__visual {
  animation: hero-in var(--reveal-duration) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__visual { animation-delay: 80ms; }

@keyframes hero-in {
  from { transform: translateY(var(--reveal-distance)); }
  to { transform: none; }
}

/* 7. Sections & cards
   ========================================================================== */
.section {
  padding-block: var(--space-9);
}

.section--alt {
  background: linear-gradient(180deg, transparent, var(--color-bg-alt) 20%, var(--color-bg-alt) 80%, transparent);
}

.section__head {
  max-width: 40rem;
  margin-bottom: var(--space-7);
}

.section__kicker {
  margin-bottom: var(--space-3);
  color: var(--color-cyan-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: 700;
}

.section__intro {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

/* Gradient border shown on hover (masked pseudo-element) */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

.card__title {
  font-size: var(--fs-xl);
  font-weight: 600;
}

.card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* 8. Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.service {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-5);
}

.service .tags { margin-top: auto; padding-top: var(--space-2); }

.service__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-icon-bg);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--color-violet-soft);
}

/* 9. Work / portfolio
   ========================================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

/* Filter chips need JS to work, so hide them without it */
html:not(.js) .filters {
  display: none;
}

/* Compact grid: one column, two from 860px (section 12). Cards in a row stretch to equal height. */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.project {
  display: flex;
  flex-direction: column;
}

/* Same 16 / 10 box on every card; the mockup stages inside size off its width (cqw) */
.project__preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: var(--space-4);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  container-type: inline-size;
}

/* Stylised mini "screen" floating inside each preview */
.project__mini {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 34%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)) 12% 14% / 50% 6% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) 12% 26% / 76% 4% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 12% 48% / 76% 22% no-repeat,
    rgba(10, 10, 18, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  transition: transform var(--transition-base);
}

.project:hover .project__mini {
  transform: translateX(-50%) translateY(-8px);
}

/* Per-project preview tints: add one .project__preview--<app> rule per project */
.project__preview--order-deck {
  background:
    radial-gradient(circle at 18% 12%, rgba(10, 132, 255, 0.55), transparent 55%),
    radial-gradient(circle at 90% 95%, rgba(6, 182, 212, 0.35), transparent 50%),
    linear-gradient(140deg, #0a3d8f 0%, #0073f2 55%, #0b1a3a 100%);
}

.project__preview--babytrackie {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.6), transparent 45%),
    radial-gradient(circle at 92% 96%, rgba(194, 72, 122, 0.5), transparent 55%),
    linear-gradient(140deg, #fdf6f0 0%, #f9d3df 50%, #f48fb1 100%);
}

.project__preview--solids-planner {
  background:
    radial-gradient(circle at 14% 10%, rgba(135, 209, 161, 0.55), transparent 50%),
    radial-gradient(circle at 92% 96%, rgba(10, 40, 24, 0.6), transparent 55%),
    linear-gradient(140deg, #87d1a1 0%, #3f8a62 45%, #2b6b4a 70%, #143a27 100%);
}

.project__preview--invoicee {
  background:
    radial-gradient(circle at 86% 12%, rgba(0, 122, 255, 0.55), transparent 55%),
    radial-gradient(circle at 10% 94%, rgba(0, 122, 255, 0.22), transparent 50%),
    linear-gradient(140deg, #3d4859 0%, #2b3340 50%, #141922 100%);
}

.project__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  padding: var(--space-5);
}

.project__category {
  color: var(--color-cyan-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Released / live variant */
.status-pill--live {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}

/* Collapsible "Key features" (native <details>, no JS) */
.project__details summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-1);
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.project__details summary::-webkit-details-marker { display: none; }

/* Chevron: points right when closed, down when open */
.project__details summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition-fast);
}

.project__details[open] summary::after { transform: translateY(-0.15em) rotate(45deg); }

.project__details summary:hover,
.project__details summary:focus-visible { color: var(--color-text); }

.project__details summary:focus-visible { outline-offset: 2px; }

.project__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.project__features li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* Small gradient check icon */
.project__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.6l4.5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat,
    var(--gradient-button);
}

/* Footer: tags, then the action row (when present), pinned to the bottom of the card */
.project .tags { margin-top: auto; padding-top: var(--space-3); }

.project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-2);
}

.project .tags + .project__actions { margin-top: 0; }

.project__actions .btn svg { flex: none; }

/* ---- Order Deck mockup (decorative, sized in em off the preview width) ---- */
/* 84% wide (+ 10% bottom padding for the iPhone overhang) keeps the stage inside the 16 / 10 preview;
   1.34cqw = 1.6% of the stage width, the same proportions as the original full-width stage */
.pos-stage {
  position: relative;
  width: 84%;
  max-width: 560px;
  padding-bottom: 10%;
  font-size: 5px;
  font-size: clamp(4px, 1.34cqw, 9px);
  line-height: 1.25;
}

.pos-ipad {
  width: 80%;
  aspect-ratio: 10 / 7;
  padding: 1em;
  border-radius: 2.2em;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.pos-screen {
  display: grid;
  grid-template-columns: 20% minmax(0, 1fr) 31%;
  gap: 0.7em;
  height: 100%;
  padding: 0.7em;
  border-radius: 1.3em;
  background: #eef0f4;
  color: #1c1c1e;
  overflow: hidden;
}

.pos-cats,
.pos-items,
.pos-lines {
  min-width: 0;
}

.pos-cats {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.pos-cat {
  padding: 0.9em 0.7em;
  border-radius: 0.6em;
  background: var(--c);
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-cat.is-active { box-shadow: 0 0 0 0.25em rgba(0, 115, 242, 0.55); }

.pos-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.6em;
}

.pos-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.3em;
  padding: 0.7em 0.6em;
  border-radius: 0.6em;
  border-left: 0.4em solid #8e5b3a;
  background: #fff;
  font-weight: 600;
  overflow: hidden;
}

.pos-item small {
  color: #6b6b75;
  font-size: 0.85em;
  font-weight: 500;
}

/* 86'd (sold out) item */
.pos-item.is-86 {
  opacity: 0.45;
  border-left-color: #b8b8c0;
  text-decoration: line-through;
}

.pos-ticket {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  min-width: 0;
  padding: 0.8em;
  border-radius: 0.8em;
  background: #fff;
}

.pos-ticket__head {
  padding-bottom: 0.5em;
  border-bottom: 1px solid #e2e4ea;
  font-weight: 700;
}

.pos-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.pos-lines li,
.pos-total,
.pos-admin__row {
  display: flex;
  justify-content: space-between;
  gap: 0.5em;
  white-space: nowrap;
}

.pos-lines li span:first-child,
.pos-admin__row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-mod {
  padding-left: 1em;
  color: #6b6b75;
  font-size: 0.9em;
}

.pos-total {
  margin-top: auto;
  padding-top: 0.5em;
  border-top: 1px solid #e2e4ea;
  font-weight: 700;
}

.pos-charge {
  display: block;
  padding: 0.8em;
  border-radius: 0.6em;
  background: #0073f2;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.pos-iphone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 23%;
  aspect-ratio: 9 / 19;
  padding: 0.5em;
  border-radius: 2.6em;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 50px -15px rgba(0, 0, 0, 0.7);
  transition: transform var(--transition-base);
}

.pos-iphone__screen {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  height: 100%;
  padding: 2.4em 1em 1em;
  border-radius: 2.1em;
  background: #1c1c1e;
  color: #f2f2f7;
  overflow: hidden;
}

.pos-admin__label { color: #8e8e93; font-weight: 600; }

.pos-admin__value {
  font-size: 2.2em;
  font-weight: 700;
  line-height: 1;
}

.pos-admin__delta {
  color: #30d158;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}

.pos-admin__chart {
  display: flex;
  align-items: flex-end;
  gap: 0.3em;
  height: 6em;
  margin-block: 0.5em;
}

.pos-admin__chart span {
  flex: 1;
  height: var(--h);
  border-radius: 0.3em;
  background: rgba(10, 132, 255, 0.4);
}

.pos-admin__chart span.is-now { background: #0a84ff; }

.pos-admin__row {
  padding-top: 0.5em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85em;
}

.pos-admin__row span:last-child { font-weight: 600; }

.project:hover .pos-iphone {
  transform: translateY(-8px);
}

/* ---- BabyTrackie mockup (decorative, sized in em off the preview width) ----
   The two-phone stages (.bt-/.sp-/.iv-) are 39em tall (front phone); 1.4cqw keeps that inside the
   16 / 10 preview from ~330px (mobile) to ~560px (half-width) cards. */
.bt-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 30em;
  max-width: 100%;
  font-size: 5px;
  font-size: clamp(4px, 1.4cqw, 9px);
  line-height: 1.25;
}

.bt-phone {
  --bt-bg: #fdf6f0;
  --bt-surface: #ffffff;
  --bt-text: #2a1a22;
  --bt-muted: #8a7680;
  --bt-accent: #f48fb1;
  --bt-accent-strong: #d9487c;
  --bt-accent-soft: rgba(244, 143, 177, 0.3);
  --bt-shadow: rgba(217, 72, 124, 0.12);
  position: relative;
  z-index: 1;
  width: 18em;
  aspect-ratio: 9 / 19.5;
  padding: 0.5em;
  border-radius: 2.8em;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 50px -15px rgba(70, 10, 35, 0.6);
  transition: transform var(--transition-base);
}

/* Dynamic Island */
.bt-phone::after {
  content: "";
  position: absolute;
  top: 1.2em;
  left: 50%;
  width: 5em;
  height: 1.4em;
  border-radius: 1em;
  background: #000;
  transform: translateX(-50%);
}

/* Dark-theme variant, tilted behind the main phone */
.bt-phone--dark {
  --bt-bg: #16121a;
  --bt-surface: #251d27;
  --bt-text: #f5eef2;
  --bt-muted: #a8949f;
  --bt-accent-strong: #f8a5c2;
  --bt-accent-soft: rgba(244, 143, 177, 0.25);
  --bt-shadow: transparent;
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 0;
  width: 16em;
  margin-top: -17.3em;
  transform: rotate(-8deg);
}

.bt-screen {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  height: 100%;
  padding: 1em 1.1em 1.1em;
  border-radius: 2.3em;
  background: var(--bt-bg);
  color: var(--bt-text);
  overflow: hidden;
}

.bt-status {
  padding-left: 0.8em;
  font-size: 0.85em;
  font-weight: 600;
}

.bt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  margin-top: 0.4em;
}

.bt-title {
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
}

.bt-chip {
  padding: 0.3em 0.8em;
  border-radius: var(--radius-pill);
  background: var(--bt-accent-soft);
  color: var(--bt-accent-strong);
  font-size: 0.9em;
  font-weight: 600;
}

.bt-date {
  margin-top: -0.4em;
  color: var(--bt-muted);
  font-size: 0.9em;
}

.bt-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5em;
}

.bt-quick li,
.bt-card,
.bt-timeline li {
  background: var(--bt-surface);
  box-shadow: 0 0.2em 0.6em var(--bt-shadow);
}

.bt-quick li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding: 0.7em 0.3em;
  border-radius: 1em;
  font-size: 0.85em;
  font-weight: 600;
}

/* Simple white glyphs on a pink disc (no emoji, no images) */
.bt-ico {
  position: relative;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: var(--bt-accent);
}

.bt-ico::before,
.bt-ico::after {
  content: "";
  position: absolute;
  background: #fff;
}

/* Bottle: body + teat */
.bt-ico--feed::before {
  left: 0.85em;
  top: 0.85em;
  width: 0.7em;
  height: 1.05em;
  border-radius: 0.25em;
}

.bt-ico--feed::after {
  left: 0.95em;
  top: 0.5em;
  width: 0.5em;
  height: 0.4em;
  border-radius: 0.25em 0.25em 0 0;
}

/* Nappy */
.bt-ico--nappy::before {
  left: 0.6em;
  top: 0.8em;
  width: 1.2em;
  height: 0.85em;
  border-radius: 0.2em 0.2em 0.7em 0.7em;
}

.bt-ico--nappy::after { display: none; }

/* Scale dial + needle */
.bt-ico--weight::before {
  left: 0.6em;
  top: 0.6em;
  width: 1.2em;
  height: 1.2em;
  border: 0.2em solid #fff;
  border-radius: 50%;
  background: transparent;
}

.bt-ico--weight::after {
  left: 1.14em;
  top: 0.82em;
  width: 0.12em;
  height: 0.42em;
  border-radius: 0.1em;
  transform: rotate(35deg);
  transform-origin: bottom center;
}

.bt-card {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 0.9em;
  border-radius: 1.1em;
}

.bt-milk {
  display: flex;
  align-items: center;
  gap: 0.8em;
  min-width: 0;
}

/* Progress ring toward the daily target (--p) */
.bt-ring {
  flex: none;
  width: 3.4em;
  height: 3.4em;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--bt-surface) 68%, transparent 70%),
    conic-gradient(var(--bt-accent) var(--p), var(--bt-accent-soft) 0);
}

.bt-card__label {
  color: var(--bt-muted);
  font-size: 0.85em;
  font-weight: 600;
}

.bt-card__value {
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.bt-card__value small {
  color: var(--bt-muted);
  font-size: 0.55em;
  font-weight: 600;
}

.bt-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35em;
  height: 3.6em;
}

.bt-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 0.3em;
  background: var(--bt-accent-soft);
}

.bt-bars span.is-now { background: var(--bt-accent); }

.bt-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  font-size: 0.85em;
}

.bt-timeline li {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 0.7em;
  border-radius: 0.7em;
  white-space: nowrap;
  overflow: hidden;
}

.bt-timeline li::before {
  content: "";
  flex: none;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.2em;
  border-radius: 50%;
  background: var(--bt-accent);
}

.bt-timeline span {
  color: var(--bt-muted);
  font-weight: 600;
}

.project:hover .bt-phone {
  transform: translateY(-8px);
}

.project:hover .bt-phone--dark {
  transform: rotate(-10deg) translateX(-0.4em);
}

/* ---- Solids Planner mockup (decorative, sized in em off the preview width) ---- */
.sp-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 30em;
  max-width: 100%;
  font-size: 5px;
  font-size: clamp(4px, 1.4cqw, 9px);
  line-height: 1.25;
}

.sp-phone {
  --sp-bg: #f5f8f3;
  --sp-surface: #ffffff;
  --sp-text: #17261d;
  --sp-muted: #6b7a70;
  --sp-accent: #2b6b4a;
  --sp-accent-soft: rgba(43, 107, 74, 0.14);
  --sp-shadow: rgba(23, 61, 41, 0.12);
  position: relative;
  z-index: 1;
  width: 18em;
  aspect-ratio: 9 / 19.5;
  padding: 0.5em;
  border-radius: 2.8em;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 50px -15px rgba(5, 30, 18, 0.65);
  transition: transform var(--transition-base);
}

/* Dynamic Island */
.sp-phone::after {
  content: "";
  position: absolute;
  top: 1.2em;
  left: 50%;
  width: 5em;
  height: 1.4em;
  border-radius: 1em;
  background: #000;
  transform: translateX(-50%);
}

/* Dark-theme variant, tilted behind the main phone (mirrors BabyTrackie: sits on the right) */
.sp-phone--dark {
  --sp-bg: #0f1612;
  --sp-surface: #1b2620;
  --sp-text: #eef5f0;
  --sp-muted: #93a69a;
  --sp-accent: #87d1a1;
  --sp-accent-soft: rgba(135, 209, 161, 0.2);
  --sp-shadow: transparent;
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 0;
  width: 16em;
  margin-top: -17.3em;
  transform: rotate(8deg);
}

.sp-screen {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  height: 100%;
  padding: 1em 1.1em 1.1em;
  border-radius: 2.3em;
  background: var(--sp-bg);
  color: var(--sp-text);
  overflow: hidden;
}

.sp-status {
  padding-left: 0.8em;
  font-size: 0.85em;
  font-weight: 600;
}

.sp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

.sp-title {
  margin-top: 0.4em;
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
}

/* Round profile icon: head + shoulders */
.sp-avatar {
  position: relative;
  flex: none;
  width: 2.4em;
  height: 2.4em;
  margin-top: 0.8em;
  border-radius: 50%;
  background: var(--sp-accent-soft);
  overflow: hidden;
}

.sp-avatar::before,
.sp-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  background: var(--sp-accent);
  transform: translateX(-50%);
}

.sp-avatar::before {
  top: 0.5em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
}

.sp-avatar::after {
  top: 1.5em;
  width: 1.6em;
  height: 1.4em;
  border-radius: 50%;
}

.sp-label {
  margin-top: 0.3em;
  color: var(--sp-muted);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-recipes {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.sp-recipe {
  display: flex;
  flex-direction: column;
  border-radius: 1.2em;
  background: var(--sp-surface);
  box-shadow: 0 0.2em 0.6em var(--sp-shadow);
  overflow: hidden;
}

/* Food-category gradient with a simple bowl shape (no images) */
.sp-recipe__img {
  position: relative;
  display: block;
  height: 6.6em;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(150deg, var(--c), rgba(0, 0, 0, 0.25)),
    var(--c);
}

.sp-recipe__img::before {
  content: "";
  position: absolute;
  right: 1.2em;
  bottom: 1em;
  width: 4.2em;
  height: 2.1em;
  border-radius: 0 0 2.1em 2.1em;
  background: rgba(255, 255, 255, 0.85);
}

.sp-recipe__img::after {
  content: "";
  position: absolute;
  right: 1.6em;
  bottom: 2.6em;
  width: 3.4em;
  height: 1.1em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.sp-recipe__chip {
  position: absolute;
  left: 0.7em;
  top: 0.7em;
  padding: 0.35em 0.7em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--c);
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sp-recipe__title {
  padding: 0.6em 0.8em 0.7em;
  font-size: 0.95em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating 5-icon tab bar */
.sp-tabbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 0.6em 0.9em;
  border-radius: var(--radius-pill);
  background: var(--sp-surface);
  box-shadow: 0 0.3em 1em var(--sp-shadow), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.sp-tab {
  --t: #9aa69e;
  position: relative;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
}

.sp-tab.is-active {
  --t: var(--sp-accent);
  background: var(--sp-accent-soft);
}

.sp-tab::before,
.sp-tab::after {
  content: "";
  position: absolute;
}

/* Today: sun disc with a ring */
.sp-tab--today::before {
  inset: 0.65em;
  border-radius: 50%;
  background: var(--t);
}

.sp-tab--today::after {
  inset: 0.4em;
  border: 0.12em dashed var(--t);
  border-radius: 50%;
}

/* Plan: calendar */
.sp-tab--plan::before {
  left: 0.55em;
  top: 0.6em;
  width: 1.1em;
  height: 1em;
  border: 0.15em solid var(--t);
  border-top-width: 0.32em;
  border-radius: 0.2em;
}

/* Recipes: open book */
.sp-tab--recipes::before {
  left: 0.5em;
  top: 0.65em;
  width: 0.55em;
  height: 0.9em;
  border: 0.15em solid var(--t);
  border-radius: 0.15em 0 0 0.15em;
}

.sp-tab--recipes::after {
  left: 1.05em;
  top: 0.65em;
  width: 0.55em;
  height: 0.9em;
  border: 0.15em solid var(--t);
  border-radius: 0 0.15em 0.15em 0;
}

/* Guide: leaf */
.sp-tab--guide::before {
  left: 0.6em;
  top: 0.6em;
  width: 1em;
  height: 1em;
  border-radius: 0 60% 0 60%;
  background: var(--t);
}

/* Journey: winding path of dots */
.sp-tab--journey::before {
  left: 0.5em;
  top: 0.5em;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: var(--t);
  box-shadow: 0.4em 0.4em 0 var(--t), 0.8em 0.8em 0 var(--t);
}

/* Journey screen (dark phone) */
.sp-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4em;
  padding: 0.8em;
  border-radius: 1.1em;
  background: var(--sp-surface);
}

.sp-progress__label {
  color: var(--sp-muted);
  font-size: 0.85em;
  font-weight: 600;
}

.sp-progress__value {
  font-size: 1.3em;
  font-weight: 700;
  white-space: nowrap;
}

.sp-progress__value small {
  color: var(--sp-muted);
  font-size: 0.6em;
  font-weight: 600;
}

.sp-progress__bar {
  flex: 1 0 100%;
  height: 0.5em;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(var(--sp-accent), var(--sp-accent)) 0 0 / var(--p) 100% no-repeat,
    var(--sp-accent-soft);
}

.sp-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35em;
}

.sp-tiles li {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1;
  padding: 0.35em 0.25em;
  border-radius: 0.6em;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.28), transparent 45%),
    var(--c);
  color: #fff;
  font-size: 0.6em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sp-well {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.8em;
  border-radius: 1.1em;
  background: var(--sp-accent-soft);
  border: 1px solid rgba(135, 209, 161, 0.35);
}

/* Check mark inside a green disc */
.sp-well__check {
  position: relative;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: var(--sp-accent);
}

.sp-well__check::before {
  content: "";
  position: absolute;
  left: 0.72em;
  top: 0.45em;
  width: 0.5em;
  height: 0.9em;
  border: solid #0f1612;
  border-width: 0 0.2em 0.2em 0;
  transform: rotate(45deg);
}

.sp-well__title {
  color: var(--sp-accent);
  font-size: 0.95em;
  font-weight: 700;
}

.sp-well__text {
  color: var(--sp-muted);
  font-size: 0.8em;
}

.project:hover .sp-phone {
  transform: translateY(-8px);
}

.project:hover .sp-phone--dark {
  transform: rotate(10deg) translateX(0.4em);
}

/* ---- Invoicee mockup (decorative, sized in em off the preview width) ---- */
.iv-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 30em;
  max-width: 100%;
  font-size: 5px;
  font-size: clamp(4px, 1.4cqw, 9px);
  line-height: 1.25;
}

/* iOS inset-grouped light theme */
.iv-phone {
  --iv-bg: #f2f2f7;
  --iv-surface: #ffffff;
  --iv-text: #1c1c1e;
  --iv-muted: #8e8e93;
  --iv-faint: #c7c7cc;
  --iv-sep: rgba(60, 60, 67, 0.14);
  --iv-fill: rgba(118, 118, 128, 0.12);
  --iv-accent: #007aff;
  --iv-accent-soft: rgba(0, 122, 255, 0.12);
  --iv-navy: #2b3340;
  position: relative;
  z-index: 1;
  width: 18em;
  aspect-ratio: 9 / 19.5;
  padding: 0.5em;
  border-radius: 2.8em;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 50px -15px rgba(5, 12, 30, 0.7);
  transition: transform var(--transition-base);
}

/* Dynamic Island */
.iv-phone::after {
  content: "";
  position: absolute;
  top: 1.2em;
  left: 50%;
  width: 5em;
  height: 1.4em;
  border-radius: 1em;
  background: #000;
  transform: translateX(-50%);
}

/* Dark-theme variant, tilted behind the main phone (mirrors BabyTrackie: sits on the left) */
.iv-phone--dark {
  --iv-bg: #000000;
  --iv-surface: #1c1c1e;
  --iv-text: #f2f2f7;
  --iv-muted: #8e8e93;
  --iv-sep: rgba(84, 84, 88, 0.6);
  --iv-fill: rgba(118, 118, 128, 0.24);
  --iv-accent: #0a84ff;
  --iv-accent-soft: rgba(10, 132, 255, 0.22);
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 0;
  width: 16em;
  margin-top: -17.3em;
  transform: rotate(-8deg);
}

.iv-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  height: 100%;
  padding: 1em 1.1em 0;
  border-radius: 2.3em;
  background: var(--iv-bg);
  color: var(--iv-text);
  overflow: hidden;
}

.iv-status {
  padding-left: 0.8em;
  font-size: 0.85em;
  font-weight: 600;
}

.iv-title {
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
}

/* Nav bar: share (left), filled plus-circle (right) */
.iv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.3em;
}

.iv-share {
  position: relative;
  width: 1.6em;
  height: 1.6em;
  background: linear-gradient(var(--iv-accent), var(--iv-accent)) center 0.15em / 0.14em 0.95em no-repeat;
}

.iv-share::before,
.iv-share::after {
  content: "";
  position: absolute;
}

/* Open-top tray */
.iv-share::before {
  left: 0.25em;
  bottom: 0.05em;
  width: 1.1em;
  height: 0.8em;
  border: 0.14em solid var(--iv-accent);
  border-top-color: transparent;
  border-radius: 0.2em;
}

/* Arrow head */
.iv-share::after {
  left: 0.55em;
  top: 0.12em;
  width: 0.5em;
  height: 0.5em;
  border: solid var(--iv-accent);
  border-width: 0.14em 0 0 0.14em;
  transform: rotate(45deg);
}

.iv-add {
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 0.9em 0.16em no-repeat,
    linear-gradient(#fff, #fff) center / 0.16em 0.9em no-repeat,
    var(--iv-accent);
}

.iv-chip {
  align-self: flex-start;
  padding: 0.3em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--iv-accent-soft);
  color: var(--iv-accent);
  font-size: 0.7em;
  font-weight: 700;
}

/* Inset-grouped list */
.iv-list {
  border-radius: 1em;
  background: var(--iv-surface);
  overflow: hidden;
}

.iv-row {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.65em 0.75em;
}

.iv-row + .iv-row {
  box-shadow: inset 2.4em 1px 0 var(--iv-surface), inset 0 1px 0 var(--iv-sep);
}

/* Cloud sync icon: blue = synced, grey = not synced */
.iv-cloud {
  --cl: var(--iv-faint);
  position: relative;
  flex: none;
  width: 1.2em;
  height: 0.55em;
  margin-top: 0.3em;
  border-radius: var(--radius-pill);
  background: var(--cl);
}

.iv-cloud.is-synced { --cl: var(--iv-accent); }

.iv-cloud::before,
.iv-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--cl);
}

.iv-cloud::before {
  left: 0.18em;
  top: -0.3em;
  width: 0.6em;
  height: 0.6em;
}

.iv-cloud::after {
  right: 0.15em;
  top: -0.18em;
  width: 0.45em;
  height: 0.45em;
}

.iv-row__main,
.iv-row__amt {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.iv-row__main {
  flex: 1;
  min-width: 0;
}

.iv-row__amt {
  flex: none;
  align-items: flex-end;
}

.iv-row b {
  font-size: 0.85em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iv-row small {
  color: var(--iv-muted);
  font-size: 0.65em;
  white-space: nowrap;
}

/* Floating scan button: viewfinder inside a blue disc */
.iv-scan {
  position: absolute;
  right: 1.2em;
  bottom: 4.6em;
  width: 3.2em;
  height: 3.2em;
  border-radius: 50%;
  background: var(--iv-accent);
  box-shadow: 0 0.4em 1em rgba(0, 122, 255, 0.4);
}

.iv-scan::before,
.iv-scan::after {
  content: "";
  position: absolute;
  background: #fff;
}

.iv-scan::before {
  inset: 0.95em;
  border: 0.16em solid #fff;
  border-radius: 0.25em;
  background: none;
}

.iv-scan::after {
  left: 0.75em;
  right: 0.75em;
  top: 50%;
  height: 0.16em;
  margin-top: -0.08em;
}

/* Bottom tab bar: 5 icons, Invoice active */
.iv-tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: auto -1.1em 0;
  padding: 0.6em 0.8em 1.4em;
  background: var(--iv-surface);
  box-shadow: 0 -1px 0 var(--iv-sep);
}

.iv-tab {
  --t: #999999;
  position: relative;
  width: 1.8em;
  height: 1.8em;
}

.iv-tab.is-active { --t: var(--iv-accent); }

.iv-tab::before,
.iv-tab::after {
  content: "";
  position: absolute;
}

/* Invoice: document with text lines */
.iv-tab--invoice::before {
  left: 0.35em;
  top: 0.15em;
  width: 1.1em;
  height: 1.45em;
  border-radius: 0.2em;
  background: var(--t);
}

.iv-tab--invoice::after {
  left: 0.55em;
  top: 0.45em;
  width: 0.7em;
  height: 0.12em;
  background: var(--iv-surface);
  box-shadow: 0 0.3em 0 var(--iv-surface), 0 0.6em 0 var(--iv-surface);
}

/* Expenses: bar chart */
.iv-tab--expenses::before {
  left: 0.3em;
  bottom: 0.2em;
  width: 1.2em;
  height: 1.3em;
  background:
    linear-gradient(var(--t), var(--t)) 0 100% / 0.3em 45% no-repeat,
    linear-gradient(var(--t), var(--t)) 50% 100% / 0.3em 100% no-repeat,
    linear-gradient(var(--t), var(--t)) 100% 100% / 0.3em 70% no-repeat;
}

/* Revenue: coin */
.iv-tab--revenue::before {
  inset: 0.2em;
  border: 0.14em solid var(--t);
  border-radius: 50%;
}

.iv-tab--revenue::after {
  left: 50%;
  top: 0.55em;
  width: 0.14em;
  height: 0.7em;
  margin-left: -0.07em;
  background: var(--t);
}

/* Reports: pie chart */
.iv-tab--reports::before {
  inset: 0.2em;
  border-radius: 50%;
  background: conic-gradient(transparent 0 25%, var(--t) 0);
  box-shadow: inset 0 0 0 0.14em var(--t);
}

/* Settings: gear */
.iv-tab--settings::before {
  inset: 0.2em;
  border: 0.22em dotted var(--t);
  border-radius: 50%;
}

.iv-tab--settings::after {
  inset: 0.55em;
  border: 0.14em solid var(--t);
  border-radius: 50%;
}

/* Expenses screen (dark phone) */
.iv-phone--dark .iv-title { margin-top: 0.5em; }

.iv-segments {
  display: flex;
  padding: 0.15em;
  border-radius: 0.6em;
  background: var(--iv-fill);
}

.iv-segments li {
  flex: 1;
  padding: 0.3em 0;
  border-radius: 0.5em;
  font-size: 0.7em;
  font-weight: 600;
  text-align: center;
}

.iv-segments li.is-active { background: #636366; }

.iv-caption {
  margin-top: 0.2em;
  color: var(--iv-muted);
  font-size: 0.7em;
}

.iv-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.5em;
  font-size: 1.55em;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.iv-total small {
  color: var(--iv-muted);
  font-size: 0.45em;
  font-weight: 600;
}

.iv-toggle {
  display: flex;
  gap: 0.3em;
}

.iv-toggle li {
  padding: 0.35em 0.7em;
  border-radius: var(--radius-pill);
  background: var(--iv-fill);
  color: var(--iv-muted);
  font-size: 0.65em;
  font-weight: 600;
  white-space: nowrap;
}

.iv-toggle li.is-active {
  background: var(--iv-accent);
  color: #fff;
}

.iv-cats {
  display: flex;
  flex-direction: column;
  border-radius: 1em;
  background: var(--iv-surface);
  overflow: hidden;
}

.iv-cats li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35em;
  padding: 0.6em 0.75em;
  font-size: 0.75em;
}

.iv-cats li + li { box-shadow: inset 0 1px 0 var(--iv-sep); }

.iv-cats li span:last-child { font-weight: 700; }

/* Horizontal share bar under each category */
.iv-cats li::after {
  content: "";
  flex: 1 0 100%;
  height: 0.35em;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(var(--iv-accent), var(--iv-accent)) 0 0 / var(--w) 100% no-repeat,
    var(--iv-accent-soft);
}

.project:hover .iv-phone {
  transform: translateY(-8px);
}

.project:hover .iv-phone--dark {
  transform: rotate(-10deg) translateX(-0.4em);
}

.work-empty {
  margin-top: var(--space-5);
  color: var(--color-text-muted);
}

/* 10. Contact band & footer
   ========================================================================== */
.site-footer {
  padding-top: var(--space-8);
}

.cta-band {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-5);
  border-radius: var(--radius-xl);
  text-align: center;
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, rgba(6, 182, 212, 0.18), transparent 60%),
    var(--color-surface);
  overflow: hidden;
}

/* Always-on gradient border */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.cta-band__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  max-width: 22ch;
}

.cta-band__text {
  max-width: 36rem;
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

.cta-band .btn { margin-top: var(--space-2); }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.footer .brand { font-size: var(--fs-lg); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.footer__links a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast);
}

.footer__links a:hover { color: var(--color-text); }

.footer__copy {
  color: var(--color-text-subtle);
  font-size: var(--fs-sm);
}

/* 404 page */
.not-found {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  padding-block: var(--space-8);
}

.not-found__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.not-found__text {
  max-width: 32rem;
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

.not-found .btn { margin-top: var(--space-2); }

/* 11. Reveal-on-scroll (only hidden when JS is running)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Cards combine reveal + hover transitions */
.js .card.reveal {
  transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow var(--transition-base), border-color var(--transition-base);
}

.js .card.reveal:not(.is-visible) {
  transform: translateY(var(--reveal-distance));
}

.js .card.reveal.is-visible:hover,
.js .card.reveal.is-visible:focus-within {
  transform: translateY(-6px);
}

/* 12. Responsive
   ========================================================================== */
@media (min-width: 640px) {
  :root { --container-pad: 24px; }
}

@media (min-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
  }
}

/* Mobile nav: only collapses into a toggle when JS is available */
@media (max-width: 760px) {
  .js .nav__toggle { display: inline-flex; }

  .js .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-4) var(--container-pad) var(--space-5);
    background: var(--color-header-bg-scrolled);
    -webkit-backdrop-filter: blur(var(--blur-glass));
    backdrop-filter: blur(var(--blur-glass));
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 20px 30px -20px var(--color-shadow);
    display: none;
  }

  .js .nav__menu.is-open { display: flex; }

  .js .nav__links {
    flex-direction: column;
    gap: 0;
  }

  .js .nav__links a {
    display: block;
    padding: var(--space-3) 0;
    font-size: var(--fs-base);
    border-bottom: 1px solid var(--color-border);
  }

  /* No-JS fallback: let links wrap under the brand */
  html:not(.js) .nav { flex-wrap: wrap; padding-block: var(--space-2); }
  html:not(.js) .nav__menu { flex-wrap: wrap; gap: var(--space-4); }
}

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

  .hero { padding-top: var(--space-7); }
  .section { padding-block: var(--space-8); }

  .hero__ctas .btn { flex: 1 1 auto; }

  .hero__glow--violet { width: 320px; height: 320px; }
  .hero__glow--cyan { width: 300px; height: 300px; }

  .footer { flex-direction: column; align-items: flex-start; }

  /* Keep the contact email button inside narrow (360px) screens */
  .cta-band .btn {
    max-width: 100%;
    padding-inline: var(--space-4);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* 13. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .phone,
  .hero__copy,
  .hero__visual { animation: none; }

  .js .reveal,
  .js .card.reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .card:focus-within,
  .js .card.reveal.is-visible:hover,
  .js .card.reveal.is-visible:focus-within,
  .btn--primary:hover,
  .btn--ghost:hover {
    transform: none;
  }

  .project:hover .project__mini { transform: translateX(-50%); }
  .project:hover .pos-iphone { transform: none; }
  .project:hover .bt-phone { transform: none; }
  .project:hover .bt-phone--dark { transform: rotate(-8deg); }
  .project:hover .sp-phone { transform: none; }
  .project:hover .sp-phone--dark { transform: rotate(8deg); }
  .project:hover .iv-phone { transform: none; }
  .project:hover .iv-phone--dark { transform: rotate(-8deg); }
}

/* 14. Print
   ========================================================================== */
@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
