/* ==========================================================================
   723 Studios, design refresh layer
   --------------------------------------------------------------------------
   Loaded LAST in the document head, served from app static files (not the
   Cloudinary asset manifest) so a fix here ships with the next deploy and can
   be reverted by removing one <link>.

   It does three jobs:
     1. Repairs structural bugs in the hero (50vh clipping, clipped badge and
        stats, stranded headline word).
     2. Replaces the purple/blue gradient headline treatment with a single
        accent (amber) on white, the old gradient peaked at 3.47:1 contrast.
     3. Unifies cards, buttons, section headings and the nav on one surface
        and typography scale.

   Every rule is scoped to marketing surfaces; no admin/portal styles here.
   ========================================================================== */

:root {
  --surface-0: #08090b;
  --surface-1: #0d0f12;
  --surface-2: #12151a;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --ink: #f4f5f7;
  --ink-muted: #b7bcc6;
  --ink-dim: #8c929d;
  --accent: #e6be00;
  --accent-soft: rgba(230, 190, 0, 0.12);
  --accent-line: rgba(230, 190, 0, 0.32);
  --radius-card: 18px;
  --radius-pill: 999px;
}

/* Body tone: one tinted near-black instead of the flat #0a0a0a wash. */
body {
  background-color: var(--surface-0) !important;
  color: var(--ink) !important;
}

/* ==========================================================================
   1. HERO, structure and legibility
   ========================================================================== */

/* Root cause of the broken hero: an unscoped `height: 50vh !important` in
   marketing.css forced a 450px box around 720px of content, and overflow:hidden
   then cut the badge off the top and the stat row off the bottom. The box now
   grows with its content and only has a floor. */
.hero-parallax,
.section-hero {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: clamp(96px, 11vh, 132px) 0 clamp(56px, 7vh, 88px) !important;
  display: block !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* Particles sit behind the copy, at low opacity, so text contrast holds even
   over the animated strands. */
#particles-js {
  opacity: 0.28 !important;
}

/* The split hero is home-page only (it is the only page with .hero-panel). Inner
   pages keep a single left-aligned column, so this grid must not leak to them. */
.hero-split .hero-content {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(20px, 4vw, 40px) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) !important;
  align-items: center !important;
  gap: clamp(32px, 5vw, 72px) !important;
  text-align: left !important;
}

/* Inner-page heroes: one column, same container and rhythm, no empty track. */
.hero-parallax:not(.hero-split) .hero-content,
.section-hero:not(.hero-split) .hero-content {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(20px, 4vw, 40px) !important;
  display: block !important;
  text-align: left !important;
}

.hero-copy {
  min-width: 0;
}

/* Eyebrow replaces the old rocket pill. */
.hero-parallax .hero-badge,
.section-hero .hero-badge {
  display: none !important;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
}

.hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* The headline: solid white, one amber clause, tight tracking, no gradient and
   no text-shadow. This is the element that was invisible before. */
.hero-parallax .hero-title,
.section-hero .hero-title,
h1.hero-title {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--ink) !important;
  color: var(--ink) !important;
  text-shadow: none !important;
  font-family: var(--font-heading) !important;
  font-size: clamp(2.35rem, 4.6vw, 4.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 22px !important;
  text-align: left !important;
  text-wrap: balance;
  animation: none !important;
}

.hero-title .hero-accent,
.hero-title .text-glow {
  display: block;
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
  text-shadow: none !important;
}

.hero-parallax .hero-subtitle,
.section-hero .hero-subtitle {
  font-size: clamp(1rem, 1.15vw, 1.09rem) !important;
  line-height: 1.65 !important;
  color: var(--ink-muted) !important;
  max-width: 56ch !important;
  margin: 0 0 30px !important;
  text-align: left !important;
  margin-left: 0 !important;
}

.hero-parallax .hero-actions,
.section-hero .hero-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 22px !important;
}

.hero-parallax .hero-actions .btn,
.section-hero .hero-actions .btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 15px 26px !important;
  font-size: 0.95rem !important;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  font-size: 0.83rem !important;
  line-height: 1.3 !important;
  color: var(--ink-dim) !important;
}

.hero-note i {
  color: var(--accent);
  font-size: 0.8rem;
}

/* Credentials panel: the hero's right column. Replaces a centred stat strip
   that was being clipped out of view. */
.hero-panel {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-card);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(230, 190, 0, 0.09) 0%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 26px 26px 22px;
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}

.hero-panel .stat-item,
.hero-stats .stat-item {
  background: var(--surface-1);
  padding: 18px 16px !important;
  text-align: left !important;
  min-width: 0 !important;
}

.hero-panel .stat-number,
.hero-stats .stat-number {
  font-family: var(--font-heading) !important;
  font-size: 1.72rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  margin: 0 0 6px !important;
  font-variant-numeric: tabular-nums;
}

.hero-panel .stat-label,
.hero-stats .stat-label {
  font-size: 0.76rem !important;
  line-height: 1.35 !important;
  color: var(--ink-dim) !important;
  opacity: 1 !important;
  margin: 0 !important;
}

.hero-panel-foot {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ink-dim);
}

/* Legacy stat strip, still rendered on inner-page heroes. */
.hero-parallax .hero-stats .stats-grid,
.section-hero .hero-stats .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border-top: 1px solid var(--hairline);
  padding-top: 22px !important;
}

/* The guarantee banner repeated the hero's own guarantee line 40px below it. */
#guarantee-banner {
  display: none !important;
}

/* ==========================================================================
   2. SECTION HEADINGS, one readable colour, no stray tick
   ========================================================================== */

/* `.text-gradient` painted headings with a purple→cyan ramp that measured
   3.47:1 at its darkest stop. Headings are now white; the amber accent is
   carried by an eyebrow instead. */
.text-gradient,
h1.text-gradient,
h2.text-gradient,
h3.text-gradient,
.text-5xl.text-gradient {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--ink) !important;
  color: var(--ink) !important;
  animation: none !important;
}

.section-title {
  display: block !important;
  font-family: var(--font-heading) !important;
  font-size: clamp(1.85rem, 3.2vw, 2.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  color: var(--ink) !important;
  margin: 0 0 14px !important;
  text-wrap: balance;
}

/* The 4x20px amber bar used to render on top of the first letter. */
.section-title::before,
.section-title::after {
  display: none !important;
  content: none !important;
}

.section-header {
  margin-bottom: clamp(36px, 5vw, 60px) !important;
}

.section-subtitle {
  font-size: clamp(0.98rem, 1.1vw, 1.06rem) !important;
  line-height: 1.65 !important;
  color: var(--ink-muted) !important;
  max-width: 62ch !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ==========================================================================
   3. SURFACES, cards, buttons, badges
   ========================================================================== */

.section {
  padding: clamp(56px, 7vw, 96px) 0 !important;
}

.service-card,
.portfolio-card,
.info-card,
.enterprise-card,
.benefit-card,
.comparison-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
  box-shadow: none !important;
  padding: clamp(22px, 2.4vw, 30px) !important;
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease !important;
}

.service-card:hover,
.portfolio-card:hover {
  border-color: var(--accent-line) !important;
  transform: translateY(-3px) !important;
  background:
    linear-gradient(180deg, rgba(230, 190, 0, 0.06) 0%, rgba(255, 255, 255, 0.012) 100%) !important;
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.95) !important;
}

/* Two service cards carried an arbitrary coloured wash that made the grid look
   random. Every card now shares one surface. */
.highlighted-service {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
}

.service-card .service-icon,
.service-icon {
  width: 46px !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  border: 1px solid var(--accent-line) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  font-size: 1.05rem !important;
  margin: 0 0 18px !important;
}

.service-card h3,
.portfolio-card h3 {
  font-family: var(--font-heading) !important;
  font-size: 1.14rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  color: var(--ink) !important;
  margin: 0 0 10px !important;
}

.service-card p,
.portfolio-card p {
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  color: var(--ink-muted) !important;
  margin: 0 0 18px !important;
}

.service-tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
  margin-top: auto !important;
  padding-top: 4px;
}

.badge,
.service-tech .badge {
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  padding: 5px 10px !important;
  border-radius: 7px !important;
  border: 1px solid var(--hairline-strong) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink-muted) !important;
  text-transform: none !important;
}

/* Buttons */
.btn {
  border-radius: 10px !important;
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease !important;
}

.btn-consultation,
.btn-primary {
  background: linear-gradient(180deg, #f2cd1a 0%, #e6be00 100%) !important;
  border: 1px solid rgba(230, 190, 0, 0.9) !important;
  color: #14140a !important;
  box-shadow: 0 10px 26px -14px rgba(230, 190, 0, 0.7) !important;
}

.btn-consultation:hover,
.btn-primary:hover {
  background: linear-gradient(180deg, #ffdd33 0%, #f0c800 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 16px 34px -14px rgba(230, 190, 0, 0.8) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--hairline-strong) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px) !important;
}

.btn:active {
  transform: translateY(0) scale(0.99) !important;
}

/* components.css painted an amber→cyan 45° gradient on a ::before that bled 2px
   past the button edge and sat over the background. This was the rainbow CTA.
   A solid amber fill is the brand accent; the pseudo-element is retired. */
.btn-consultation::before,
.btn-consultation:hover::before,
.btn-consultation.active-cta::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.btn-consultation.active-cta {
  background: linear-gradient(180deg, #ffdd33 0%, #f0c800 100%) !important;
  border-color: var(--accent) !important;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Nav */
.navbar {
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 9, 11, 0.86) !important;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.nav-link {
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.005em !important;
  color: var(--ink-muted) !important;
  transition: color 160ms ease !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink) !important;
}

/* Active state: a 2px amber rule under the link, not a filled pill. */
.nav-link.active {
  background: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--accent) !important;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.nav-menu .nav-link {
  position: relative;
}

/* Portfolio + insight cards ------------------------------------------------- */

.portfolio-card {
  /* Was overflow:hidden, which cut the description off whenever the copy ran
     past the row height. The image rounds its own top corners instead. */
  overflow: visible !important;
  padding: 0 !important;
  text-decoration: none !important;
}

.portfolio-card .portfolio-image-container,
.portfolio-image-container {
  border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
  overflow: hidden !important;
}

.portfolio-card .portfolio-image-container,
.portfolio-image-container {
  position: relative !important;
  /* The card is a flex column and this was shrinkable, so the preview collapsed
     to a thin strip whenever the copy underneath was long. */
  flex: 0 0 auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--hairline) !important;
  overflow: hidden !important;
  padding: 0 !important;
  display: block !important;
}

.portfolio-image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
  transform: none !important;
  /* components.css gave every card image an 8px white pad, a 2px grey border and
     a #f8f9fa fill: the white frame around each screenshot. */
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  transition: transform 320ms ease !important;
}

.portfolio-card:hover .portfolio-image {
  transform: scale(1.03) !important;
}

.portfolio-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  padding: 20px 22px 22px !important;
  text-align: left !important;
}

.portfolio-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  margin: auto 0 0 !important;
  padding-top: 12px !important;
}

.portfolio-tag {
  margin: 0 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.04em !important;
  padding: 4px 9px !important;
  border-radius: 6px !important;
  border: 1px solid var(--hairline-strong) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink-muted) !important;
}

/* One featured post in a 4-column grid left 75% of the row empty. The grid now
   sizes to its contents and centres what is there. */
.insights-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  justify-content: center !important;
  gap: 20px !important;
}

.insight-card {
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
  max-width: 360px;
  width: 100%;
  justify-self: center;
  overflow: hidden !important;
  transition: border-color 220ms ease, transform 220ms ease !important;
}

.insight-card:hover {
  border-color: var(--accent-line) !important;
  transform: translateY(-3px) !important;
}

.insight-card .insight-image-container,
.insight-image-container {
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: var(--surface-2) !important;
}

.insight-card .insight-image,
.insight-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Newsletter proof numbers were being mangled by the counter ("10K+" → "10+");
   the counter is fixed, and the block is now quiet rather than loud. */
.newsletter-stats .stat-number {
  font-size: 1.5rem !important;
}

/* Portfolio index: screenshot tiles with the project's logo badged over the
   bottom-left corner. Columns fill the container on desktop and drop to a
   two-up, full-bleed grid on phones. */
.portfolio-items {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.portfolio-items .portfolio-item {
  min-width: 0;
  /* Legacy CSS made every tile a 1:1 box with overflow hidden, so the card was
     shorter than its own content and the copy spilled out of the border. */
  aspect-ratio: auto !important;
  height: auto !important;
  overflow: visible !important;
}

.portfolio-items .portfolio-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  text-decoration: none !important;
}

/* Copy is clamped so a long description cannot push the card past its row
   height and get clipped by the card's overflow. */
.portfolio-items .portfolio-description {
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px !important;
}

/* Logo badge: left padding matches .portfolio-content so the mark lines up with
   the project name underneath it. */
.portfolio-logo-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  box-sizing: border-box !important;
  padding: 6px !important;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 11, 13, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.portfolio-logo-badge img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Logo tiles read as light panels: several of these marks carry a white
   background and looked like a hole punched in the dark card. */
.portfolio-image-container--logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  background: #eef0f3 !important;
}

/* One accent. The portfolio hero used three different stat colours. */
.portfolio-hero-section .stat-number,
.portfolio-stats .stat-number {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

/* Filter chips: at phone width these were 150px-tall pills eating the fold. */
.portfolio-filter {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
}

.portfolio-filter .filter-btn {
  min-height: 0 !important;
  padding: 9px 16px !important;
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  border-radius: 999px !important;
}

.portfolio-logo-mark {
  max-width: 46% !important;
  max-height: 62% !important;
  object-fit: contain !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  filter: none !important;
}

@media (max-width: 768px) {
  /* Edge to edge: the grid runs the full width of the phone. */
  .portfolio-grid-section > .container,
  .portfolio-items {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
  }

  .portfolio-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .portfolio-items .portfolio-card {
    border-radius: 10px !important;
  }

  .portfolio-items .portfolio-image-container {
    border-radius: 10px 10px 0 0 !important;
  }

  .portfolio-items .portfolio-content {
    padding: 10px 10px 14px !important;
    min-height: 104px !important;
  }

  .portfolio-items .portfolio-title {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .portfolio-items .portfolio-description {
    display: none !important;
  }

  .portfolio-items .portfolio-tags {
    padding-top: 6px !important;
    gap: 4px !important;
  }

  .portfolio-items .portfolio-tag {
    font-size: 0.58rem !important;
    padding: 3px 6px !important;
  }

  .portfolio-logo-badge {
    left: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    padding: 4px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   4. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-split .hero-content {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 34px !important;
  }

  .hero-parallax .hero-title,
  .section-hero .hero-title {
    font-size: clamp(2.1rem, 6.4vw, 3rem) !important;
  }

  .hero-panel {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  /* The old mobile rule forced the hero to 50vh, which hid the headline and the
     stats entirely on a phone. */
  .hero-parallax,
  .section-hero {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: calc(64px + 34px) 0 40px !important;
  }

  .hero-parallax .hero-content,
  .section-hero .hero-content {
    padding: 0 18px !important;
    gap: 28px !important;
    text-align: left !important;
  }

  .hero-eyebrow {
    font-size: 0.7rem !important;
    letter-spacing: 0.12em !important;
    margin-bottom: 16px !important;
  }

  .hero-parallax .hero-title,
  .section-hero .hero-title {
    font-size: clamp(1.95rem, 8.4vw, 2.5rem) !important;
    line-height: 1.06 !important;
    text-align: left !important;
    margin-bottom: 16px !important;
  }

  .hero-parallax .hero-subtitle,
  .section-hero .hero-subtitle {
    font-size: 0.97rem !important;
    line-height: 1.6 !important;
    text-align: left !important;
    margin-bottom: 24px !important;
  }

  .hero-parallax .hero-actions,
  .section-hero .hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
  }

  .hero-parallax .hero-actions .btn,
  .section-hero .hero-actions .btn {
    width: 100% !important;
    max-width: none !important;
    justify-content: center !important;
    padding: 15px 20px !important;
  }

  .hero-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .hero-panel .stat-item {
    padding: 14px 12px !important;
  }

  .hero-panel .stat-number {
    font-size: 1.4rem !important;
  }

  .hero-panel .stat-label {
    font-size: 0.7rem !important;
  }

  .hero-note {
    font-size: 0.76rem !important;
    align-items: flex-start;
  }

  .hero-note i {
    margin-top: 2px;
  }

  .hero-parallax .hero-stats .stats-grid,
  .section-hero .hero-stats .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .section-title {
    font-size: clamp(1.6rem, 7vw, 2.05rem) !important;
    text-align: center !important;
  }

  .service-card,
  .portfolio-card,
  .info-card {
    padding: 20px !important;
  }

  .service-icon {
    width: 42px !important;
    height: 42px !important;
    margin-bottom: 14px !important;
  }

  .nav-link.active::after {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero-panel-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Decorative rules left over from earlier generations that still paint a stray
   bar beside hero copy and section headings. */
.hero-parallax .hero-content::before,
.hero-parallax .hero-content::after,
.section-hero .hero-content::before,
.section-hero .hero-content::after,
.hero-subtitle::before,
.hero-subtitle::after,
.section-subtitle::before,
.section-subtitle::after {
  content: none !important;
  display: none !important;
}

/* Newsletter block: the heading was centred while the paragraph beside it was
   right-aligned. Both now sit on the same left edge. */
.newsletter-content,
.newsletter-content h2,
.newsletter-content .newsletter-text,
.newsletter-text h3,
.newsletter-text p {
  text-align: left !important;
}

.newsletter-content h2 {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.025em !important;
}

/* Footer: five sections in a grid that was sized for four, so "Service Areas"
   wrapped onto its own centred row. Explicit tracks, left aligned, one rhythm. */
.footer {
  border-top: 1px solid var(--hairline) !important;
  background: var(--surface-0) !important;
}

.footer-content {
  display: grid !important;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)) !important;
  gap: 28px 32px !important;
  align-items: start !important;
  text-align: left !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 56px 32px 40px !important;
}

.footer-section {
  text-align: left !important;
  min-width: 0 !important;
}

.footer-section h4 {
  font-family: var(--font-heading) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--ink-dim) !important;
  margin: 0 0 14px !important;
}

.footer-section ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-section a {
  color: var(--ink-muted) !important;
  font-size: 0.88rem !important;
  text-decoration: none !important;
  transition: color 160ms ease !important;
}

.footer-section a:hover {
  color: var(--accent) !important;
}

.footer-brand h3 {
  font-family: var(--font-heading) !important;
  font-size: 1.15rem !important;
  margin: 14px 0 8px !important;
  color: var(--ink) !important;
  text-align: left !important;
}

.footer-brand p {
  font-size: 0.86rem !important;
  line-height: 1.6 !important;
  color: var(--ink-dim) !important;
  margin: 0 0 8px !important;
  max-width: 34ch;
}

.footer-nap {
  white-space: pre-line;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-start !important;
}

.footer-social .social-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline) !important;
  border-radius: 9px;
  color: var(--ink-muted) !important;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 160ms ease, color 160ms ease !important;
}

.footer-social .social-link:hover {
  border-color: var(--accent-line) !important;
  color: var(--accent) !important;
}

.footer-bottom {
  border-top: 1px solid var(--hairline) !important;
}

.footer-bottom-content {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 18px 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom p,
.footer-legal a {
  font-size: 0.8rem !important;
  color: var(--ink-dim) !important;
}

.footer-legal {
  display: flex;
  gap: 18px;
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .footer-content > .footer-section:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 40px 18px 28px !important;
    gap: 26px 18px !important;
  }

  .footer-bottom-content {
    padding: 16px 18px !important;
    flex-direction: column;
    align-items: flex-start !important;
  }
}

/* Blog index: the only page still on a light theme, which made its amber
   headlines read at ~1.9:1 and broke the site's dark identity. Surfaces,
   headings and chips now match the rest of the site. */
body.blog-page {
  background-color: var(--surface-0) !important;
  color: var(--ink) !important;
}

.blog-page .page-header,
.blog-page .blog-hero,
.blog-page .blog-hero-banner,
.blog-page .hero-section,
.blog-page .blog-hero-section {
  background: linear-gradient(180deg, #0e1114 0%, var(--surface-0) 100%) !important;
  border-bottom: 1px solid var(--hairline) !important;
}

.blog-page .page-header h1,
.blog-page .page-header p {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

/* Filter bar was a white panel between two dark sections. */
.blog-page .blog-filters,
.blog-page .filters-wrapper,
.blog-page .search-section,
.blog-page .tags-container,
.blog-page .clear-filters {
  background: transparent !important;
  color: var(--ink-muted) !important;
}

.blog-page .blog-filters {
  background: var(--surface-1) !important;
  border-bottom: 1px solid var(--hairline) !important;
}

/* Chips were grey-on-dark at roughly 3:1. */
.blog-page .tag-filter {
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.blog-page .tag-filter.active {
  color: #14140a !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Posts without a featured image fell back to a light grey placeholder. */
.blog-page .blog-image.placeholder,
.blog-page .placeholder-content {
  background: var(--surface-2) !important;
  border: 1px solid var(--hairline) !important;
  color: var(--ink-dim) !important;
}

.blog-page h1,
.blog-page h2,
.blog-page h3,
.blog-page .blog-title,
.blog-page .section-title {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

.blog-page p,
.blog-page .blog-excerpt,
.blog-page .blog-subtitle,
.blog-page .section-subtitle {
  color: var(--ink-muted) !important;
}

.blog-page .blog-posts,
.blog-page .blog-main-content,
.blog-page main {
  background: transparent !important;
}

.blog-page .blog-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card) !important;
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease !important;
}

.blog-page .blog-card:hover {
  border-color: var(--accent-line) !important;
  transform: translateY(-3px);
}

.blog-page .blog-card .blog-title a,
.blog-page .blog-card a {
  color: var(--ink) !important;
  text-decoration: none;
}

.blog-page .blog-card a:hover {
  color: var(--accent) !important;
}

.blog-page .blog-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.blog-page .blog-meta,
.blog-page .blog-meta span {
  color: var(--ink-dim) !important;
}

/* The tag wall ran to roughly fifty pills above the first post. It is now a
   single scrollable row, so the first article starts near the fold. */
.blog-page .tags-section,
.blog-page .tag-filters,
.blog-page .filters-wrapper {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.blog-page .tag-filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 8px !important;
  padding: 2px 0 10px !important;
  margin: 0 0 8px !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.blog-page .tag-filter,
.blog-page .blog-tag,
.blog-page .tag {
  flex: 0 0 auto !important;
  padding: 7px 13px !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  border-radius: 999px !important;
  border: 1px solid var(--hairline-strong) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink-muted) !important;
  white-space: nowrap !important;
}

.blog-page .tag-filter.active,
.blog-page .tag-filter:hover {
  border-color: var(--accent-line) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.blog-page .search-box,
.blog-page .search-input,
.blog-page .search-form {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 12px !important;
  color: var(--ink) !important;
}

.blog-page .search-input::placeholder {
  color: var(--ink-dim) !important;
}

.blog-page .tags-label {
  color: var(--ink-dim) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Quote form: one screen instead of a four step wizard. */
.quote-form-panel {
  max-width: 860px !important;
  margin: 0 auto !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius-card) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%) !important;
  padding: clamp(22px, 3vw, 38px) !important;
}

.quote-form-simple .form-label {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: var(--ink) !important;
  margin-bottom: 7px !important;
  display: block;
}

.quote-form-simple .form-input,
.quote-form-simple .form-textarea,
.quote-form-simple .form-select {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 10px !important;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  padding: 12px 14px !important;
}

.quote-form-simple .form-input:focus,
.quote-form-simple .form-textarea:focus,
.quote-form-simple .form-select:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(230, 190, 0, 0.16) !important;
}

.quote-form-simple .form-textarea {
  resize: vertical;
  min-height: 110px;
}

.quote-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}

.quote-type-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.quote-type-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quote-type-chip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-muted);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.quote-type-chip-inner i {
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.quote-type-chip input:checked + .quote-type-chip-inner {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.quote-type-chip input:checked + .quote-type-chip-inner i {
  color: var(--accent) !important;
}

.quote-type-chip input:focus-visible + .quote-type-chip-inner {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quote-form-actions {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin-top: 6px;
  flex-wrap: wrap;
}

.quote-form-actions .btn {
  min-height: 52px;
}

.quote-form-note {
  margin: 0 !important;
  font-size: 0.8rem !important;
  color: var(--ink-dim) !important;
}

/* ==========================================================================
   5. MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  #particles-js {
    display: none !important;
  }

  .service-card:hover,
  .portfolio-card:hover,
  .btn:hover {
    transform: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Featured projects ("Success Stories That Inspire"): one row on desktop.
   The preview grid had no column definition of its own, so the four cards
   stacked. Four cards, one row, even columns.
   --------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .portfolio-preview-section .portfolio-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .portfolio-preview-section .portfolio-card {
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
  .portfolio-preview-section .portfolio-image-container {
    aspect-ratio: 16 / 10;
  }
}

/* ==========================================================================
   PORTFOLIO INDEX: full-bleed gallery
   --------------------------------------------------------------------------
   Cards sit flush against each other and against the hero above: no section
   padding, no grid gap, square corners, the preview flush to the top and both
   sides with its copy underneath. Four across on desktop, two on phones.
   Scoped to .portfolio-items so the home page keeps its rounded cards.
   ========================================================================== */

section#portfolio-grid,
.portfolio-grid-section {
  padding: 0 !important;
  margin: 0 !important;
  background: var(--surface-0) !important;
}

/* Kill the last gap between the hero and the first row of projects. The id
   selector is required: mobile.css sets `section[id] { padding: 80px 0 }` with
   !important, which outranks the class alone. */
section#portfolio-hero,
.portfolio-hero-section {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.portfolio-grid-section .portfolio-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.portfolio-items {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid var(--hairline);
}

.portfolio-items .portfolio-item {
  aspect-ratio: auto !important;
  height: auto !important;
  overflow: visible !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.portfolio-items .portfolio-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--hairline) !important;
  border-bottom: 1px solid var(--hairline) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: background 180ms ease !important;
}

.portfolio-items .portfolio-card:hover {
  transform: none !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--hairline) !important;
}

/* Preview flush to the top, left and right edges of its cell. */
.portfolio-items .portfolio-image-container {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: var(--surface-2) !important;
}

.portfolio-items .portfolio-image {
  border-radius: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.portfolio-items .portfolio-content {
  /* Must not shrink: as a shrinkable flex child it was given 86px for 92px of
     content, so the tag row spilled over the next card's image. */
  flex: 0 0 auto !important;
  padding: 18px 18px 22px !important;
  margin: 0 !important;
  text-align: left !important;
  /* A fixed floor keeps every card in a row the same height, so a shorter
     description cannot leave dead space that reads as a gap between rows. */
  min-height: 208px !important;
}

.portfolio-items .portfolio-title {
  font-size: 1.02rem !important;
  margin-bottom: 6px !important;
}

/* Tags follow the copy immediately instead of being pinned to the card floor,
   so the block under a preview never shifts between cards. */
.portfolio-items .portfolio-tags {
  margin-top: 0 !important;
  padding-top: 12px !important;
}

@media (max-width: 1024px) {
  .portfolio-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  section#portfolio-grid,
  .portfolio-grid-section {
    padding: 0 !important;
  }

  .portfolio-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: start !important;
  }

  /* mobile.css adds a bottom margin to every card, which fights the gapless
     grid, and the card came out a few pixels shorter than its tag row. */
  .portfolio-items .portfolio-card {
    height: auto !important;
    margin: 0 !important;
    padding-bottom: 10px !important;
  }

  .portfolio-items .portfolio-card,
  .portfolio-items .portfolio-image-container,
  .portfolio-items .portfolio-image {
    border-radius: 0 !important;
  }

  .portfolio-items .portfolio-content {
    padding: 10px 10px 14px !important;
    min-height: 104px !important;
  }

  .portfolio-items .portfolio-title {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
  }

  .portfolio-items .portfolio-tags {
    padding-top: 8px !important;
    gap: 4px !important;
  }

  .portfolio-items .portfolio-tag {
    font-size: 0.56rem !important;
    line-height: 1.15 !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
  }

  .portfolio-items .portfolio-title {
    font-size: 0.8rem !important;
  }

  .portfolio-logo-badge {
    left: 8px !important;
    bottom: 8px !important;
    width: 26px !important;
    height: 26px !important;
    padding: 4px !important;
    border-radius: 6px !important;
  }
}

/* ==========================================================================
   PORTFOLIO HERO
   ========================================================================== */

/* The hero copy was inheriting the left-aligned inner-page rule while the stat
   grid underneath stayed centred. Everything is centred now, and the section
   carries the same padding above the headline as under the buttons. */
section#portfolio-hero,
.portfolio-hero-section {
  padding: clamp(64px, 8vh, 96px) 0 !important;
  margin: 0 !important;
}

.portfolio-hero-section .portfolio-hero-content {
  text-align: center !important;
  margin: 0 auto !important;
}

.portfolio-hero-section .hero-badge {
  display: flex !important;
  justify-content: center !important;
}

.portfolio-hero-section .hero-title,
.portfolio-hero-section .hero-subtitle {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.portfolio-hero-section .hero-subtitle {
  max-width: 62ch !important;
}

.portfolio-hero-section .hero-actions {
  justify-content: center !important;
  margin-bottom: 0 !important;
}

.portfolio-hero-section .portfolio-stats {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ShopDango's mark is a dark glyph on a dark chip. Force it to white. */
.portfolio-logo-badge img[src*="shopdango"] {
  filter: brightness(0) invert(1) !important;
}

/* Belt and braces against scroll-time flicker on the gallery: no entrance
   transforms, no opacity ramps, nothing that re-lays-out while scrolling. */
.portfolio-items [data-aos],
.portfolio-items [class*="aos"] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Scroll stability. The previous attempt promoted the full-viewport background
   gradients and the particle canvas to their own compositor layers, which made
   cards flicker and left some previews unpainted until hover. Those hints are
   gone; the canvas is simply told not to repaint the rest of the page. */
#particles-js {
  contain: layout paint;
}

/* The legacy grid class rounded the whole gallery container, which clipped the
   first tile's top-left corner. Everything here is square. */
.portfolio-grid-seamless {
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Phones: tighten the hero. It carried the same 64-96px above and below as
   desktop, which pushed the first project row well down the screen. */
@media (max-width: 768px) {
  section#portfolio-hero,
  .portfolio-hero-section {
    padding: 24px 0 24px !important;
  }

  .portfolio-hero-section .hero-badge {
    margin-bottom: 12px !important;
  }

  .portfolio-hero-section .hero-title {
    margin-bottom: 8px !important;
  }

  /* Shorter line, slightly larger type: fewer lines but easier to read. */
  .portfolio-hero-section .hero-subtitle {
    margin-bottom: 16px !important;
    /* The mobile root font is 13px, so rem units shrank this instead of
       growing it. Absolute sizing keeps the hero copy legible. */
    font-size: clamp(15px, 4.1vw, 17px) !important;
    line-height: 1.45 !important;
    max-width: 32ch !important;
  }

  /* Stats: four numbers were costing ~150px of hero. Tight 2x2 with smaller
     numerals and labels packed right under them. */
  .portfolio-hero-section .portfolio-stats,
  .portfolio-hero-section .portfolio-stats.grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px 8px !important;
    padding: 0 !important;
    margin: 0 auto 14px !important;
    max-width: 380px !important;
  }

  .portfolio-hero-section .stat-item {
    padding: 4px 2px !important;
  }

  .portfolio-hero-section .stat-number {
    font-size: 20px !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
  }

  .portfolio-hero-section .stat-label {
    font-size: 10px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.03em !important;
  }

  .portfolio-hero-section .hero-actions {
    gap: 8px !important;
  }

  .portfolio-hero-section .hero-actions .btn {
    min-height: 46px !important;
    padding: 12px 18px !important;
  }
}

/* ==========================================================================
   CENTRED HERO VARIANT
   --------------------------------------------------------------------------
   The inner-page heroes default to left aligned copy. Hosting and IP financing
   carry .hero-centered so their badge, headline, copy, stats and buttons sit on
   the same centre line as the portfolio index.
   ========================================================================== */

.hero-centered .hero-content,
.hero-centered .hosting-hero-content,
.hero-centered .portfolio-hero-content,
.hero-centered .quote-hero-content {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-centered .hero-title,
.hero-centered .hero-subtitle,
.hero-centered .hero-description {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-centered .hero-subtitle,
.hero-centered .hero-description {
  max-width: 62ch !important;
}

.hero-centered .hero-badge {
  display: flex !important;
  justify-content: center !important;
}

.hero-centered .hero-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
}

.hero-centered .stats-grid,
.hero-centered .hosting-stats,
.hero-centered .portfolio-stats {
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
}

/* One accent: these hero stats were using up to three different colours. */
.hero-centered .stat-number {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

@media (max-width: 768px) {
  .hero-centered .hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
  }

  .hero-centered .hero-actions .btn {
    width: 100% !important;
    max-width: none !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   BLOG INDEX
   --------------------------------------------------------------------------
   The page was carrying a "featured card" branch that produced a full-width
   card with a dead right half, a search row with a stray empty box, and a tag
   row that ran off the container. One card shape now, laid out as a grid.
   ========================================================================== */

.blog-page .page-header {
  padding: clamp(48px, 7vh, 84px) 0 clamp(28px, 4vh, 44px) !important;
  text-align: center !important;
}

.blog-page .page-header .header-content {
  max-width: 760px !important;
  margin: 0 auto !important;
}

.blog-page .page-header h1 {
  font-family: var(--font-heading) !important;
  font-size: clamp(2rem, 4vw, 3.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
  color: var(--ink) !important;
  margin: 0 0 12px !important;
}

.blog-page .page-header p {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem) !important;
  line-height: 1.6 !important;
  color: var(--ink-muted) !important;
  margin: 0 auto !important;
  max-width: 56ch !important;
}

/* Search + filters */
.blog-page .blog-filters {
  padding: 16px 0 12px !important;
  background: var(--surface-0) !important;
  border-top: 1px solid var(--hairline) !important;
  border-bottom: 1px solid var(--hairline) !important;
}

.blog-page .filters-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(16px, 4vw, 32px) !important;
}

.blog-page .search-section {
  max-width: 520px !important;
  width: 100% !important;
  margin: 0 !important;
  text-align: left !important;
  float: none !important;
}

.blog-page .search-form,
.blog-page .search-box {
  display: flex !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.blog-page .search-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  padding: 12px 15px !important;
  height: auto !important;
}

.blog-page .search-input::placeholder {
  color: var(--ink-dim) !important;
}

.blog-page .search-input:focus {
  outline: none !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.blog-page .search-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  border: 0 !important;
  border-left: 1px solid var(--hairline) !important;
  border-radius: 0 !important;
  background: rgba(230, 190, 0, 0.1) !important;
  color: var(--accent) !important;
  cursor: pointer;
  transition: background 160ms ease !important;
}

.blog-page .search-btn:hover {
  background: rgba(230, 190, 0, 0.2) !important;
}

.blog-page .tags-label {
  display: block !important;
  margin: 0 0 10px !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--ink-dim) !important;
}

/* One scrollable row: sixty chips wrapped to five rows and buried the posts.
   The row is width-constrained so it can never push past the container. */
.blog-page .tag-filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 0 8px !important;
  margin: 0 !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.blog-page .tag-filter {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 7px 12px !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  border-radius: 7px !important;
  border: 1px solid var(--hairline-strong) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink-muted) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease !important;
}

.blog-page .tag-filter:hover {
  border-color: var(--accent-line) !important;
  color: var(--ink) !important;
}

.blog-page .tag-filter.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #14140a !important;
  font-weight: 600 !important;
}

/* Posts */
.blog-page .blog-posts {
  padding: clamp(26px, 4vh, 40px) 0 clamp(48px, 7vh, 80px) !important;
}

.blog-page .blog-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 20px !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(16px, 4vw, 32px) !important;
}

.blog-page .blog-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--surface-1) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  transition: border-color 200ms ease, transform 200ms ease !important;
}

.blog-page .blog-card:hover {
  border-color: var(--accent-line) !important;
  transform: translateY(-2px) !important;
}

.blog-page .blog-image,
.blog-page .blog-image.placeholder {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: var(--surface-2) !important;
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.blog-page .blog-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}

.blog-page .placeholder-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  color: var(--ink-dim) !important;
  font-size: 1.6rem !important;
  background: var(--surface-2) !important;
}

.blog-page .blog-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  gap: 9px !important;
  padding: 16px 18px 18px !important;
  text-align: left !important;
}

.blog-page .blog-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 !important;
  font-size: 0.74rem !important;
  color: var(--ink-dim) !important;
}

.blog-page .blog-meta .meta-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.74rem !important;
  color: var(--ink-dim) !important;
}

.blog-page .blog-title {
  margin: 0 !important;
  font-family: var(--font-heading) !important;
  font-size: 1.08rem !important;
  font-weight: 600 !important;
  line-height: 1.32 !important;
  letter-spacing: -0.01em !important;
}

.blog-page .blog-title a {
  color: var(--ink) !important;
  text-decoration: none !important;
}

.blog-page .blog-title a:hover {
  color: var(--accent) !important;
}

.blog-page .blog-subtitle {
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  color: var(--ink-muted) !important;
}

.blog-page .blog-excerpt {
  margin: 0 !important;
  font-size: 0.86rem !important;
  line-height: 1.6 !important;
  color: var(--ink-dim) !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-page .blog-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
}

.blog-page .blog-tag {
  padding: 4px 9px !important;
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
  border: 1px solid var(--hairline-strong) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink-muted) !important;
  text-decoration: none !important;
}

.blog-page .blog-tag:hover {
  border-color: var(--accent-line) !important;
  color: var(--accent) !important;
}

.blog-page .more-tags {
  font-size: 0.68rem !important;
  color: var(--ink-dim) !important;
}

.blog-page .blog-actions {
  margin-top: auto !important;
  padding-top: 6px !important;
}

.blog-page .read-more-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  text-decoration: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: none !important;
}

.blog-page .read-more-btn:hover {
  color: #ffd633 !important;
}

.blog-page .read-more-btn i {
  transition: transform 160ms ease;
}

.blog-page .read-more-btn:hover i {
  transform: translateX(3px);
}

/* Results info + pagination */
.blog-page .results-info {
  max-width: 1240px !important;
  margin: 0 auto 24px !important;
  padding: 0 clamp(16px, 4vw, 32px) !important;
  text-align: left !important;
}

.blog-page .results-info h2 {
  font-size: 1.35rem !important;
  margin: 0 0 6px !important;
  color: var(--ink) !important;
}

.blog-page .results-info p {
  margin: 0 !important;
  color: var(--ink-dim) !important;
  font-size: 0.85rem !important;
}

.blog-page .pagination {
  max-width: 1240px !important;
  margin: 36px auto 0 !important;
  padding: 0 clamp(16px, 4vw, 32px) !important;
}

@media (max-width: 768px) {
  .blog-page .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 12px !important;
  }

  .blog-page .blog-content {
    gap: 7px !important;
    padding: 12px 12px 14px !important;
  }

  .blog-page .blog-title {
    font-size: 0.86rem !important;
    line-height: 1.3 !important;
  }

  .blog-page .blog-excerpt,
  .blog-page .blog-subtitle {
    display: none !important;
  }

  .blog-page .blog-meta {
    gap: 8px !important;
    font-size: 0.66rem !important;
  }

  .blog-page .blog-meta .meta-item:nth-child(2),
  .blog-page .blog-meta .meta-item:nth-child(3) {
    display: none !important;
  }

  .blog-page .blog-tags {
    gap: 4px !important;
  }

  .blog-page .blog-tag {
    font-size: 0.6rem !important;
    padding: 3px 6px !important;
  }

  .blog-page .search-section {
    max-width: 100% !important;
  }
}

/* The blog sections had no background of their own, so the two fixed radial
   gradients on the body washed the whole page olive and blue. Opaque surfaces. */
.blog-page .page-header,
.blog-page .blog-filters,
.blog-page .blog-posts,
.blog-page .pagination {
  background: var(--surface-0) !important;
}

/* Search field was a 4% white pill on near-black: invisible in practice. */
.blog-page .search-form,
.blog-page .search-box {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.blog-page .search-input {
  color: var(--ink) !important;
}

.blog-page .search-input::placeholder {
  color: #9aa1ad !important;
  opacity: 1 !important;
}

/* Chips were still able to paint outside the container. */
.blog-page .filters-wrapper,
.blog-page .tags-section {
  overflow: hidden !important;
  max-width: 100% !important;
}

/* The topic strip is ~8600px of chips in one row, so it showed a browser
   scrollbar that looked like a broken page. Keep the horizontal scroll, hide
   the chrome, and fade the right edge so it reads as a carousel. */
.blog-page .tag-filters {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
}

.blog-page .tag-filters::-webkit-scrollbar,
.blog-page .tag-filters::-webkit-scrollbar-track,
.blog-page .tag-filters::-webkit-scrollbar-thumb {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Nothing else on the page should advertise a horizontal scrollbar either. */
.blog-page .filters-wrapper,
.blog-page .blog-grid,
.blog-page .blog-posts {
  scrollbar-width: none;
}
