/* ============================================================
   Serena Landing Page — style.css
   Design System: Playfair Display + DM Sans, Lavender palette
   Premium B2B healthcare aesthetic
   ============================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2D2640;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Design Tokens --- */
:root {
  --primary: #7B6B9E;
  --primary-dark: #6A5B8D;
  --secondary: #9B8BB8;
  --light: #C4B5D6;
  --rose: #F2E0EE;
  --bg-white: #FFFFFF;
  --bg-alt: #F7F5FA;
  --text-primary: #2D2640;
  --text-secondary: #6B6180;
  --text-tertiary: #9890A8;
  --border: #E0D8E8;
  --green: #5BA86D;
  --yellow: #C99A2E;
  --coral: #C9544D;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(45, 38, 64, 0.06);
  --shadow-md: 0 4px 16px rgba(123, 107, 158, 0.10);
  --shadow-lg: 0 8px 32px rgba(123, 107, 158, 0.12);
  --shadow-xl: 0 12px 48px rgba(123, 107, 158, 0.16);
  --max-width: 1200px;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --primary: #9B8BB8;
  --primary-dark: #B0A0CC;
  --secondary: #9B8BB8;
  --light: #C4B5D6;
  --rose: #3D2E42;
  --bg-white: #1A1625;
  --bg-alt: #231E30;
  --text-primary: #F0ECF5;
  --text-secondary: #B0A8C0;
  --text-tertiary: #8078A0;
  --border: #3A3350;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

[data-theme="dark"] body {
  background: var(--bg-white);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(26, 22, 37, 0.95);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #231E30 0%, #1A1625 40%, #2D2640 100%);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(ellipse, rgba(58, 51, 80, 0.3) 0%, transparent 70%);
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(ellipse, rgba(74, 66, 96, 0.12) 0%, transparent 70%);
}

[data-theme="dark"] .trust-bar {
  background: #231E30;
}

[data-theme="dark"] .browser-frame {
  background: #231E30;
  border-color: #3A3350;
}

[data-theme="dark"] .browser-frame-bar {
  background: #2D2640;
}

[data-theme="dark"] .problem-card {
  background: #2D2640;
  border-left-color: #E06B63;
}

[data-theme="dark"] .pillar-card {
  background: linear-gradient(180deg, #2D2640 0%, #231E30 100%);
  border: 1px solid #3A3350;
}

[data-theme="dark"] .security-card {
  background: #231E30;
  border-color: #3A3350;
}

[data-theme="dark"] .security-card .icon {
  background: #2D2640;
}

[data-theme="dark"] .contact-section {
  background: linear-gradient(135deg, #3A3350 0%, #2D2640 50%, #231E30 100%);
}

[data-theme="dark"] .contact-card {
  background: #2D2640;
  border: 1px solid #3A3350;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #1A1625;
  border-color: #3A3350;
  color: var(--text-primary);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: var(--text-tertiary);
}

[data-theme="dark"] .form-success {
  background: rgba(107, 196, 125, 0.12);
  border-color: rgba(107, 196, 125, 0.25);
}

[data-theme="dark"] .mobile-nav {
  background: #1A1625;
}

[data-theme="dark"] .feature-media::before {
  background: radial-gradient(ellipse at center, rgba(58, 51, 80, 0.3) 0%, transparent 70%);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--text-primary);
  line-height: 1.25;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

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

section {
  padding: 96px 0;
}

section.alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  height: 52px;
  padding: 0 32px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(123, 107, 158, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(123, 107, 158, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  height: 44px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.navbar.scrolled .navbar-brand {
  transform: scale(0.95);
}

.navbar-brand .logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar-brand .logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--primary);
}

.navbar-links a.active {
  box-shadow: inset 0 -2px 0 var(--primary);
  padding-bottom: 2px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-actions .btn-primary {
  height: 40px;
  padding: 0 20px;
  font-size: 0.875rem;
}

.navbar-actions .btn-secondary {
  height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero --- */
.hero {
  padding-top: 120px;
  padding-bottom: 64px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F7F5FA 0%, #FFFFFF 40%, #FBF5F9 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -15%;
  width: 55%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(242, 224, 238, 0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 50%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(196, 181, 214, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image .browser-frame {
  transform: perspective(1200px) rotateY(-2deg);
  box-shadow: 0 20px 60px rgba(123, 107, 158, 0.20);
}

/* --- Trust Bar --- */
.trust-bar {
  padding: 28px 0;
  text-align: center;
  background: #F0EBF5;
}

.trust-bar p {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.trust-bar span {
  color: var(--primary);
  font-weight: 700;
}

/* --- Browser Mockup Frame --- */
.browser-frame {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(123, 107, 158, 0.15);
  overflow: hidden;
  border: 1px solid var(--border);
}

.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.browser-frame-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.browser-frame-dot:nth-child(1) { background: #E8828A; }
.browser-frame-dot:nth-child(2) { background: #E8C96A; }
.browser-frame-dot:nth-child(3) { background: #7BC98A; }

.browser-frame img {
  display: block;
  width: 100%;
}

/* --- Icon base (SVG inside .icon containers) --- */
.icon svg {
  width: 24px;
  height: 24px;
}

/* --- Problem Cards --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.problem-card {
  background: #FFF8F6;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  border: none;
  border-left: 3px solid var(--coral);
  box-shadow: 0 2px 8px rgba(201, 84, 77, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}

.problem-card:hover {
  box-shadow: 0 8px 24px rgba(201, 84, 77, 0.08);
  transform: translateY(-4px);
}

.problem-card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(201, 84, 77, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--coral);
}

.problem-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.problem-closing {
  text-align: center;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

/* --- Solution Pillars --- */
.solution-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
  font-size: 1.0625rem;
}

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

.pillar-card {
  background: linear-gradient(180deg, #F8F5FC 0%, #F0EBF5 100%);
  padding: 36px 28px;
  border-radius: var(--radius-md);
  border: none;
  text-align: center;
  box-shadow: 0 2px 12px rgba(123, 107, 158, 0.08);
  transition: box-shadow 0.3s, transform 0.3s;
}

.pillar-card:hover {
  box-shadow: 0 8px 24px rgba(123, 107, 158, 0.15);
  transform: translateY(-4px);
}

.pillar-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
}

.pillar-card .icon svg {
  width: 26px;
  height: 26px;
}

.pillar-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* --- Features (alternating) --- */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 72px;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block.reverse {
  grid-template-columns: 1.4fr 1fr;
}

.feature-block.reverse .feature-text {
  order: 2;
}

.feature-block.reverse .feature-media {
  order: 1;
}

.feature-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-text p {
  margin-bottom: 12px;
}

.feature-media {
  position: relative;
}

.feature-media::before {
  content: '';
  position: absolute;
  inset: -16px;
  background: radial-gradient(ellipse at center, rgba(242, 224, 238, 0.4) 0%, transparent 70%);
  border-radius: 24px;
  z-index: -1;
  pointer-events: none;
}

.feature-text-only {
  max-width: 800px;
  margin: 0 auto 72px;
  text-align: center;
}

.feature-text-only:last-child {
  margin-bottom: 0;
}

.feature-text-only h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* --- Metrics --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.metric-card {
  text-align: center;
  padding: 48px 24px;
  background: transparent;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: none;
}

.metric-card .metric-value {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
  line-height: 1.1;
}

.metric-card .metric-value::after {
  content: '';
  display: block;
  width: 40px;
  height: 1.5px;
  background: var(--border);
  margin: 20px auto;
}

.metric-card .metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.metrics-disclaimer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-style: italic;
}

/* --- Security Grid --- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.security-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 24px;
  background: #FAFAFA;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}

.security-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.security-card .icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #F0EBF5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.security-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.security-card p {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --- About --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.0625rem;
}

/* --- Founders --- */
.founders {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
  text-align: left;
}

.founders-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(123, 107, 158, 0.15);
  flex-shrink: 0;
}

.founders-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.founders-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.founder h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.founder-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}

.founder p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .founders {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 32px;
  }

  .founders-photo {
    width: 180px;
    height: 180px;
  }
}

/* --- Contact / CTA Section --- */
.contact-section {
  padding: 96px 0;
  background: linear-gradient(135deg, #7B6B9E 0%, #9B8BB8 50%, #C4B5D6 100%);
}

.contact-section .section-header h2 {
  color: #fff;
}

.contact-section .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.contact-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group label .required {
  color: var(--coral);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123, 107, 158, 0.12);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6180' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-submit {
  margin-top: 8px;
}

.form-submit .btn-primary {
  width: 100%;
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px;
  background: #F0F9F2;
  border: 1px solid #B8DFC1;
  border-radius: var(--radius-md);
  color: var(--green);
  font-weight: 600;
}

.form-success.show {
  display: block;
}

.contact-alt {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-alt a {
  color: #fff;
  font-weight: 600;
}

.contact-alt a:hover {
  text-decoration: underline;
}

/* --- Footer (dark) --- */
.footer {
  padding: 56px 0 36px;
  border-top: none;
  background: var(--text-primary);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 32px;
}

.footer-brand .logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--light);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.footer-links h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  font-size: 0.9375rem;
  color: var(--secondary);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

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

.footer-legal a {
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--light);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stagger Delays --- */
.fade-in[data-delay="1"] { transition-delay: 0.1s; }
.fade-in[data-delay="2"] { transition-delay: 0.2s; }
.fade-in[data-delay="3"] { transition-delay: 0.3s; }
.fade-in[data-delay="4"] { transition-delay: 0.4s; }

/* --- Slide Animations --- */
.slide-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible,
.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Metric Card Scale Entrance --- */
.metric-card.fade-in {
  transform: translateY(24px) scale(0.85);
}

.metric-card.fade-in.visible {
  transform: translateY(0) scale(1);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary);
  z-index: 1001;
  pointer-events: none;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* --- Logo Icon --- */
.logo-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  animation: logo-glow 2s ease-in-out;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.footer-brand .logo-icon {
  width: 24px;
  height: 24px;
}

@keyframes logo-glow {
  0% { filter: drop-shadow(0 0 0px rgba(123, 107, 158, 0)); }
  40% { filter: drop-shadow(0 0 8px rgba(123, 107, 158, 0.6)); }
  100% { filter: drop-shadow(0 0 0px rgba(123, 107, 158, 0)); }
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-nav .btn-primary {
  margin-top: 16px;
}

/* Hamburger active state */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero {
    min-height: auto;
    padding-top: 104px;
    padding-bottom: 48px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-image {
    max-width: 600px;
    margin: 0 auto;
  }

  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-block.reverse .feature-text {
    order: 1;
  }

  .feature-block.reverse .feature-media {
    order: 2;
  }

  .feature-media {
    max-width: 600px;
    margin: 0 auto;
  }

  section {
    padding: 72px 0;
  }
}

/* Tablet — nav */
@media (max-width: 960px) {
  .navbar-links,
  .navbar-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  section {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .problem-grid,
  .pillar-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .slide-left,
  .slide-right {
    transform: translateY(24px);
  }

  .slide-left.visible,
  .slide-right.visible {
    transform: translateY(0);
  }

  .contact-card {
    padding: 28px 20px;
  }

  .metric-card .metric-value {
    font-size: 2.75rem;
  }
}

/* Phone */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }

  .container {
    padding: 0 16px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    justify-content: center;
  }

  .navbar-brand .logo-subtitle {
    display: none;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .contact-card {
    padding: 24px 16px;
  }
}
