/* ========================================
   N&R AI Solutions | Shared Styles
   css/styles.css
   ======================================== */

/* ========================================
   1. CSS Custom Properties
   ======================================== */
:root {
  /* Colors */
  --bg-primary: #0d0d0d;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --accent: #e04040;
  --accent-hover: #e74c3c;
  --accent-subtle: rgba(224, 64, 64, 0.12);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --border: rgba(255, 255, 255, 0.07);

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --max-width: 1200px;
  --section-padding: 96px 24px;
  --nav-height: 72px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  animation: pageLoad 0.4s ease forwards;
}

@keyframes pageLoad {
  to { opacity: 1; }
}

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

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

ul,
ol {
  list-style: none;
}

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   3. Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

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

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

.section {
  padding: var(--section-padding);
}

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

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

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

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

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

/* Spacing utilities */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ========================================
   5. Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav.scrolled {
  background: rgba(13, 13, 13, 0.96);
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  flex-shrink: 0;
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 999;
  padding: calc(var(--nav-height) + 16px) 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-drawer a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-drawer a.active {
  color: var(--accent);
}

.nav-drawer-cta {
  margin-top: 12px;
  text-align: center;
  justify-content: center;
}

/* ========================================
   6. Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(224, 64, 64, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1rem;
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.875rem;
}

/* ========================================
   7. Footer
   ======================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 52px;
}

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

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

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-col-title {
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-nav-links a:hover {
  color: var(--text-primary);
}

.footer-contact-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  margin-bottom: 20px;
  display: inline-block;
}

.footer-contact-email:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   8. Hero, Home
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 56px) 24px 96px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at 50% 30%, rgba(224, 64, 64, 0.13) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 740px;
}

.hero h1 {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.175rem;
  margin-bottom: 44px;
  max-width: 560px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========================================
   9. Page Hero (inner pages)
   ======================================== */
.page-hero {
  padding: calc(var(--nav-height) + 72px) 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.page-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.1rem;
}

/* ========================================
   10. Proof Bar
   ======================================== */
.proof-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.proof-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.proof-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.proof-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.proof-chip-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========================================
   11. Feature Cards Grid
   ======================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition);
}

/* feature-card hover: pointer devices only, see section 26 */

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
}

/* ========================================
   12. Use Cases Grid
   ======================================== */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.use-case-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
}

.use-case-item:hover {
  background: var(--accent-subtle);
  border-color: rgba(224, 64, 64, 0.22);
}

.use-case-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.use-case-item span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========================================
   13. Steps Teaser (Home)
   ======================================== */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.steps-row::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(16.666% + 28px);
  right: calc(16.666% + 28px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--border) 100%);
}

.step-item {
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.step-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step-item p {
  font-size: 0.875rem;
}

/* ========================================
   14. CTA Banner
   ======================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(224, 64, 64, 0.07) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 72px 48px;
  text-align: center;
}

.cta-banner h2 {
  margin-bottom: 14px;
}

.cta-banner p {
  margin-bottom: 36px;
  font-size: 1.05rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner p:last-of-type {
  margin-bottom: 36px;
}

.cta-banner .btn {
  margin-top: 0;
}

/* ========================================
   15. Timeline (How It Works)
   ======================================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: 0 32px;
  align-items: start;
  margin-bottom: 52px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-side {
  padding-top: 12px;
}

.timeline-side.left {
  text-align: right;
}

.timeline-side.right {
  text-align: left;
}

.timeline-side.empty {
  visibility: hidden;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  justify-self: center;
}

.timeline-side h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.timeline-side p {
  font-size: 0.9rem;
}

/* ========================================
   16. Two-Column Layout
   ======================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.two-col-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
}

.two-col-card h3 {
  font-size: 1.1875rem;
  margin-bottom: 24px;
}

.two-col-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.two-col-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.two-col-card-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='9' stroke='%23c0392b' stroke-width='1.5'/%3E%3Cpath d='M6.5 10.5l2.5 2.5 4.5-5' stroke='%23c0392b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ========================================
   17. Accordion (FAQ)
   ======================================== */
.accordion {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.accordion-item.open {
  border-color: rgba(224, 64, 64, 0.3);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  line-height: 1.5;
  min-height: 44px;
  transition: background var(--transition);
  gap: 16px;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.025);
}

.accordion-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-body-inner {
  padding: 14px 28px 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.85;
}

/* ========================================
   18. Form Base
   ======================================== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.required-star {
  color: var(--accent);
  margin-left: 3px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-input,
.form-textarea {
  display: block;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 64, 64, 0.14);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input.field-error,
.form-textarea.field-error {
  border-color: var(--accent);
}

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

.form-error-msg {
  display: none;
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 500;
}

.form-error-msg.visible {
  display: block;
}

/* Radio & Checkbox groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 44px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.radio-option span,
.checkbox-option span {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   19. Multi-Step Form (Questionnaire)
   ======================================== */
.progress-wrap {
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.progress-wrap-inner {
  max-width: 760px;
  margin: 0 auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-step-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-step-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
}

/* Form step wrapper */
.form-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-heading {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-subheading {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Navigation between steps */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.step-nav-left {
  flex: 1;
}

.step-nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* Inline note box */
.inline-note {
  background: var(--accent-subtle);
  border: 1px solid rgba(224, 64, 64, 0.18);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Fieldset option groups, add spacing after legend */
fieldset .radio-group,
fieldset .checkbox-group {
  margin-top: 8px;
}

/* Welcome content block (Section 2 of intake form) */
.welcome-content {
  margin-bottom: 40px;
}

.welcome-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.welcome-content h3:first-child {
  margin-top: 0;
}

.welcome-content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.welcome-content ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.welcome-content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* Rating scale (1-10) */
.rating-scale {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rating-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.rating-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.rating-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.rating-option span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  cursor: pointer;
}

.rating-option input[type="radio"]:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.rating-option input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Conditional sub-field */
.conditional-field {
  display: none;
  margin-top: 12px;
  padding-left: 30px;
}

.conditional-field.visible {
  display: block;
}

/* Thank-you screen */
.thankyou-screen {
  display: none;
  text-align: center;
  padding: 80px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.thankyou-screen.visible {
  display: block;
}

.thankyou-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  color: var(--accent);
}

.thankyou-screen h2 {
  margin-bottom: 16px;
}

.thankyou-screen p {
  font-size: 1.0625rem;
  margin-bottom: 40px;
}

/* ========================================
   20. Pricing Page
   ======================================== */
.pricing-why {
  max-width: 720px;
  margin: 0 auto;
}

.pricing-why p {
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.included-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.included-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.included-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.included-icon svg {
  width: 18px;
  height: 18px;
}

.included-item span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-cta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ========================================
   21. About Page
   ======================================== */
.story-text {
  max-width: 680px;
  margin: 0 auto 56px;
}

.story-text p {
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 680px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}

/* team-card hover: pointer devices only, see section 26 */

.team-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(224, 64, 64, 0.6) 0%, var(--bg-card) 100%);
  border: 2px solid rgba(224, 64, 64, 0.3);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-card h3 {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.team-card p {
  font-size: 0.875rem;
  line-height: 1.75;
}

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

.value-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition);
}

/* value-card hover: pointer devices only, see section 26 */

.value-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent);
}

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

.value-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 10px;
}

.value-card p {
  font-size: 0.875rem;
}

/* ========================================
   22. Contact Page
   ======================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-subtle);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
}

.contact-info-label {
  font-size: 0.7375rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.contact-info-value {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.contact-info-value a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.contact-info-value a:hover {
  color: var(--accent);
}

.contact-response-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

.contact-upsell {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.contact-upsell-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.contact-form-heading {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.confirmation-message {
  display: none;
  text-align: center;
  padding: 32px 0;
}

.confirmation-message.visible {
  display: block;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--accent);
}

.confirm-icon svg {
  width: 28px;
  height: 28px;
}

.confirmation-message h3 {
  margin-bottom: 10px;
}

.confirmation-message p {
  font-size: 0.9375rem;
}

/* ========================================
   23. Architecture Diagram (How It Works)
   ======================================== */

/* 5-column grid: panel | flow | hardware | flow | panel */
.arch-diagram {
  display: grid;
  grid-template-columns: 1fr 68px 1.5fr 68px 1fr;
  align-items: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

/* Diagram section: darker background so panels stand out */
.arch-section {
  background: var(--bg-primary);
}

/* Panels */
.arch-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
}

.arch-panel-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.arch-panel-icon svg {
  width: 26px;
  height: 26px;
}

.arch-panel-icon--accent {
  background: var(--accent-subtle);
  border-color: rgba(224, 64, 64, 0.3);
  color: var(--accent);
}

.arch-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.arch-panel-title--accent {
  color: var(--accent);
}

.arch-panel-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Pills (WhatsApp, Claude, etc.) */
.arch-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-top: 4px;
}

.arch-pill {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}

.arch-pill--dim {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

/* Apps list */
.arch-apps-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.arch-apps-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: left;
}

.arch-app-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
}

/* Hardware container (Mac Mini dashed box) */
.arch-hardware {
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.arch-hardware-label {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.arch-apple-icon {
  font-size: 15px;
  color: #ffffff;
  flex-shrink: 0;
}

.arch-panel--agent {
  border-color: rgba(224, 64, 64, 0.22);
  background: rgba(224, 64, 64, 0.03);
  width: 100%;
}

.arch-panel--model {
  width: 100%;
  background: rgba(255, 255, 255, 0.015);
}

/* Internal flow: OpenClaw <-> AI Model (vertical) */
.arch-internal-flow {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 0 12px 0;
  width: 100%;
  justify-content: center;
}

.arch-internal-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.arch-internal-tracks {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 32px;
}

/* Flow connectors (horizontal, between main panels) */
.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
}

.arch-flow-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.arch-flow--accent .arch-flow-label {
  color: rgba(224, 64, 64, 0.65);
}

/* Arrow tracks (horizontal lines with arrowheads) */
.arch-flow-track {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
}

/* .arch-flow-track--rev: arrowhead is first in DOM, line second — no flex reversal needed */

.arch-flow-line {
  flex: 1;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.12);
}

.arch-flow--accent .arch-flow-line {
  background: rgba(224, 64, 64, 0.35);
}

/* Vertical lines (inside hardware container) */
.arch-flow-line--v {
  flex: none;
  width: 1.5px;
  height: 100%;
  background: rgba(255, 255, 255, 0.12);
}

.arch-flow-head {
  width: 7px;
  height: 10px;
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.arch-flow--accent .arch-flow-head {
  color: rgba(224, 64, 64, 0.5);
}

/* Vertical arrow tracks (inside arch-internal-tracks) */
.arch-flow-track--down,
.arch-flow-track--up {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 0;
}

.arch-flow-track--down .arch-flow-head,
.arch-flow-track--up .arch-flow-head {
  width: 10px;
  height: 7px;
  color: rgba(255, 255, 255, 0.2);
}

/* Mobile: vertical stack */
@media (max-width: 768px) {
  .arch-diagram {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .arch-hardware {
    width: 100%;
  }

  .arch-flow {
    flex-direction: row;
    width: 100%;
    padding: 12px 16px;
    justify-content: center;
    gap: 8px;
  }

  .internal-flow {
    flex-direction: column;
    gap: 12px;
  }

  /* Only outer connector tracks go vertical on mobile — internal --down/--up tracks stay as-is */
  .arch-flow .arch-flow-track {
    flex-direction: column;
    width: auto;
    height: 40px;
  }

  .arch-flow .arch-flow-line {
    flex: 1;
    width: 1.5px;
    height: auto;
  }

  /* Rotate outer connector arrowheads for vertical flow on mobile */
  .arch-flow-head {
    width: 10px;
    height: 7px;
  }

  .arch-flow .arch-flow-track:not(.arch-flow-track--rev) .arch-flow-head {
    transform: rotate(90deg); /* ► → ▼ */
  }

  .arch-flow .arch-flow-track--rev .arch-flow-head {
    transform: rotate(90deg); /* ◄ → ▲ */
  }

  .arch-flow--accent .arch-flow-line {
    background: rgba(224, 64, 64, 0.35);
  }
}

/* Logo grids inside arch panels */
.arch-logo-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.arch-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.arch-logo-item img,
.arch-logo-item svg,
.arch-logo-item i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  flex-shrink: 0;
}

.arch-logo-item img {
  object-fit: contain;
}

/* Font Awesome icon sizing inside logo boxes */
.arch-logo-item i {
  font-size: 20px;
  line-height: 38px;
  text-align: center;
}

.arch-logo-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* App list icons */
.arch-apps-list img,
.arch-apps-list li svg,
.arch-apps-list li i {
  width: 18px;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

.arch-apps-list img {
  object-fit: contain;
  height: 18px;
  border-radius: 4px;
}

/* ========================================
   24. Fade-up Animation (IntersectionObserver)
   ======================================== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ========================================
   25. Responsive, max-width 1024px
   ======================================== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   26. Responsive, max-width 768px
   ======================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 20px;
  }

  /* Nav */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero p {
    font-size: 1.05rem;
  }

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

  .hero-actions .btn {
    text-align: center;
    justify-content: center;
  }

  /* Grids */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .steps-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .steps-row::before {
    display: none;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

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

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

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .footer-grid > :first-child {
    grid-column: auto;
  }

  .use-cases-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-banner {
    padding: 48px 24px;
  }

  /* Timeline mobile: single column */
  .timeline::before {
    left: 27px;
    transform: none;
  }

  .timeline-item {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }

  .timeline-side.empty {
    display: none;
  }

  .timeline-dot {
    flex-shrink: 0;
    order: 1;
    width: 48px;
    height: 48px;
    font-size: 0.8125rem;
  }

  .timeline-side:not(.empty) {
    order: 2;
    flex: 1;
    text-align: left !important;
  }

  /* proof bar */
  .proof-bar-inner {
    flex-direction: column;
    gap: 14px;
  }

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

  .two-col-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .proof-chips {
    flex-direction: column;
    width: 100%;
  }

  .proof-chip {
    justify-content: center;
  }

  .form-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Rating scale: tighter on small screens */
  .rating-scale {
    gap: 8px;
  }

  .rating-options {
    gap: 4px;
  }

  .rating-option span {
    width: 34px;
    height: 34px;
    font-size: 0.8125rem;
  }

  .rating-label {
    font-size: 0.75rem;
  }
}

/* ========================================
   27. Touch / Pointer Interaction
   Hover transforms only on true pointer
   devices (mouse). Touch screens use
   :active states for tap feedback instead.
   ======================================== */
@media (hover: hover) and (pointer: fine) {
  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  .team-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .value-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .rating-option:hover span {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-subtle);
  }
}

/* Tap feedback for touch devices */
@media (hover: none) {
  .feature-card:active {
    transform: scale(0.98);
  }

  .team-card:active,
  .value-card:active {
    border-color: rgba(224, 64, 64, 0.3);
  }

  .rating-option:active span {
    border-color: var(--accent);
    background: var(--accent-subtle);
  }

  .checkbox-option:active .checkbox-custom,
  .radio-option:active .radio-custom {
    border-color: var(--accent);
  }
}
