/* ==========================================================================
   PRIOSIS TECH SOLUTIONS - MAIN STYLESHEET
   --------------------------------------------------------------------------
   Table of contents
    1. Design tokens (colors, fonts, shadows)  <- change brand colors here
    2. Reset & base
    3. Layout helpers (container, section, pill, buttons)
    4. Scroll reveal animation
    5. Header (top bar, nav, dropdown, mobile drawer)
    6. Hero slider
    7. Home sections (about, process, services, counters, blog)
    8. Inner pages (page banner, about, service detail, blog, portfolio, contact)
    9. Footer
   10. Floating buttons (social, go-to-top) & toast
   11. Reduced motion
   Breakpoints used: 640px (sm), 768px (md), 992px, 1024px (lg)
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand colors */
  --primary: #A81032;          /* crimson - buttons, links, accents */
  --primary-hover: #82082A;    /* darker crimson for hover */
  --primary-foreground: #FFFFFF;

  /* Surfaces & text */
  --background: #FCF8FA;       /* page background */
  --foreground: #2C232B;       /* main text */
  --card: #FFFFFF;             /* cards, header */
  --muted-foreground: #676169; /* secondary text */
  --section-alt: #F8F5F6;      /* alternate section background (every second section) */
  --tint: #FFF1F6;             /* light pink tint (pills, icon bubbles) */
  --ink: #1A1A20;              /* dark sections (top bar, footer) */
  --ink-foreground: #FAFAFA;   /* text on dark sections */
  --border: #E6DAE0;
  --destructive: #E7000B;      /* form errors */

  /* Counter panel */
  --counter-panel: #26242C;
  --counter-foreground: #FFFFFF;
  --counter-divider: rgba(255, 255, 255, 0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 16px;

  /* Fonts */
  --font-display: "Jost", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Poppins", ui-sans-serif, system-ui, sans-serif;

  /* Shadows */
  --shadow-soft: 0 10px 30px -12px rgba(43, 28, 38, 0.18);
  --shadow-lift: 0 22px 44px -18px rgba(144, 0, 31, 0.35);

  /* Floating social buttons */
  --social-gloss-background: linear-gradient(145deg, #F1EFF0 20%, #DDDADC 100%);
  --social-ring: #CFCBCE;
  --social-halo-background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(226, 223, 225, 0.9));
  --social-halo-border: rgba(255, 255, 255, 0.75);
  --social-shadow: 0 6px 13px rgba(0, 0, 0, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.95);
  --social-shadow-hover: 0 8px 17px rgba(0, 0, 0, 0.36), inset 0 2px 2px rgba(255, 255, 255, 0.95);
}

@media (min-width: 1024px) {
  :root {
    --social-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.95);
    --social-shadow-hover: 0 9px 19px rgba(0, 0, 0, 0.36), inset 0 2px 3px rgba(255, 255, 255, 0.95);
  }
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: inherit;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
figure { margin: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Visible only to screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Inline SVG icons (lucide). Default 24px, use modifiers to resize */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 20px; height: 20px; }
.icon--lg { width: 28px; height: 28px; }
.icon--xl { width: 40px; height: 40px; }


/* ==========================================================================
   3. LAYOUT HELPERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .container { padding-inline: 2rem; } }

.section { padding-block: 56px; background: var(--card); }
@media (min-width: 992px) { .section { padding-block: 96px; } }

.section--card { background: var(--card); }
.section--alt { background: var(--section-alt); }
.section--relative { position: relative; overflow: hidden; }

/* Space between main content and fixed header.
   overflow-x: clip stops the slide-in reveal animations from causing sideways scroll on phones */
.site-main { padding-top: 64px; overflow-x: clip; }
@media (min-width: 1024px) { .site-main { padding-top: 120px; } }

/* Small label above headings */
.pill {
  display: inline-block;
  background: var(--tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Section heading (pill + h2) */
.section-head { margin: 0 auto 40px; max-width: 672px; text-align: center; }
.section-title { margin-top: 16px; font-size: 30px; line-height: 1.2; }
@media (min-width: 768px) { .section-title { font-size: 42px; line-height: 1.25; } }
@media (min-width: 992px) { .section-head { margin-bottom: 56px; } }

/* Buttons */
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.btn-primary:disabled { opacity: 0.6; }
.btn-primary:disabled:hover { transform: none; box-shadow: none; background: var(--primary); }
.btn-outline {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  transition: all 0.2s;
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-2px);
}
.btn--block { width: 100%; justify-content: center; }

/* Tick list (check icon + text) */
.tick-list { margin-top: 24px; display: grid; gap: 12px; }
.tick-list li { display: flex; align-items: center; gap: 12px; }
.tick-list .icon { color: var(--primary); }

/* Floating decorative animation */
.float-y { animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }


/* ==========================================================================
   4. SCROLL REVEAL (see js/animations.js)
   Add data-reveal="up|left|right" and optional data-delay="0.12" in HTML.
   Only active when JavaScript is running (html.js), so content never hides
   if JS fails.
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.js [data-reveal="up"] { transform: translateY(24px); }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }


/* ==========================================================================
   5. HEADER (injected by js/layout.js)
   ========================================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; }

/* Top bar (desktop only) */
.topbar {
  display: none;
  overflow: hidden;
  height: 40px;
  background: var(--ink);
  color: var(--ink-foreground);
  font-size: 13.5px;
  transition: height 0.3s;
}
@media (min-width: 1024px) { .topbar { display: block; } }
.site-header.is-scrolled .topbar { height: 0; }
.topbar__inner { display: flex; height: 40px; align-items: center; justify-content: space-between; }
.topbar__social, .topbar__contact { display: flex; align-items: center; }
.topbar__social { gap: 14px; }
.topbar__contact { gap: 32px; }
.topbar a { display: flex; align-items: center; transition: color 0.2s; }
.topbar a:hover { color: var(--primary); }
.topbar__contact a { gap: 8px; }

/* Main header bar */
.header-bar { background: var(--card); transition: all 0.3s; }
.site-header.is-scrolled .header-bar { box-shadow: var(--shadow-soft); }
.header-bar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; transition: all 0.3s;
}
@media (min-width: 1024px) {
  .header-bar__inner { height: 80px; }
  .site-header.is-scrolled .header-bar__inner { height: 68px; }
}
.header-logo { flex-shrink: 0; }
.header-logo img { height: 40px; width: auto; transition: all 0.3s; }
@media (min-width: 1024px) {
  .header-logo img { height: 50px; }
  .site-header.is-scrolled .header-logo img { height: 42px; }
}

/* Desktop navigation */
.main-nav { display: none; align-items: center; gap: 28px; }
@media (min-width: 1024px) { .main-nav { display: flex; } }

.nav-link {
  position: relative;
  font-size: 15.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--primary); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

/* Services dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { display: flex; align-items: center; gap: 4px; }
.nav-dropdown > .nav-link .icon { transition: transform 0.15s; }
.nav-dropdown:hover > .nav-link .icon { transform: rotate(180deg); }
.nav-dropdown__panel {
  position: absolute; left: 50%; top: 100%;
  width: 256px; padding-top: 20px;
  transform: translateX(-50%);
  visibility: hidden; opacity: 0;
  transition: opacity 0.15s, visibility 0.15s;
}
.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown:focus-within .nav-dropdown__panel { visibility: visible; opacity: 1; }
.nav-dropdown__panel ul {
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.nav-dropdown__panel a {
  display: block; padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
}
.nav-dropdown__panel a:hover { background: var(--tint); color: var(--primary); }

/* Get A Quote button (desktop) */
.header-cta { display: none; height: 44px; padding-inline: 22px; font-size: 15px; }
@media (min-width: 1024px) { .header-cta { display: inline-flex; } }

/* Mobile menu button */
.menu-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--foreground);
}
@media (min-width: 1024px) { .menu-btn { display: none; } }

/* Mobile drawer (slides in from right) */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0; transition: opacity 0.15s;
}
.drawer__panel {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 85vw; max-width: 384px;
  padding: 24px;
  overflow-y: auto;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); transition-duration: 0.5s; }
.drawer__close {
  position: absolute; right: 16px; top: 16px;
  opacity: 0.7; border-radius: 4px; transition: opacity 0.2s;
}
.drawer__close:hover { opacity: 1; }
.drawer__logo { height: 40px; width: auto; margin-bottom: 24px; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link {
  display: flex; align-items: center;
  min-height: 44px; padding-block: 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.drawer__link.is-active { color: var(--primary); }
.drawer__cta { margin-top: 24px; }

/* Drawer accordion (Services) */
.accordion { border-bottom: 1px solid var(--border); }
.accordion__trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  min-height: 44px; padding-block: 12px;
  text-align: left; font-size: 16px; font-weight: 500;
}
.accordion__trigger:hover { text-decoration: underline; }
.accordion__trigger .icon { color: var(--muted-foreground); transition: transform 0.2s; }
.accordion.is-open .accordion__trigger .icon { transform: rotate(180deg); }
.accordion__content {
  display: grid; grid-template-rows: 0fr;
  font-size: 14px; transition: grid-template-rows 0.2s ease-out;
}
.accordion.is-open .accordion__content { grid-template-rows: 1fr; }
.accordion__inner { overflow: hidden; }
.accordion__inner > div { padding-bottom: 16px; }
.accordion__inner a { display: block; padding: 10px 0 10px 12px; color: var(--muted-foreground); }
.accordion__inner a:hover { color: var(--primary); }


/* ==========================================================================
   6. HERO SLIDER (see js/hero.js)
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: var(--background); }

/* Desktop background images (cross-fade + mouse parallax) */
.hero__bg { display: none; position: absolute; inset: 0; }
@media (min-width: 1024px) { .hero__bg { display: block; } }
.hero__bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: right;
  opacity: 0;
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.05);
  transition: opacity 0.9s, transform 0.6s;
}
.hero__bg img.is-active { opacity: 1; }
.hero__fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--background) 0%, var(--background) 30%, rgba(252, 248, 250, 0.6) 55%, transparent 80%);
}

.hero__inner {
  position: relative;
  display: flex; flex-direction: column;
  padding-top: 40px; padding-bottom: 32px;
}
@media (min-width: 1024px) {
  .hero__inner { min-height: 640px; justify-content: center; padding-top: 64px; padding-bottom: 144px; }
}

.hero__content { max-width: 576px; }
.hero__content.is-in { opacity: 1; transform: none; transition: opacity 0.6s, transform 0.6s; }
.hero__content.is-out { opacity: 0; transform: translateY(-12px); transition: opacity 0.45s, transform 0.45s; }
.hero__content.is-pre { opacity: 0; transform: translateY(24px); transition: none; }

.hero__eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.25em; color: var(--primary); }
.hero__title {
  margin-top: 16px;
  font-size: clamp(32px, 3.7vw, 51px);
  line-height: 1.12;
  font-weight: 700;
}
.hero__title > span { display: block; }
.hero__title .hero__line2 { min-height: 1.12em; }
.hero__type { color: var(--primary); }
.caret {
  display: inline-block;
  width: 3px; height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--primary);
  animation: blink 1s steps(1) infinite;
}
.hero__desc { margin-top: 20px; font-size: 17px; line-height: 1.625; color: var(--muted-foreground); }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero__tagline {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500; letter-spacing: 0.025em;
  color: var(--muted-foreground);
}

/* Mobile hero image */
.hero__mobile-img {
  margin-top: 32px; width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-2xl);
  object-fit: cover;
}
@media (min-width: 1024px) { .hero__mobile-img { display: none; } }

/* Slide navigation card: slim, frosted-glass look */
.hero__nav {
  margin-top: 24px;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(230, 218, 224, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -14px rgba(43, 28, 38, 0.25);
}
@media (min-width: 1024px) {
  .hero__nav {
    position: absolute; left: 32px; right: 32px; bottom: 40px;
    margin: 0 auto; max-width: 1176px; padding: 12px 18px;
  }
}
.hero__tabs { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) {
  /* tabs keep a fixed width and the buttons sit at the far right */
  .hero__tabs { flex: 0 1 auto; grid-template-columns: repeat(3, minmax(0, 236px)); gap: 22px; }
  .hero__nav .hero__controls { margin-left: auto; }
}
.hero__tab { min-height: 36px; text-align: left; }
.hero__bar { display: block; height: 2px; width: 100%; overflow: hidden; border-radius: 4px; background: #E8D3DA; }
.hero__bar-fill { display: block; height: 100%; width: 0; background: var(--primary); }
.hero__tab-label { margin-top: 7px; display: block; font-size: 13px; font-weight: 400; color: #8A7F86; }
.hero__tab.is-active .hero__tab-label { color: var(--primary); }
.hero__tab-label .full { display: none; }
@media (min-width: 1024px) {
  .hero__tab-label .short { display: none; }
  .hero__tab-label .full { display: inline; }
}
.hero__controls { display: flex; flex-shrink: 0; gap: 8px; }
.hero__ctrl {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid #E3B9C4; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.hero__ctrl:hover { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.hero__ctrl .icon-play { display: none; }
.hero__ctrl.is-paused .icon-play { display: block; }
.hero__ctrl.is-paused .icon-pause { display: none; }


/* ==========================================================================
   7. HOME SECTIONS
   ========================================================================== */

/* ---- About preview (also used on About page) ---- */
.about-grid { display: grid; align-items: center; gap: 56px; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-text p { margin-top: 20px; line-height: 1.625; color: var(--muted-foreground); }
.about-text p + p { margin-top: 16px; }
.about-text .btn-primary { margin-top: 32px; }
.about-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.about-actions .btn-primary, .about-text .about-actions .btn-outline { margin-top: 0; }

.workshop { position: relative; margin-right: 12px; }
.workshop__frame {
  position: absolute; inset: 0;
  transform: translate(12px, 12px);
  border: 2px solid rgba(168, 16, 50, 0.4);
  border-radius: var(--radius-2xl);
}
.workshop img {
  position: relative; width: 100%;
  aspect-ratio: 6 / 5; object-fit: cover;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
}
.workshop__badge {
  position: absolute; left: -8px; bottom: 32px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: var(--shadow-lift);
}
@media (min-width: 768px) { .workshop__badge { left: -24px; } }
.workshop__badge strong { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.2; font-weight: 700; }
.workshop__badge span { font-size: 14px; }

/* ---- Process ---- */
.process__mobile { display: block; }
.process__desktop { display: none; }
@media (min-width: 768px) {
  .process__mobile { display: none; }
  .process__desktop { display: block; }
}

/* mobile: vertical list */
.process-list { display: grid; gap: 36px; }
.process-row { display: flex; align-items: flex-start; gap: 24px; text-align: left; }
.process-number {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 8px 0 0 8px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground);
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  outline: 2px solid rgba(168, 16, 50, 0.4); outline-offset: 6px;
}
.process-row h3 { font-size: 24px; line-height: 1.33; font-weight: 600; }
.process-row p { margin-top: 8px; font-size: 17px; line-height: 1.7; color: var(--muted-foreground); }

/* desktop: three columns joined by a solid line (ring + filled circle) */
.process__desktop { --process-bg: var(--section-alt); }
.process__desktop .pill { border-radius: 4px; font-weight: 500; letter-spacing: 0.14em; background: #FDEEF3; }
.process-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.process-grid::before {
  content: ""; position: absolute; z-index: 0;
  left: calc(16.666% - 16px); right: calc(16.666% - 16px); top: 31px;
  height: 2px; background: var(--primary);
}
.process-step { position: relative; z-index: 1; text-align: center; }
.process-step__num {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin: 6px auto 0;
  border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground);
  /* first shadow = gap that hides the line, second = thin pink ring */
  box-shadow: 0 0 0 5px var(--process-bg), 0 0 0 6px #E3A9B8;
  font-family: var(--font-sans); font-size: 20px; font-weight: 500;
  transition: transform 0.2s;
}
.process-step:hover .process-step__num { transform: scale(1.08); }
.process-step h3 { margin-top: 28px; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.process-step p { max-width: 360px; margin: 12px auto 0; font-size: 16px; color: var(--muted-foreground); }

/* ---- Services grid ---- */
.service-deco { position: absolute; pointer-events: none; background: rgba(168, 16, 50, 0.05); }
.service-deco--1 { left: 6%; top: 96px; width: 96px; height: 96px; border-radius: 50%; }
.service-deco--2 { right: 8%; bottom: 80px; width: 128px; height: 128px; border-radius: 24px; rotate: 12deg; }
.service-section { position: relative; }

.grid-3 { display: grid; gap: 24px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 > * { min-width: 0; }

.service-card {
  display: block; height: 100%;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  transition: all 0.3s;
}
.service-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow-lift); }
.service-card__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--tint); color: var(--primary);
  transition: background 0.15s, color 0.15s;
}
.service-card:hover .service-card__icon { background: var(--primary); color: var(--primary-foreground); }
.service-card h3 { margin-top: 24px; font-size: 20px; line-height: 1.4; }
.service-card p { margin-top: 12px; color: var(--muted-foreground); }
.link-more { margin-top: 20px; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--primary); }
.link-more .icon { transition: transform 0.15s; }
.service-card:hover .link-more .icon { transform: translateX(4px); }

/* ---- Counters ---- */
.counters { background: var(--section-alt); padding: 48px 20px; }
@media (min-width: 768px) { .counters { padding: 56px 32px; } }
.counter-panel {
  margin-inline: auto; max-width: 1200px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  padding: 40px 24px;
  border-radius: var(--radius-2xl);
  background: var(--counter-panel); color: var(--counter-foreground);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
@media (min-width: 768px) { .counter-panel { grid-template-columns: repeat(4, 1fr); } }
.counter-column { position: relative; min-width: 0; padding: 22px 8px; }
@media (min-width: 768px) { .counter-column { padding-block: 0; } }
.counter-column strong { display: block; font-size: 40px; font-weight: 700; line-height: 1; }
@media (min-width: 768px) { .counter-column strong { font-size: 56px; } }
.counter-column span { margin-top: 12px; display: block; font-size: 15px; font-weight: 500; }
/* dividers between counters */
.counter-column:nth-child(even)::before { content: ""; position: absolute; left: 0; top: 20%; height: 60%; width: 1px; background: var(--counter-divider); }
.counter-column:nth-child(n+3)::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: var(--counter-divider); }
@media (min-width: 768px) {
  .counter-column:not(:first-child)::before { content: ""; position: absolute; left: 0; top: -16px; height: calc(100% + 32px); width: 1px; background: var(--counter-divider); }
  .counter-column::after { display: none; }
}

/* ---- Blog cards ---- */
.blog-card {
  display: block; height: 100%; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card);
  transition: all 0.15s;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.blog-card__img { overflow: hidden; }
.blog-card__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.5s; }
.blog-card:hover .blog-card__img img { transform: scale(1.05); }
.blog-card__body { padding: 24px; }
.blog-card h3 { margin-top: 16px; font-size: 20px; line-height: 1.375; }
.blog-card p { margin-top: 8px; color: var(--muted-foreground); }
.blog-card .link-more { margin-top: 16px; }
.section-cta { margin-top: 44px; text-align: center; }


/* ==========================================================================
   8. INNER PAGES
   ========================================================================== */

/* ---- Page banner ---- */
.page-banner {
  position: relative; overflow: hidden;
  padding-block: 56px;
  background:
    radial-gradient(circle at 15% 30%, rgba(168, 16, 50, 0.12) 0, transparent 35%),
    radial-gradient(circle at 85% 70%, rgba(168, 16, 50, 0.10) 0, transparent 30%),
    var(--tint);
}
@media (min-width: 1024px) { .page-banner { padding-block: 84px; } }
.page-banner__ring {
  position: absolute; right: -40px; top: 24px; pointer-events: none;
  width: 160px; height: 160px; border-radius: 50%;
  border: 18px solid rgba(168, 16, 50, 0.1);
}
.page-banner__square {
  position: absolute; left: 40px; bottom: 16px; pointer-events: none;
  width: 64px; height: 64px; rotate: 12deg;
  border-radius: var(--radius-xl); background: rgba(168, 16, 50, 0.1);
}
.page-banner__inner { position: relative; text-align: center; animation: fade-up 0.7s ease both; }
.page-banner h1 { font-size: 36px; line-height: 1.11; }
@media (min-width: 1024px) { .page-banner h1 { font-size: 48px; line-height: 1; } }
.breadcrumb {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; color: var(--muted-foreground);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--primary); }

/* ---- About page: founder ---- */
.founder-grid { display: grid; align-items: start; gap: 40px; }
@media (min-width: 1024px) { .founder-grid { grid-template-columns: 55fr 45fr; gap: 64px; } }
.founder__text { display: contents; }
@media (min-width: 1024px) { .founder__text { display: block; } }
.founder__head { order: 1; }
.founder__head h2 { margin-top: 20px; font-size: 30px; line-height: 1.25; }
@media (min-width: 768px) { .founder__head h2 { font-size: 44px; } }
.founder__head h2 span { color: var(--primary); }
.founder__story { order: 3; margin-top: 24px; display: grid; gap: 20px; }
.founder__story p { font-size: 17px; line-height: 1.9; color: var(--muted-foreground); }
.founder__photo { order: 2; }
.founder__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-2xl); box-shadow: var(--shadow-soft);
}
.founder__bar { margin-top: 16px; height: 14px; width: 55%; background: var(--primary); transform-origin: left; }
.js .founder__bar { transform: scaleX(0); transition: transform 0.8s ease 0.4s; }
.js .founder__bar.is-visible { transform: scaleX(1); }
.founder__photo figcaption { margin-top: 12px; font-size: 14px; color: var(--muted-foreground); }

/* ---- About page: "What we do" tiles ---- */
.what-we-do { padding-block: 64px; background: var(--card); }
.what-we-do h2 { margin-bottom: 32px; text-align: center; font-size: 30px; line-height: 1.2; }
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  font-size: 14px; font-weight: 500;
  transition: all 0.15s;
}
.tile .icon { color: var(--primary); }
.tile:hover { transform: translateY(-4px); border-color: var(--primary); color: var(--primary); }

/* ---- Detail pages (service + blog): content + sidebar ---- */
.detail-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 1fr 340px; } }
.detail-grid > * { min-width: 0; }
.detail-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-2xl); }
.detail-img--shadow { box-shadow: var(--shadow-soft); }
.detail h2 { margin-top: 32px; font-size: 30px; line-height: 1.2; }
.detail__intro { margin-top: 16px; font-size: 17px; line-height: 1.625; color: var(--muted-foreground); }
.detail h3 { margin-top: 32px; font-size: 20px; line-height: 1.4; }
.feature-list { margin-top: 16px; display: grid; gap: 12px; }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
.feature-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card);
}
.feature-list .icon { color: var(--primary); }

.sidebar { display: grid; gap: 24px; align-content: start; }
.side-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); }
.side-card h3 { margin: 0 0 16px; font-size: 18px; line-height: 1.55; }
.side-card ul { display: grid; gap: 4px; }
.side-card a {
  display: flex; align-items: center; min-height: 44px;
  padding-inline: 16px; border-radius: var(--radius-md);
  background: var(--tint);
}
.side-card a:hover { color: var(--primary); }
.side-card a.is-active { background: var(--primary); color: var(--primary-foreground); }

/* Dark "Need help right now?" card */
.contact-card { padding: 28px; border-radius: var(--radius-xl); background: var(--ink); color: var(--ink-foreground); }
.contact-card h3 { margin: 0; font-size: 20px; line-height: 1.4; }
.contact-card p { margin-top: 8px; font-size: 14px; opacity: 0.8; }
.contact-card a:not(.btn-primary) { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.contact-card a:not(.btn-primary):hover { color: var(--primary); }
.contact-card .btn-primary { margin-top: 20px; }
.contact-card p + a { margin-top: 20px; }

/* ---- Blog article ---- */
.post-meta { margin-top: 24px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted-foreground); }
.post-body { margin-top: 24px; display: grid; gap: 20px; font-size: 17px; line-height: 1.9; color: var(--muted-foreground); }
.post-back { margin-top: 40px; }

/* ---- Portfolio ---- */
.filters { margin-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.filter-btn {
  min-height: 44px; padding-inline: 20px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card);
  font-size: 14px; font-weight: 500;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.is-active { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.project {
  overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card);
  transition: opacity 0.25s, transform 0.25s;
}
.project.is-hiding { opacity: 0; transform: scale(0.95); }
.project[hidden] { display: none; }
.project__img { overflow: hidden; }
.project__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.5s; }
.project:hover .project__img img { transform: scale(1.05); }
.project__body { padding: 20px; }
.project h3 { margin-top: 12px; font-size: 18px; line-height: 1.55; }

/* ---- Contact page ---- */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.4fr 1fr; } }
.contact-grid > * { min-width: 0; }
.form-card {
  padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  background: var(--card); box-shadow: var(--shadow-soft);
}
@media (min-width: 768px) { .form-card { padding: 40px; } }
.form-card h2 { margin-top: 16px; font-size: 30px; line-height: 1.2; }
.form { margin-top: 32px; display: grid; gap: 20px; }
@media (min-width: 768px) { .form { grid-template-columns: repeat(2, 1fr); } }
.form label { font-size: 14px; font-weight: 500; }
.form__full { grid-column: 1 / -1; }
.field {
  display: block; width: 100%; min-height: 48px; margin-top: 6px;
  padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card);
  outline: none;
  font-weight: 400;
  transition: border-color 0.15s;
}
.field:focus { border-color: var(--primary); }
textarea.field { resize: vertical; }
.field-error { margin-top: 4px; font-size: 14px; color: var(--destructive); font-weight: 400; }

.contact-side { display: grid; gap: 24px; align-content: start; }
.info-card { padding: 32px; border-radius: var(--radius-2xl); background: var(--ink); color: var(--ink-foreground); }
.info-card h3 { font-size: 20px; line-height: 1.4; }
.info-card ul { margin-top: 24px; display: grid; gap: 20px; }
.info-card li, .info-card li a { display: flex; align-items: center; gap: 16px; }
.info-card li a:hover { color: var(--primary); }
.info-card .break-all { word-break: break-all; }
.info-card__icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground);
}
.info-card .btn-primary { margin-top: 32px; }
.map-box {
  display: grid; place-items: center; aspect-ratio: 4 / 3;
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  text-align: center; color: var(--muted-foreground);
  background:
    radial-gradient(circle at 15% 30%, rgba(168, 16, 50, 0.12) 0, transparent 35%),
    radial-gradient(circle at 85% 70%, rgba(168, 16, 50, 0.10) 0, transparent 30%),
    var(--tint);
}
.map-box .icon { margin: 0 auto; color: var(--primary); }
.map-box p { margin-top: 8px; }


/* ==========================================================================
   9. FOOTER (injected by js/layout.js)
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(250, 250, 250, 0.8); }
.footer-grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; padding-top: 56px; padding-bottom: 32px; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid > * { min-width: 0; }
.footer-logo { display: inline-block; padding: 12px; border-radius: var(--radius-lg); background: var(--card); }
.footer-logo img { height: 48px; width: auto; }
.footer-blurb { margin-top: 12px; font-size: 14px; line-height: 1.625; }
.footer-social { margin-top: 12px; display: flex; gap: 12px; }
.footer-social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--ink-foreground); transition: color 0.2s;
}
.footer-social a:hover { color: var(--primary); }
.site-footer h3 { margin-bottom: 16px; font-size: 18px; line-height: 1.55; color: var(--ink-foreground); }
.footer-links { display: grid; gap: 10px; font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-contact { display: grid; gap: 12px; font-size: 14px; }
.footer-contact li, .footer-contact a { display: flex; gap: 12px; }
.footer-contact a:hover { color: var(--primary); }
.footer-contact .icon { margin-top: 2px; }
.footer-contact span { min-width: 0; overflow-wrap: anywhere; }

.footer-bottom { border-top: 1px solid rgba(250, 250, 250, 0.1); }
.footer-bottom__inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding-top: 18px; padding-bottom: 18px; font-size: 14px;
}
@media (min-width: 768px) {
  .footer-bottom__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Phone + tablet footer: nothing may sit under the floating buttons.
   - right gutter keeps text clear of the "Go To Top" tab
   - extra bottom space keeps the last lines clear of the social pill */
@media (max-width: 1023px) {
  .site-footer .container { padding-right: 46px; }
  .footer-bottom__inner { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}


/* ==========================================================================
   10. FLOATING BUTTONS & TOAST
   ========================================================================== */

/* Glossy round social button */
.social-gloss {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  border-radius: 50%; color: #7A0C26; /* dark crimson icon */
  background: var(--social-halo-background);
  border: 1px solid var(--social-halo-border);
  box-shadow: var(--social-shadow);
  transition: translate 0.2s, scale 0.2s, box-shadow 0.2s, color 0.2s;
}
.social-gloss::before {
  content: ""; position: absolute; inset: 5px; z-index: -1;
  border-radius: inherit;
  background: var(--social-gloss-background);
  border: 1px solid var(--social-ring);
  box-shadow: inset 0 2px 3px var(--social-halo-border);
}
@media (min-width: 1024px) { .social-gloss::before { inset: 6px; } }
.social-gloss:hover { translate: 0 -3px; scale: 1.08; color: #5E061C; box-shadow: var(--social-shadow-hover); }

.social-gloss .tip {
  position: absolute; pointer-events: none; white-space: nowrap;
  padding: 4px 10px; border-radius: var(--radius-md);
  background: var(--ink); color: var(--ink-foreground);
  font-size: 12px; line-height: 1.33; opacity: 0; transition: opacity 0.15s;
}
.social-gloss:hover .tip { opacity: 1; }

/* Left vertical social bar (desktop) */
.float-social { display: none; position: fixed; left: 20px; top: 50%; z-index: 40; transform: translateY(-50%); flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .float-social { display: flex; } }
.float-social .social-gloss { width: 44px; height: 44px; opacity: 0; transform: translateX(-20px); }
.float-social .social-gloss.is-in { opacity: 1; transform: none; transition: opacity 0.5s ease-out, transform 0.5s ease-out, translate 0.2s, scale 0.2s, box-shadow 0.2s, color 0.2s; }
.float-social .tip { left: 100%; margin-left: 12px; }

/* Bottom-right social pill (mobile) */
.float-pill {
  position: fixed; right: 14px; bottom: 18px; z-index: 40;
  display: flex; gap: 8px;
  padding: 5px 7px max(5px, env(safe-area-inset-bottom));
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow-soft);
}
@media (min-width: 1024px) { .float-pill { display: none; } }
.float-pill .social-gloss { width: 38px; height: 38px; opacity: 0; }
.float-pill .social-gloss.is-in { opacity: 1; transition: opacity 0.5s, translate 0.2s, scale 0.2s, box-shadow 0.2s, color 0.2s; }
.float-pill .tip { bottom: 100%; margin-bottom: 12px; }

/* Go to top (vertical tab): line and text sit in one centered column.
   Turns light (class .on-dark, set in js/layout.js) when it is over the dark footer. */
.go-top {
  /* mobile: sits at the right screen border, just above the social pill */
  position: fixed; right: 4px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 40;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.go-top.is-visible { opacity: 1; visibility: visible; }
@media (min-width: 1024px) { .go-top { bottom: 40px; right: 24px; } }
.go-top-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px;
  width: 28px; padding: 0; color: var(--primary);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; line-height: 1;
  transition: color 0.2s;
}
@media (min-width: 768px) { .go-top-tab { font-size: 13px; } }
.go-top-tab:hover { color: var(--primary-hover); }
.go-top-line { display: block; width: 2px; height: 44px; flex-shrink: 0; background: currentColor; transition: height 0.2s; }
@media (min-width: 768px) { .go-top-line { height: 44px; } }
.go-top-tab:hover .go-top-line { height: 48px; }
@media (min-width: 768px) { .go-top-tab:hover .go-top-line { height: 58px; } }
.go-top-text { display: block; writing-mode: vertical-rl; letter-spacing: 0.04em; line-height: 1; }
.go-top.on-dark .go-top-tab, .go-top.on-dark .go-top-tab:hover { color: var(--ink-foreground); }

/* Toast message (contact form) */
.toast {
  position: fixed; top: 16px; left: 50%; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: min(356px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 13px; line-height: 1.5;
  opacity: 0; transform: translate(-50%, -16px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { width: 16px; height: 16px; color: #00A63E; }
.toast--error .icon { color: var(--destructive); }


/* ==========================================================================
   11. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .social-gloss:hover { translate: none; scale: 1; }
}
