/* ============================================
   PRIMASONIC SPECTRUM — DESIGN TOKENS (FRESH/BOLD EDITION)
   ============================================ */
:root {
  --bg: #fffcf8;
  --bg-peach: #ffede1;
  --bg-blue-tint: #eef2ff;
  --surface: #ffffff;

  --blue: #2f5bff;
  --blue-deep: #1e3fcc;
  --blue-pale: #e7ecff;
  --coral: #ff5a5f;
  --coral-deep: #e8383e;
  --peach: #ffb27a;
  --peach-deep: #ff9955;

  --grad-main: linear-gradient(120deg, var(--blue) 0%, var(--coral) 100%);
  --grad-warm: linear-gradient(120deg, var(--coral) 0%, var(--peach) 100%);
  --grad-cool: linear-gradient(120deg, var(--blue-deep) 0%, var(--blue) 100%);

  --ink-900: #14162b;
  --ink-600: #565a72;
  --ink-400: #8a8fa8;
  --white: #ffffff;

  --footer-bg: #14162b;

  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1240px;
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 3px;
  background: var(--grad-main);
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

/* ============================================
   SIGNATURE MOTIF — audio waveform bars
   ============================================ */
.waveform {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.waveform span {
  display: block;
  width: 5px;
  border-radius: 3px;
  background: var(--grad-main);
}

@keyframes pulseBar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.waveform.animated span {
  animation: pulseBar 1.2s ease-in-out infinite;
  transform-origin: bottom;
}
.waveform.animated span:nth-child(2) { animation-delay: 0.1s; }
.waveform.animated span:nth-child(3) { animation-delay: 0.2s; }
.waveform.animated span:nth-child(4) { animation-delay: 0.3s; }
.waveform.animated span:nth-child(5) { animation-delay: 0.15s; }
.waveform.animated span:nth-child(6) { animation-delay: 0.35s; }
.waveform.animated span:nth-child(7) { animation-delay: 0.05s; }
.waveform.animated span:nth-child(8) { animation-delay: 0.25s; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 252, 248, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 22, 43, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 46px;
  width: auto;
  display: block;
}

.logo span {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-400);
  text-transform: uppercase;
}

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

.nav-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-600);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--blue); }

.nav-cta {
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--grad-main);
  color: var(--white) !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.02em !important;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink-900); }

/* ============================================
   TILE HERO
   ============================================ */
.tile-hero {
  padding: 190px 0 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.tile-hero::before {
  content: '';
  position: absolute;
  top: -25%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255,90,95,0.16) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.tile-hero::after {
  content: '';
  position: absolute;
  top: 5%;
  left: -12%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(47,91,255,0.14) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.tile-hero .container { position: relative; z-index: 1; }

.tile-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  max-width: 880px;
  margin-bottom: 24px;
}

.tile-hero h1 .grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tile-hero p {
  font-size: 18px;
  color: var(--ink-600);
  max-width: 600px;
  margin-bottom: 38px;
  font-weight: 400;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 60px;
}

.solution-tile {
  position: relative;
  aspect-ratio: 5/4;
  background: var(--surface);
  border: 1.5px solid rgba(20,22,43,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  padding: 26px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(20,22,43,0.04);
}

.solution-tile:nth-child(1) .solution-tile-icon-wrap { background: var(--blue-pale); }
.solution-tile:nth-child(2) .solution-tile-icon-wrap { background: var(--bg-peach); }
.solution-tile:nth-child(3) .solution-tile-icon-wrap { background: var(--bg-blue-tint); }
.solution-tile:nth-child(4) .solution-tile-icon-wrap { background: var(--bg-peach); }
.solution-tile:nth-child(5) .solution-tile-icon-wrap { background: var(--blue-pale); }

.solution-tile:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: 0 20px 40px rgba(47,91,255,0.16);
}

.solution-tile-icon-wrap {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.solution-tile-icon { width: 24px; height: 24px; }

.solution-tile h4 {
  position: relative;
  color: var(--ink-900);
  font-size: 19px;
  z-index: 2;
}

.solution-tile span {
  position: relative;
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  z-index: 2;
  font-weight: 600;
}

.solution-tile.hot {
  background: var(--grad-warm);
  border-color: transparent;
}
.solution-tile.hot .solution-tile-icon-wrap { background: rgba(255,255,255,0.25); }
.solution-tile.hot h4, .solution-tile.hot span { color: var(--white) !important; opacity: 1 !important; }

/* ============================================
   SOLUTION TILE — background photo layer
   ============================================ */
.solution-tile-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.solution-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.solution-tile-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,15,0.82) 0%, rgba(10,10,15,0.35) 55%, rgba(10,10,15,0.1) 100%);
}
/* When a photo is present, force text/icon to white for legibility */
.solution-tile.has-photo h4,
.solution-tile.has-photo span { color: var(--white) !important; }
.solution-tile.has-photo .solution-tile-icon-wrap { background: rgba(255,255,255,0.18) !important; }
.solution-tile.has-photo .solution-tile-icon-wrap svg * { stroke: #ffffff !important; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-gold {
  background: var(--grad-main);
  color: var(--white);
}
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(47,91,255,0.28); }

.btn-outline {
  border-color: rgba(20,22,43,0.18);
  color: var(--ink-900);
  background: transparent;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ============================================
   COUNTER STRIP
   ============================================ */
.counter-strip {
  background: var(--ink-900);
  padding: 70px 0;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.counter-item { border-right: 1px solid rgba(255,255,255,0.12); }
.counter-item:last-child { border-right: none; }

.counter-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(120deg, #ff9a6c, #ff5a5f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 10px;
}

.counter-label {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ============================================
   LOGO STRIP
   ============================================ */
.logo-strip {
  padding: 50px 0;
  background: var(--surface);
  border-bottom: 1px solid rgba(20,22,43,0.08);
}

.logo-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

.logo-strip-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-400);
  transition: color 0.2s ease;
}
.logo-strip-item:hover { color: var(--blue); }

/* ============================================
   SECTION SHELL
   ============================================ */
section { position: relative; background: var(--bg); }
.section-pad { padding: 120px 0; }

.section-head { max-width: 640px; margin-bottom: 60px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 18px; }
.section-head p { font-size: 17px; color: var(--ink-600); }

/* ============================================
   MILESTONE TIMELINE
   ============================================ */
.timeline-scroll { overflow-x: auto; padding-bottom: 20px; scrollbar-width: thin; scrollbar-color: var(--coral) var(--bg-peach); }

.timeline-track {
  display: flex;
  min-width: max-content;
  border-top: 3px solid var(--bg-peach);
  padding-top: 30px;
}

.timeline-item { width: 220px; padding: 0 24px 0 0; position: relative; flex-shrink: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  top: -38px; left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--grad-main);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 10px;
}

.timeline-item p { font-size: 13.5px; color: var(--ink-600); line-height: 1.5; }

/* ============================================
   SERVICE SPLIT
   ============================================ */
.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.service-visual-block {
  background: var(--grad-cool);
  border-radius: var(--radius);
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  position: relative;
  overflow: hidden;
}

.service-visual-block::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,178,122,0.35), transparent 65%);
  bottom: -15%; right: -15%;
}

.service-text-block { padding: 20px 0 20px 70px; }

.service-list-item {
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(20,22,43,0.08);
}
.service-list-item:first-child { padding-top: 0; }

.service-num {
  font-family: var(--font-display);
  color: var(--coral-deep);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  width: 40px;
}

.service-list-item h4 { font-size: 18px; margin-bottom: 6px; }
.service-list-item p { font-size: 14px; color: var(--ink-600); }

/* ============================================
   CASE STUDY CARDS
   ============================================ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.case-card {
  background: var(--surface);
  border: 1.5px solid rgba(20,22,43,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 10px rgba(20,22,43,0.04);
}
.case-card:hover { transform: translateY(-6px); border-color: var(--coral); box-shadow: 0 20px 40px rgba(255,90,95,0.14); }

.case-card-visual {
  aspect-ratio: 4/3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-card:nth-child(1) .case-card-visual { background: var(--grad-cool); }
.case-card:nth-child(2) .case-card-visual { background: var(--grad-warm); }
.case-card:nth-child(3) .case-card-visual { background: linear-gradient(135deg, var(--blue), var(--peach)); }
.case-card:nth-child(4) .case-card-visual { background: linear-gradient(135deg, var(--coral), var(--blue-deep)); }

.case-card-body { padding: 22px; }

.case-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 10px;
  display: block;
}

.case-card h4 { font-size: 16px; line-height: 1.4; font-weight: 600; }

/* ============================================
   DUAL CTA BANNER
   ============================================ */
.dual-cta { display: grid; grid-template-columns: 1fr 1fr; }

.dual-cta-panel { padding: 70px 60px; }
.dual-cta-panel.navy { background: var(--grad-cool); color: var(--white); }
.dual-cta-panel.gold { background: var(--grad-warm); color: var(--white); }

.dual-cta-panel h3 { color: inherit; font-size: 26px; margin-bottom: 14px; }
.dual-cta-panel p { font-size: 14.5px; opacity: 0.92; margin-bottom: 26px; max-width: 380px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.6);
  padding: 70px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-logo img {
  height: 50px;
  width: auto;
  display: block;
}

.footer-tagline {
  background: linear-gradient(120deg, #ff9a6c, #ff5a5f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
}

.footer-col h5 {
  color: var(--white);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col ul li { margin-bottom: 12px; font-size: 13.5px; }
.footer-col ul li a:hover { color: var(--peach); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   PROJECT IMAGE MARQUEE
   ============================================ */
.marquee-section {
  background: var(--surface);
  padding: 60px 0;
  overflow: hidden;
  border-top: 1px solid rgba(20,22,43,0.08);
  border-bottom: 1px solid rgba(20,22,43,0.08);
}

.marquee-head {
  margin-bottom: 32px;
}

.marquee-track-wrap {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}

.marquee-track-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  position: relative;
  width: 320px;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grad-cool);
}

.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marquee-item .marquee-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-cool);
}

.marquee-fallback span {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.marquee-item .marquee-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  z-index: 2;
}

/* ============================================
   GALLERY GRID (homepage project photos)
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--grad-cool);
}

.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item .marquee-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item .marquee-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 980px) {
  .marquee-item { width: 260px; height: 180px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-item.wide { grid-column: span 2; }
  .gallery-item.tall { grid-row: span 1; }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-grid { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .counter-item:nth-child(2) { border-right: none; }
  .service-split { grid-template-columns: 1fr; gap: 40px; }
  .service-text-block { padding: 0; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .dual-cta { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 78px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px 32px;
    gap: 20px;
    border-bottom: 1px solid rgba(20,22,43,0.08);
  }
  .nav-links.nav-open { display: flex; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .solutions-grid { grid-template-columns: 1fr; }
  .counter-grid { grid-template-columns: 1fr 1fr; }
  .counter-item:nth-child(2) { border-right: 1px solid rgba(255,255,255,0.12); }
  .case-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-item.wide { grid-column: span 1; }
  .marquee-item { width: 220px; height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
