/* ============================================
   PRISM SALES CORPORATION — Design Tokens
   ============================================ */

:root {
  /* Warm light base (default) */
  --bg: #f4f1ea;
  --bg-raised: #ffffff;
  --surface: #ecead0;
  --surface-2: #e2dfd0;
  --border: #d8d4c5;
  --border-strong: #b8b3a0;

  --ink: #12120f;
  --ink-dim: #2e2b23;
  --ink-soft: #524e44;

  /* Prism-derived accents */
  --accent-orange: oklch(0.65 0.17 45);
  --accent-red:    oklch(0.55 0.19 25);
  --accent-violet: oklch(0.42 0.18 295);
  --accent-lime:   oklch(0.70 0.20 130);
  --accent-amber:  oklch(0.70 0.16 75);

  --accent: var(--accent-orange);

  /* Type */
  --f-display: Cambria, Georgia, "Times New Roman", serif;
  --f-display-black: Cambria, Georgia, "Times New Roman", serif;
  --f-sans: Cambria, Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --radius: 2px;
  --radius-lg: 6px;
}

/* Dark theme variant (opt-in) */
[data-theme="dark"] {
  --bg: #0e0e0c;
  --bg-raised: #161613;
  --surface: #1a1a16;
  --surface-2: #22221d;
  --border: #2a2a23;
  --border-strong: #3a3a30;
  --ink: #f4f1ea;
  --ink-dim: #a5a196;
  --ink-soft: #6e6a5f;
  --accent-orange: oklch(0.72 0.17 55);
  --accent-lime:   oklch(0.88 0.20 120);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
}

html, body {
  color: var(--ink);
  font-family: Cambria, Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  scroll-behavior: smooth;
}

body {
  /* overflow-x must stay visible — any overflow-x:hidden promotes body to a
     scroll container, which breaks position:sticky inside hero-scroll. */
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/prism-logo.png") center center / 600px auto no-repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

/* Subtle film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Type utilities */
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}
.display {
  font-family: var(--f-display-black);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.92;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-dim);
}

/* Layout container */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 900px) { .container { padding: 0 24px; } }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Corner marks (technical aesthetic) */
.corner-frame {
  position: relative;
}
.corner-frame::before,
.corner-frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink-dim);
  pointer-events: none;
}
.corner-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.corner-frame::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* Placeholder product image — moody studio look */
.product-img {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 30%, var(--surface) 0%, var(--surface-2) 55%, var(--bg) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}
.product-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 40px,
    color-mix(in oklch, var(--ink) 4%, transparent) 40px,
    color-mix(in oklch, var(--ink) 4%, transparent) 80px
  );
}
.product-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, color-mix(in oklch, var(--accent) 12%, transparent), transparent 70%);
}
.product-img .label {
  position: relative;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  padding: 8px 14px;
  border: 1px dashed var(--border-strong);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ============================================
   HOVER + ANIMATION LAYER
   ============================================ */

/* Reveal-on-load */
.reveal {
  animation: revealUp 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Slow rotate */
@keyframes slowRotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Float prism (About + Group pages) */
@keyframes floatPrism {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(3deg); }
}

/* Generic hover lift */
.hover-lift {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px color-mix(in oklch, var(--ink) 10%, transparent);
}

/* Timeline row hover — slides accent from left */
.timeline-row {
  position: relative;
}
.timeline-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0.08;
}
.timeline-row:hover::before { width: 100%; }
.timeline-row:hover .arrow { transform: translateX(6px); color: var(--accent); }
.timeline-row:hover {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Value-card hover — diagonal accent sweep */
.value-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, color-mix(in oklch, var(--accent) 10%, transparent) 100%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.value-card:hover::after { opacity: 1; }
.value-card:hover { background: color-mix(in oklch, var(--surface) 60%, var(--bg)); }

/* Capability card hover */
.capability {
  position: relative;
}
.capability::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.capability:hover::before { transform: scaleX(1); }
.capability:hover { background: color-mix(in oklch, var(--surface) 50%, var(--bg)); }

/* Group card hover */
.group-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 100px color-mix(in oklch, var(--ink) 12%, transparent);
}

/* Product card image zoom + shimmer */
.product-img {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.product-img:hover {
  transform: scale(1.015);
}
.product-img:hover::after {
  background: radial-gradient(ellipse 70% 60% at 50% 40%,
    color-mix(in oklch, var(--accent) 22%, transparent), transparent 70%);
}

/* Shimmer sweep across product cards on hover */
.product-img::before {
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.product-img:hover::before {
  transform: translateX(20px);
}

/* Button subtle press */
.btn { transition: transform 0.18s, background 0.2s, border-color 0.2s, color 0.2s; }
.btn:active { transform: translateY(1px) scale(0.985); }

/* Chip tap */
.chip:active { transform: scale(0.96); }

/* Underline slide for text links in footer/menu rows */
.mm-row {
  position: relative;
}
.mm-row::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mm-row:hover::after { width: 100%; }

/* Stagger reveal children */
.stagger > * {
  animation: revealUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }
.stagger > *:nth-child(5) { animation-delay: 0.33s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* Marquee ticker */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: scroll-x 40s linear infinite;
  padding-left: 48px;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.marquee-item::after {
  content: "◆";
  color: var(--accent);
  font-size: 10px;
}

/* Section rhythm */
section { position: relative; }

.sec-head {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
}
@media (max-width: 900px) {
  .sec-head { grid-template-columns: 1fr; }
}

.sec-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.sec-title {
  font-family: var(--f-display-black);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* Page transitions */
.page { animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animated hero prism */
.prism-canvas {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prism-canvas .ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Form inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
}
.textarea { resize: vertical; min-height: 120px; }
.label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

/* Divider */
.rule { height: 1px; background: var(--border); border: 0; }
.rule-strong { height: 1px; background: var(--border-strong); border: 0; }

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Logo mark scaled */
.logo-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  background-image: url("assets/prism-logo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================
   RESPONSIVE — Mobile & Tablet
   ============================================ */

/* Nav states */
.nav-links   { display: flex; align-items: center; gap: 4px; }
.nav-burger  { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }

/* Mobile full-screen nav panel */
.mob-nav {
  display: none;
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  flex-direction: column;
  padding: 72px 24px 40px;
  overflow-y: auto;
}
.mob-nav.open { display: flex; }
.mob-nav-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: 1px solid var(--border-strong);
  padding: 8px 14px; cursor: pointer;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--ink);
}
.mob-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--f-display-black);
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase;
  cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
  color: var(--ink); width: 100%; text-align: left;
}
.mob-nav-item:last-of-type { border-bottom: 1px solid var(--border); }

/* ---- Tablet (≤ 900px) ---- */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {
  /* Nav */
  .nav-links    { display: none !important; }
  .nav-burger   { display: flex !important; align-items: center; gap: 10px; }
  .nav-bar-sticky .container { padding: 12px 16px !important; }
  .nav-logo-text { display: none !important; }

  /* iOS input zoom fix */
  input, textarea, select { font-size: 16px !important; }

  /* Prevent timeline hover padding shift on touch */
  .timeline-row:hover { padding-left: 0 !important; padding-right: 0 !important; }

  /* Hero scroll header — show only 2 of 5 cols */
  .hs-hdr  { grid-template-columns: 1fr 1fr !important; }
  .hs-hdr-hide { display: none !important; }

  /* Hero scroll — progress rail hidden */
  .hs-rail { display: none !important; }

  /* Hero scroll — product lines: 4-col → 2-col */
  .hs-lines-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* Hero scroll — building SVG uses 80vw already, fine */

  /* Home — client logos outer */
  .cl-outer { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* Home — client logos inner */
  .cl-inner { grid-template-columns: repeat(2, 1fr) !important; }

  /* Home — product lines section */
  .pl-grid  { grid-template-columns: 1fr !important; gap: 32px !important; }
  .pl-sticky { position: static !important; }

  /* Home — certifications */
  .cert-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Home — value props */
  .vp-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Home — featured products */
  .feat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }

  /* Home — testimonials */
  .testi-grid { grid-template-columns: 1fr !important; }
  .testi-grid > div { border-right: none !important; border-bottom: 1px solid var(--border) !important; min-height: auto !important; }

  /* Home — projects row */
  .proj-row  { grid-template-columns: 40px 1fr 80px !important; gap: 12px !important; }
  .proj-hide { display: none !important; }

  /* Home — RFQ */
  .rfq-grid  { grid-template-columns: 1fr !important; }
  .rfq-right { display: none !important; }

  /* Home — CTA strip */
  .cta-grid  { grid-template-columns: 1fr !important; gap: 28px !important; }

  /* About */
  .abt-main  { grid-template-columns: 1fr !important; gap: 40px !important; }
  .abt-img   { display: none !important; }
  .abt-vals  { grid-template-columns: 1fr !important; }
  .abt-stats { grid-template-columns: repeat(3, 1fr) !important; }
  .abt-loc   { grid-template-columns: 1fr !important; }
  .abt-loc > div { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .abt-cta   { grid-template-columns: 1fr !important; gap: 24px !important; }

  /* Contact */
  .con-grid  { grid-template-columns: 1fr !important; gap: 0 !important; padding-bottom: 0 !important; }
  .con-hdr   { grid-template-columns: 1fr 1fr !important; }
  .con-hdr-hide { display: none !important; }

  /* Footer */
  .ft-grid   { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .ft-brand  { grid-column: span 2 !important; }

  /* Mega menu */
  .mm-grid   { grid-template-columns: 1fr !important; gap: 24px !important; }
  .mm-desc   { display: none !important; }
  .mm-contact{ display: none !important; }
  .mm-cats   { grid-template-columns: 1fr !important; }

  /* Section spacing */
  .mob-mt-60  { margin-top: 60px !important; }
  .mob-mt-80  { margin-top: 80px !important; }
  section.container { margin-top: 60px; }

  /* Catalog */
  .cat-card-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .cat-dense-wrap { min-width: 0; }
  .cat-dense-wrap > div { min-width: 680px; }
  .cat-spec-row   { grid-template-columns: 60px 1fr !important; gap: 12px !important; }
  .cat-spec-row > div:nth-child(3),
  .cat-spec-row > div:nth-child(4) { display: none !important; }

  /* Product */
  .prod-hero-grid    { grid-template-columns: 1fr !important; gap: 32px !important; }
  .prod-spec-grid    { grid-template-columns: 1fr !important; }
  .prod-related-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }

  /* Banner */
  .banner-swipe-img  { height: clamp(180px, 52vw, 300px) !important; object-fit: cover !important; }

  /* Page header strips (breadcrumbs) */
  .page-hdr-strip    { flex-wrap: wrap !important; row-gap: 4px !important; }
  .page-hdr-strip .bc-mid { display: none !important; }

  /* Hero scroll — mobile layout tweaks (scroll animation preserved) */
  .hs-footer     { display: none !important; }
  .hs-rail       { display: none !important; }
  .hs-hdr-hide   { display: none !important; }
  .hs-footer-mid { display: none !important; }
  .hs-lines-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* About — vision/mission */
  .abt-vm-grid   { grid-template-columns: 1fr !important; }
  .abt-vm-box    { padding: 32px 24px !important; }

  /* About — leadership */
  .abt-lead-grid { grid-template-columns: 1fr !important; }
  .abt-lead-box  { padding: 28px 24px !important; }

  /* Certifications gallery */
  .cert-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* Careers */
  .car-why-grid  { grid-template-columns: 1fr !important; }
  .car-job-row   { grid-template-columns: 1fr !important; gap: 16px !important; }
  .car-apply-cta { grid-template-columns: 1fr !important; gap: 16px !important; padding: 28px 24px !important; }

  /* Group */
  .grp-card-inner { grid-template-columns: 1fr !important; min-height: auto !important; }
  .grp-left       { min-height: 240px !important; }
  .grp-right-info { padding: 28px 24px !important; }
  .grp-cap-grid   { grid-template-columns: repeat(2, 1fr) !important; }
  .grp-cta-grid   { grid-template-columns: 1fr !important; gap: 28px !important; }

  /* Catalog */
  .cat-doc-strip  { flex-wrap: wrap !important; row-gap: 4px !important; }
  .cat-doc-strip .bc-mid { display: none !important; }
  .cat-price-grid { grid-template-columns: 1fr !important; }

  /* CTA boxes padding */
  .cta-box        { padding: 40px 24px !important; }

  /* Contact form inner */
  .con-form-inner { padding: 28px 20px 32px !important; }
}

/* ---- Small phones (≤ 480px) ---- */
@media (max-width: 480px) {
  .feat-grid { grid-template-columns: 1fr !important; }
  .vp-grid   { grid-template-columns: 1fr !important; }
  .cert-grid { grid-template-columns: 1fr !important; }
  .cl-inner  { grid-template-columns: repeat(2, 1fr) !important; }
  .ft-grid   { grid-template-columns: 1fr !important; }
  .ft-brand  { grid-column: span 1 !important; }
  .hs-lines-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Hero stamp hidden on very small screens — clashes with title */
  .hs-stamp  { display: none !important; }
  /* Nav bar padding */
  .nav-bar-sticky .container { padding: 12px 16px !important; }

  /* Catalog small phones */
  .cat-card-grid     { grid-template-columns: 1fr !important; }
  .prod-related-grid { grid-template-columns: 1fr !important; }
}
