/* ============================================
   Tafra — Corporate Website Styles
   ============================================ */

:root {
  --color-primary: #1a1361;
  --color-primary-dark: #110a44;
  --color-primary-light: #2d227a;
  --color-accent: #5b4fd4;
  --color-red: #c0243c;
  --color-red-light: #e63355;
  --color-teal: #0ea5e9;
  --color-teal-light: #38bdf8;
  --color-text: #0f0a3d;
  --color-text-muted: #5a5775;
  --color-text-light: #8a87a3;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f3fa;
  --color-bg-dark: #0f0a3d;
  --color-border: #e6e4f0;
  --color-border-strong: #c9c5dc;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 10, 61, 0.04);
  --shadow: 0 6px 24px rgba(15, 10, 61, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 10, 61, 0.10);

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 64px 0; } }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--color-text-muted); }
.lead { font-size: 1.125rem; color: var(--color-text-muted); max-width: 640px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}
.eyebrow-red { color: var(--color-red); }

.section-title { margin-bottom: 20px; }
.section-header { max-width: 720px; margin-bottom: 56px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  padding: 8px 0;
}
.btn-ghost:hover { color: var(--color-accent); gap: 12px; }
.btn-ghost::after { content: "→"; transition: transform var(--transition); }
.btn-ghost:hover::after { transform: translateX(4px); }

.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn-white:hover { background: transparent; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 16px rgba(15, 10, 61, 0.08);
}

/* White nav elements over the home hero when transparent */
body.is-home .site-header:not(.scrolled) .nav-menu a { color: rgba(255,255,255,0.9); }
body.is-home .site-header:not(.scrolled) .nav-menu a::after { background: rgba(255,255,255,0.7); }
body.is-home .site-header:not(.scrolled) .nav-logo-img { filter: brightness(0) invert(1); }
body.is-home .site-header:not(.scrolled) .nav-toggle span { background: #fff; }
body.is-home .site-header:not(.scrolled) .nav-cta .btn-primary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
body.is-home .site-header:not(.scrolled) .nav-cta .btn-primary:hover {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}
.nav-logo-mark span {
  background: var(--color-primary);
  border-radius: 2px;
}
.nav-logo-mark span:nth-child(2) { transform: rotate(15deg); background: var(--color-accent); }
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-logo-img-white {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  padding: 8px 0;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px auto;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-menu {
    position: fixed;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav-menu.open { max-height: 400px; }
  .nav-menu li { width: 100%; }
  .nav-menu a {
    display: block;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-menu a::after { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 8, 40, 0.82) 0%,
    rgba(26, 19, 97, 0.68) 55%,
    rgba(10, 8, 40, 0.55) 100%
  );
  z-index: 1;
  pointer-events: none;
}

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

.hero-grid {
  display: block;
  max-width: 800px;
}

.hero-content h1 { margin-bottom: 24px; color: #fff; }
.hero-content .lead { margin-bottom: 36px; font-size: 1.1875rem; color: rgba(255,255,255,0.85); }
.hero .eyebrow { color: #a8a0ff; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.10);
}
.hero .btn-outline:hover {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 0;
  max-width: none;
  margin: 0;
  aspect-ratio: unset;
  box-shadow: none;
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-badge {
  position: absolute;
  bottom: 40px;
  right: 48px;
  background: rgba(255,255,255,0.95);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.hero-badge-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

@media (max-width: 900px) {
  .hero { padding: 100px 0 80px; }
  .hero-grid { max-width: 100%; }
  .hero-badge { right: 20px; bottom: 24px; padding: 14px 18px; }
}

/* ---------- Page header / Banner ---------- */
.page-header {
  padding: calc(76px + 56px) 0 64px;
  background:
    radial-gradient(ellipse at top right, rgba(91, 79, 212, 0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(192, 36, 60, 0.07), transparent 60%),
    var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.page-header h1 { margin-bottom: 16px; }
.page-header .lead { font-size: 1.1875rem; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 12px; }
.card p { margin-bottom: 20px; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eee8ff 0%, #e0d8ff 100%);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.card:nth-child(2) .card-icon { background: linear-gradient(135deg, #ffe8ed 0%, #ffd0d8 100%); color: var(--color-red); }
.card:nth-child(3) .card-icon { background: linear-gradient(135deg, #e0f7fe 0%, #bae8fd 100%); color: var(--color-teal); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
}

.split-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.split-visual::before, .split-visual::after { display: none; }

/* ---------- Partnership banner ---------- */
.partnership {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2a0a4a 50%, var(--color-primary-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.partnership::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(79, 63, 207, 0.4), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(255,255,255,0.05), transparent 50%);
  pointer-events: none;
}
.partnership .container { position: relative; }
.partnership .eyebrow { color: #a8a0ff; }
.partnership h2, .partnership p { color: #fff; }
.partnership p { color: rgba(255,255,255,0.85); }

.partnership-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.partnership-logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  opacity: 0.95;
}
.partnership-x {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
}
.partnership-img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* ---------- CTA section ---------- */
.cta-section {
  background: linear-gradient(135deg, #f0eeff 0%, #fce8ec 100%);
  text-align: center;
}
.cta-section .container { max-width: 720px; }
.cta-section h2 { margin-bottom: 16px; }
.cta-section p { margin-bottom: 32px; font-size: 1.125rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .nav-logo { color: #fff; margin-bottom: 20px; }
.footer-brand .nav-logo-mark span { background: #fff; }
.footer-brand .nav-logo-mark span:nth-child(2) { background: var(--color-accent); }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 320px; }

.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}
.social-links a:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .form-card { padding: 28px; } }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } }

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.form-field label .req { color: #e11d48; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(26, 19, 97, 0.08);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.phone-group { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }

.file-field {
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.file-field:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.file-field input { display: none; }
.file-field-label { color: var(--color-text-muted); font-size: 0.9375rem; }
.file-field-label strong { color: var(--color-primary); }

.form-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  display: none;
}
.form-success.show { display: block; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.faq-q::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 200ms ease;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 24px;
}
.faq-a p { color: var(--color-text-muted); }

/* ---------- Legal page styles ---------- */
.legal {
  max-width: 800px;
  margin: 0 auto;
}
.legal h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
}
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.legal ul { padding-left: 24px; }

/* ---------- Solution category split ---------- */
.solution-category {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 32px;
  transition: all var(--transition);
}
.solution-category:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow);
}
.solution-category.reverse > :first-child { order: 2; }
@media (max-width: 800px) {
  .solution-category { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
  .solution-category.reverse > :first-child { order: 0; }
}
.solution-category .eyebrow { margin-bottom: 12px; }
.solution-category h3 { margin-bottom: 16px; font-size: 1.75rem; }
.solution-category p { margin-bottom: 24px; }

.solution-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.solution-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.solution-visual::before { display: none; }

/* ---------- Product feature list ---------- */
.feature-list { list-style: none; margin: 24px 0; }
.feature-list li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  color: var(--color-text-muted);
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  width: 22px;
  height: 22px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); padding: 32px; } }
.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.stats > div:nth-child(2) .stat-value { color: var(--color-red); }
.stats > div:nth-child(3) .stat-value { color: var(--color-teal); }
.stat-label { font-size: 0.875rem; color: var(--color-text-muted); }

/* ---------- CEO message ---------- */
.ceo-message {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 700px) {
  .ceo-message { grid-template-columns: 1fr; padding: 40px; text-align: center; gap: 24px; }
}
.ceo-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  margin: 0 auto;
}
.ceo-message blockquote {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 20px;
}
.ceo-message .ceo-name { font-weight: 700; color: var(--color-text); }
.ceo-message .ceo-title { font-size: 0.9375rem; color: var(--color-text-muted); }

/* ---------- Product card overview grid (Image #2 style) ---------- */
.products-overview { border-bottom: 1px solid var(--color-border); }
.products-overview h2 { text-align: center; margin-bottom: 48px; }

.smart-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) {
  .smart-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .smart-product-grid { grid-template-columns: 1fr; }
}

.smart-product-card {
  padding: 32px 24px 28px;
  border-right: 1px solid var(--color-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: background var(--transition);
}
.smart-product-card:last-child { border-right: 0; }
.smart-product-card:hover { background: var(--color-bg-alt); }

.smart-product-card img {
  width: 100%;
  max-width: 240px;
  height: 170px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin-bottom: 20px;
  padding: 8px 0;
}

.smart-product-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.smart-product-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

.smart-product-card .explore-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.smart-product-card .explore-link:hover { gap: 8px; color: var(--color-primary); }

/* ---------- Benefits grid ---------- */
.benefits-section { background: var(--color-bg-alt); }

.benefits-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.benefits-intro h2 { margin-bottom: 16px; }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 40px;
}
@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.benefit-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
}

.benefit-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.35;
}

/* Solution-visual variant for transparent/padded product PNGs */
.solution-visual.is-product {
  background: #f7f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.solution-visual.is-product img {
  object-fit: contain;
  padding: 24px;
  background: transparent;
}

/* ---------- Product tag badge ---------- */
.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #eee8ff, #e0d8ff);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}
.product-tag.tag-red { background: linear-gradient(135deg, #ffe8ed, #ffd0d8); color: var(--color-red); }
.product-tag.tag-teal { background: linear-gradient(135deg, #e0f7fe, #bae8fd); color: var(--color-teal); }

/* ---------- Quick specs strip ---------- */
.spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
}
.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

/* ---------- Product modals ---------- */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
.product-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 40, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(15, 10, 61, 0.28);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(28px) scale(0.97);
  transition: transform 320ms cubic-bezier(0.34, 1.46, 0.64, 1);
}
.product-modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.modal-close:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: rotate(90deg);
}

.modal-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.modal-img {
  background: linear-gradient(160deg, #f4f3fa 0%, #eceafa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  min-height: 440px;
}
.modal-img img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.modal-content {
  padding: 48px 44px 44px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-content h2 {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  margin-bottom: 14px;
  line-height: 1.2;
}
.modal-content > p {
  margin-bottom: 22px;
  font-size: 1rem;
}
.modal-content .spec-strip { margin: 16px 0 24px; }
.modal-content .feature-list { margin: 0 0 32px; }
.modal-content .feature-list li { padding: 10px 0 10px 30px; font-size: 0.9375rem; }

@media (max-width: 760px) {
  .modal-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .modal-content { padding: 28px 24px 32px; overflow-y: visible; }
  .modal-img {
    min-height: 220px;
    padding: 28px 20px;
    border-radius: 0;
  }
  .modal-img img { max-height: 180px; }
}
@media (max-width: 500px) {
  .product-modal { padding: 12px; }
}

/* ---------- Animation utilities ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

/* ---------- RX featured card (full-width row) ---------- */
.rx-card {
  border-right: 0;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  text-align: left;
  grid-column: 1 / -1;
  padding: 28px 40px;
}
.rx-card__img {
  max-width: 220px;
  height: 150px;
  flex-shrink: 0;
  object-fit: contain;
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .rx-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }
  .rx-card__img {
    max-width: 100%;
    height: 130px;
    flex-shrink: unset;
    margin-bottom: 0;
  }
}

/* ==============================================
   Mobile improvements
   ============================================== */

/* Prevent any horizontal overflow on all screen sizes */
html, body { overflow-x: hidden; }

/* Social links — minimum 44px touch target (WCAG AA) */
.social-links a { width: 44px; height: 44px; }

/* ── Nav (≤900px) ─────────────────────────────── */
@media (max-width: 900px) {
  /* Smoother slide-down animation */
  .nav-menu { transition: max-height 350ms ease; }
  /* Extra headroom in case of many nav items */
  .nav-menu.open { max-height: 600px; }

  /* Fix right-border on even cards in 2-column product grid */
  .smart-product-card:nth-child(even) { border-right: 0; }
}

/* ── Single-column product grid (≤500px) ─────── */
@media (max-width: 500px) {
  /* Remove all right borders when stacked to 1 column */
  .smart-product-card { border-right: 0; }
}

/* ── Tablet hero + page-header (≤768px) ─────── */
@media (max-width: 768px) {
  .page-header { padding: calc(76px + 28px) 0 40px; }
}

/* ── Small mobile (≤480px) ──────────────────── */
@media (max-width: 480px) {
  /* Tighter section spacing */
  section { padding: 48px 0; }

  /* Page header — less wasted space at top */
  .page-header { padding: calc(76px + 16px) 0 28px; }

  /* Phone form: narrow country-code column so input stays usable */
  .phone-group { grid-template-columns: 100px 1fr; }

  /* Form card padding */
  .form-card { padding: 20px 16px; }

  /* Stats: single column so values don't crowd */
  .stats { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .stat-value { font-size: 2rem; }

  /* Benefits: single column on small phones */
  .benefits-grid { grid-template-columns: 1fr; gap: 32px; }

  /* CEO message: smaller avatar, tighter padding */
  .ceo-message { padding: 28px 20px; gap: 20px; }
  .ceo-avatar { width: 110px; height: 110px; font-size: 2rem; }
  .ceo-message blockquote { font-size: 1.0625rem; }

  /* Solution category cards */
  .solution-category { padding: 24px 20px; gap: 20px; }

  /* Hero badge — keep it away from the edge */
  .hero-badge { right: 12px; bottom: 16px; padding: 12px 14px; font-size: 0.8125rem; }

  /* Footer: tighter gap between stacked columns */
  .footer-grid { gap: 28px; }
}

/* ── Ultra-small (≤380px) ───────────────────── */
@media (max-width: 380px) {
  /* Reduce container side padding to reclaim space */
  .container { padding: 0 16px; }

  /* h1 minimum slightly smaller so it doesn't crowd */
  h1 { font-size: clamp(1.75rem, 8vw, 2.25rem); }

  /* Phone group: stack vertically on the smallest phones */
  .phone-group { grid-template-columns: 1fr; }
  .phone-group select { border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-bottom: 0; }
  .phone-group input { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
}
