/* ═══════════════════════════════════════════════════════════════
   Silicon Harbor Technologies — styles.css
   Nautical AI · Charleston, SC
   v4 — complete rewrite: single source of truth, accessibility,
         stats bar, focus states, color contrast fixes
═══════════════════════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --bg:          #f0fffc;
  --surface:     rgba(255, 255, 255, 0.93);
  --primary:     #0c6b63;
  --accent:      #10d8c4;
  --accent-text: #0a9e8f; /* Darker teal for text on light bg — passes WCAG AA */
  --dark:        #0f172a;
  --muted:       #475569;
  --glow:        rgba(16, 216, 196, 0.35);
  --navy:        #0a1628;
  --navy-mid:    #0d2137;
  --harbor:      #1b3d5a;
  --sea-glass:   #2a6b7c;
  --anchor:      #0f2d4a;
  --radius:      28px;
  --radius-sm:   14px;
  --nav-h:       82px;
  --section-pad: 96px;
}

/* ── 2. RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── 2b. ACCESSIBILITY UTILITIES ─────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* ── 2c. GLOBAL FOCUS STYLES ─────────────────────────────────── */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none; /* Custom focus below */
}

/* ── 3. LAYOUT ───────────────────────────────────────────────── */
.container {
  width: min(1400px, 94%);
  margin-inline: auto;
  position: relative;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

/* ── 4. NAVBAR ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(20, 184, 166, 0.18);
  z-index: 2000;
  transition: background 0.4s, box-shadow 0.4s;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(10, 22, 40, 0.1);
}

.nav-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-brand img {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  object-fit: contain;
  margin: -14px 0;
}

.logo {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  position: relative;
  transition: color 0.3s;
  letter-spacing: 0.2px;
  padding-bottom: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              left  0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after {
  width: 100%;
}


.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 2100;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── 5. HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 0.42) 0%,
    rgba(11, 45, 66, 0.22) 50%,
    rgba(240, 255, 252, 0.10) 100%
  );
  pointer-events: none;
}

.hero-carousel-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.active {
  opacity: 0.65;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.05);
}

#heroCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  padding: 2.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 900;
  line-height: 0.97;
  margin-bottom: 0.6rem;
  color: #1e2d4a;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-tagline {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--accent-text);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientFlow 8s linear infinite;
}

.hero p {
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  font-weight: 700;
  color: #1e2d4a;
  max-width: 760px;
  margin-bottom: 2.4rem;
  line-height: 1.65;
  animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.6s both;
}

/* ── 6. BUTTONS ──────────────────────────────────────────────── */
.btn {
  padding: 15px 38px;
  border-radius: 80px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: white;
  border: none;
  box-shadow: 0 10px 36px var(--glow);
}

.btn-primary:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 24px 64px var(--glow);
}

.btn-outline {
  border: none;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 36px rgba(10, 22, 40, 0.12);
}

.btn-outline:hover {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(10, 22, 40, 0.2);
}

/* Platform links above LOOM AI grid */
.portfolio-links {
  margin: 0 auto 3rem;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.portfolio-btn {
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 0.93rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 165px;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.portfolio-btn.primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: white;
  border: none;
  box-shadow: 0 8px 22px var(--glow);
}

.portfolio-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px var(--glow);
}

.portfolio-btn.secondary {
  background: var(--navy);
  color: white;
  border: none;
  box-shadow: 0 8px 22px rgba(10, 22, 40, 0.3);
}

.portfolio-btn.secondary:hover {
  background: var(--harbor);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(10, 22, 40, 0.35);
}

/* ── 6b. STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 48px 0;
  position: relative;
  z-index: 1;
}

.stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 16px 24px;
  border-right: 1px solid rgba(16, 216, 196, 0.2);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  display: block;
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stat-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}

.stat-text {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* ── 7. SECTION HEADERS ──────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-text);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── 8. FEATURE CARDS GRID ───────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.card {
  background: var(--surface);
  padding: 38px 34px;
  border-radius: var(--radius);
  border: 2px solid rgba(20, 184, 166, 0.2);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(70px);
  transition: opacity      0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform    0.7s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow   0.7s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card.visible:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 32px 80px rgba(16, 216, 196, 0.22);
  border-color: var(--accent);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 65%, rgba(16, 216, 196, 0.05) 100%);
  pointer-events: none;
}

.card-icon {
  font-size: 2.6rem;
  margin-bottom: 1.3rem;
  color: var(--primary);
  display: block;
  position: relative;
  z-index: 1;
}

.card h3 {
  font-size: 1.45rem;
  font-weight: 900;
  margin-bottom: 0.9rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.card p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* Card CTAs for service cards */
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 1.4rem;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 216, 196, 0.35);
}

/* ── 9. NAUTICAL DARK BAND ───────────────────────────────────── */
.nautical-band {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-mid) 55%, var(--anchor) 100%);
  position: relative;
}

.nautical-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 44px,
    rgba(16, 216, 196, 0.025) 44px,
    rgba(16, 216, 196, 0.025) 88px
  );
  pointer-events: none;
  z-index: 0;
}

.nautical-band .container {
  position: relative;
  z-index: 1;
}

.nautical-band .section-tag {
  color: #7ee8dc;
}

.nautical-band .section-title {
  background: linear-gradient(90deg, var(--accent), #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nautical-band .section-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

.nautical-band .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 216, 196, 0.2);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nautical-band .card.visible:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 32px 80px rgba(16, 216, 196, 0.3);
}

.nautical-band .card-icon {
  color: var(--accent);
}

.nautical-band .card h3 {
  color: var(--accent);
}

.nautical-band .card p {
  color: rgba(255, 255, 255, 0.72);
}

/* ── 10. PORTFOLIO GRID ──────────────────────────────────────── */
.portfolio-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.portfolio-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(20, 184, 166, 0.2);
  overflow: visible;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
  opacity: 0;
  transform: translateY(60px);
  transition: opacity      0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform    0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow   0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card.visible:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 80px rgba(16, 216, 196, 0.28);
  border-color: var(--accent);
}

.portfolio-image {
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(12, 107, 99, 0.65) 55%,
    rgba(16, 216, 196, 0.35) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.2rem;
  position: relative;
}

.portfolio-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(16, 216, 196, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 216, 196, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.portfolio-image i {
  position: relative;
  z-index: 2;
  color: var(--accent);
  filter: drop-shadow(0 0 16px rgba(16, 216, 196, 0.65));
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

.portfolio-content {
  padding: 1.8rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 0;
}

.portfolio-category {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent-text);
  margin-bottom: 0.7rem;
}

.portfolio-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.portfolio-desc {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--muted);
  margin-bottom: 1.1rem;
  flex: 1;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.3rem;
}

.tag {
  padding: 4px 13px;
  background: rgba(16, 216, 196, 0.1);
  border: 1px solid rgba(16, 216, 196, 0.4);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
}

.portfolio-link-btn,
.portfolio-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: white;
  border-radius: 50px;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: fit-content;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-link-btn:hover,
.portfolio-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 216, 196, 0.42);
}

/* ── 11. IMAGE CONTAINER ─────────────────────────────────────── */
.image-container {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(20, 184, 166, 0.2);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity      0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform    0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow   0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.image-container.visible:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 80px rgba(16, 216, 196, 0.28);
  border-color: var(--accent);
}

.image-container img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.image-caption {
  padding: 12px 16px;
  font-size: 0.87rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  background: rgba(240, 255, 252, 0.7);
}

/* ── 11b. TECHNOLOGY SECTION ─────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.tech-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid rgba(20, 184, 166, 0.12);
  box-shadow: 0 4px 24px rgba(10, 22, 40, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tech-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(10, 22, 40, 0.1);
}

.tech-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: white;
}

.tech-card h3 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.tech-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tech-card > p:not(.tech-subtitle) {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.tech-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tech-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--dark);
}

.tech-features li i {
  color: var(--accent-text);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tech-integration {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
}

.tech-integration p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

.tech-integration strong {
  color: var(--accent);
}

/* ── 11c. METHODOLOGY SECTION ────────────────────────────────── */
.methodology-section {
  background: linear-gradient(170deg, #f8fffe 0%, #e8f7f5 50%, #f0fffc 100%);
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.method-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem 2rem 1.8rem;
  border: 1px solid rgba(20, 184, 166, 0.1);
  box-shadow: 0 2px 16px rgba(10, 22, 40, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.08);
}

.method-card-wide {
  grid-column: 1 / -1;
}

.method-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(16, 216, 196, 0.12);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.method-card h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.method-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.method-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: gap 0.3s ease;
}

.method-link:hover {
  gap: 10px;
}

.method-link i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.method-link:hover i {
  transform: translateX(2px);
}

.method-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: var(--radius);
}

.flow-step {
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  padding: 8px 20px;
  border: 1px solid rgba(16, 216, 196, 0.3);
  border-radius: 50px;
  background: rgba(16, 216, 196, 0.08);
  white-space: nowrap;
}

.flow-arrow {
  color: var(--accent);
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
  .method-card-wide {
    grid-column: auto;
  }
}

/* ── 11d. MENTAL ALCHEMY SECTION ─────────────────────────────── */
.mental-alchemy-section {
  background: linear-gradient(160deg, #0f172a 0%, #1a1a2e 50%, #16213e 100%);
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

.mental-alchemy-section .section-tag {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.08);
}

.mental-alchemy-section .section-title {
  color: white;
}

.mental-alchemy-section .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

/* MA Hero Visual */
.ma-hero-visual {
  margin-bottom: 3rem;
}

.ma-hero-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, #1a1a2e, #2d1b4e, #1a1a2e, #0f172a);
  background-size: 400% 400%;
  animation: maGradient 12s ease infinite;
}

.ma-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ma-fallback img { display: none; }

.ma-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.ma-fallback::after {
  content: "✦ Mental Alchemy IO ✦";
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: rgba(167, 139, 250, 0.6);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.ma-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.5rem;
}

.ma-hero-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  padding: 8px 24px;
  background: rgba(167, 139, 250, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes maGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ma-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ma-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.ma-feature {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.ma-feature:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.25);
}

.ma-feature i {
  font-size: 1.3rem;
  color: #a78bfa;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.ma-feature h4 {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.3rem;
}

.ma-feature p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

.ma-cta {
  text-align: center;
  padding-top: 1rem;
}

.ma-cta p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.ma-btn {
  background: linear-gradient(90deg, #7c3aed, #a78bfa) !important;
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.3) !important;
}

.ma-btn:hover {
  box-shadow: 0 20px 48px rgba(124, 58, 237, 0.4) !important;
}

@media (max-width: 900px) {
  .ma-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .ma-hero-img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .ma-features {
    grid-template-columns: 1fr;
  }
}

/* ── 12. CONTACT FORM ────────────────────────────────────────── */
.contact-form {
  max-width: 780px;
  margin: 2.5rem auto 0;
  display: grid;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid rgba(20, 184, 166, 0.3);
  border-radius: 16px;
  font-size: 1rem;
  background: white;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input::placeholder,
textarea::placeholder {
  color: #8494a7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(16, 216, 196, 0.14);
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%230c6b63' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

textarea {
  min-height: 155px;
  resize: vertical;
}

.form-submit-btn {
  justify-self: center;
  min-width: 280px;
}

.form-status {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  min-height: 1.5em;
}

.form-status.success {
  color: var(--primary);
}

/* ── 13. FOOTER ──────────────────────────────────────────────── */
footer {
  background: linear-gradient(170deg, var(--navy) 0%, #060e1a 100%);
  color: white;
  padding: 70px 0 28px;
  position: relative;
  z-index: 1;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--sea-glass), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand { max-width: 360px; }

.footer-logo {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.1rem;
}

.footer-desc {
  font-size: 0.93rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 1.7rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.footer-socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-5px) rotate(7deg);
  box-shadow: 0 10px 22px rgba(16, 216, 196, 0.32);
}

.footer-section h4 {
  font-size: 0.82rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer-section ul { list-style: none; }

.footer-section ul li { margin-bottom: 0.72rem; }

.footer-section ul a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
  display: inline-block;
  transition: color 0.3s, padding-left 0.3s;
}

.footer-section ul a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.contact-item i {
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.contact-item a {
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.3s;
  display: inline;
  padding-left: 0 !important;
}

.contact-item a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.8rem;
  border-top: 1px solid rgba(16, 216, 196, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.60);
}

.footer-links {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.60);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent); }

/* ── 14. ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gradientFlow {
  to { background-position: 200% center; }
}

@keyframes metalSheenOnce {
  0%   { background-position: -200% center; }
  100% { background-position: 250% center; }
}

@keyframes containerSheenOnce {
  0%   { opacity: 0; transform: translateX(-120%) skewX(-12deg); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(120%) skewX(-12deg); }
}

/* ── 15. SHEEN EFFECTS ───────────────────────────────────────── */
.hero-text-sheen {
  position: relative;
  display: block;
}

.hero-text-sheen::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(180, 255, 245, 0.00) 38%,
    rgba(180, 255, 245, 0.75) 46%,
    rgba(255, 255, 255, 1.00) 50%,
    rgba(180, 255, 245, 0.75) 54%,
    rgba(180, 255, 245, 0.00) 62%,
    transparent 75%
  );
  background-size: 300% 100%;
  background-position: -200% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  pointer-events: none;
}

.hero-text-sheen.sheen-active::after {
  animation: metalSheenOnce 2s ease-in-out forwards;
}

.sheen-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(180, 255, 245, 0.04) 38%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(180, 255, 245, 0.04) 62%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0;
}

.sheen-overlay.sheen-active {
  animation: containerSheenOnce 1.4s ease-in-out forwards;
}

/* ── 15b. LEGAL PAGES ────────────────────────────────────────── */
.legal-page {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: var(--section-pad);
  min-height: 80vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(20, 184, 166, 0.15);
}

.legal-content h2:first-child {
  margin-top: 1.5rem;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.legal-content a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

/* ── 16. RESPONSIVE ──────────────────────────────────────────── */

/* Collapse feature grid to 2 cols on medium screens */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Mobile nav breakpoint */
@media (max-width: 900px) {
  :root { --section-pad: 72px; }

  .hamburger { display: flex; }

  .nav-brand img {
    width: 80px;
    height: 80px;
    margin: -10px 0;
  }

  .logo { font-size: 1.15rem; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 14px 36px rgba(10, 22, 40, 0.15);
    z-index: 1999;
  }

  .nav-links.active { max-height: 400px; }

  .nav-links li {
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
  }

  .nav-links li:last-child { border-bottom: none; }

  .nav-links a {
    display: block;
    padding: 15px 24px;
    font-size: 1rem;
  }

  .nav-links a::after { display: none; }

  .grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .portfolio-section {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand { max-width: 100%; }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links { justify-content: center; }

  /* Stats bar stacks on mobile */
  .stats-inner {
    flex-direction: column;
    gap: 0;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(16, 216, 196, 0.15);
    padding: 20px 16px;
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}

/* 2-col portfolio on tablet landscape */
@media (min-width: 600px) and (max-width: 1023px) {
  .portfolio-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* 3-col portfolio on desktop */
@media (min-width: 1024px) {
  .portfolio-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --section-pad: 56px;
    --radius: 20px;
    --radius-sm: 10px;
  }

  .logo { font-size: 0.85rem; }

  .nav-brand img {
    width: 64px;
    height: 64px;
    margin: -8px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.02;
  }

  .hero p { font-size: 1rem; }

  .hero-tagline { font-size: 1.1rem; }

  .btn {
    padding: 13px 26px;
    font-size: 0.92rem;
  }

  .card { padding: 26px 22px; }

  .portfolio-content { padding: 1.4rem 1.4rem 1.6rem; }

  .portfolio-image {
    height: 185px;
    font-size: 3.5rem;
  }

  .section-header { margin-bottom: 2.8rem; }

  .contact-form { gap: 1rem; }

  .footer-grid { gap: 1.8rem; }

  .form-submit-btn {
    min-width: unset;
    width: 100%;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card,
  .portfolio-card,
  .image-container {
    opacity: 1;
    transform: none;
  }
}
