* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #000000;
  color: #ffffff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Accessibility */
.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;
}

/* Ribbon navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000000;
  border-bottom: 1px solid #222222;
  /* grey */
}

.nav {
  display: flex;
  align-items: center;
  /* center-align items vertically */
  justify-content: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  /* restore standard padding */
}

.nav .brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.brand-logo {
  height: 64px;
  width: auto;
  display: block;
}

.brand-label {
  font-size: 11px;
  font-weight: 400;
  color: #888888;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  display: none;
}

@media (min-width: 768px) {
  .brand-label {
    display: block;
  }
}

@media (max-width: 767px) {
  .brand-logo {
    height: 28px;
  }
}

.nav .links {
  margin-left: auto;
  display: flex;
  align-items: center;
  /* center-align right items */
  gap: 18px;
  /* even spacing for all right-side items */
}

.nav .links a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
}

.nav .links a:hover {
  opacity: 1;
}

.home-link {
  display: none;
}

@media (max-width: 767px) {
  .home-link {
    display: flex;
    order: -1;
    /* Place at top of mobile menu */
  }
}

/* Mobile menu toggle button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile menu styles */
@media (max-width: 767px) {
  .menu-toggle {
    display: flex;
  }

  .nav .links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 85vw);
    background: #000000;
    border-left: 1px solid #222222;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    margin-left: 0;
  }

  .nav .links[data-open="true"] {
    transform: translateX(0);
  }

  .nav .links a {
    width: 100%;
    min-height: 44px;
    padding: 16px 0;
    border-bottom: 1px solid #222222;
    font-size: 18px;
    display: flex;
    align-items: center;
  }

  .nav .links .contact-cta,
  .nav .links .phone-cta {
    width: auto;
    min-width: 44px;
    padding: 16px 0;
    border-bottom: 1px solid #222222;
  }

  .nav .links .contact-cta svg,
  .nav .links .phone-cta svg {
    width: 28px;
    height: 28px;
  }
}

/* Contact/Phone icons: compact hit area */
.contact-cta,
.phone-cta {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  text-decoration: none;
}

@media (max-width: 767px) {

  .contact-cta,
  .phone-cta {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
}

.contact-cta:hover svg path[stroke],
.phone-cta:hover svg path[stroke] {
  stroke: #ffffff;
}

.contact-cta:hover svg path:not([stroke]),
.phone-cta:hover svg path:not([stroke]) {
  stroke: #ffffff;
}

.main {
  min-height: calc(100vh - 60px);
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px 20px 32px;
}

.hero-strapline {
  margin-top: 32px;
  color: #cccccc;
  font-size: 18px;
  font-weight: 300;
  text-align: center;
  max-width: 800px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .hero-strapline {
    margin-top: 24px;
    font-size: 16px;
    padding: 0 16px;
  }
}

/* Animation stage */
.anim-stage {
  position: relative;
  width: min(100%, 800px);
  height: clamp(240px, 40vh, 320px);
  border: 1px solid #222222;
  /* grey */
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
}

/* Hero image container for other pages */
.hero-image-container {
  position: relative;
  width: min(100%, 1100px);
  height: min(80vh, 620px);
  border: 1px solid #222222;
  /* grey */
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
  display: grid;
  place-items: center;
}

.hero-image {
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  display: block;
}

/* Services page layout */
.page .services-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 0;
}

.page .services-content .hero-image-container {
  flex: 0 0 auto;
  width: min(400px, 45%);
  height: min(400px, 60vh);
}

.page .services-text {
  flex: 1;
  padding-right: 0;
}

.page .services-content img {
  width: auto;
  height: auto;
  max-width: 600px;
  max-height: 600px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .page .services-content {
    flex-direction: column;
    gap: 12px;
  }

  .page .services-content .hero-image-container {
    width: 100%;
    height: min(65vh, 400px);
  }
}

/* Mobile adjustments for hero and animation stage */
@media (max-width: 767px) {
  .nav {
    padding: 12px 16px;
  }

  .hero {
    padding: 24px 12px 40px;
  }

  .anim-stage {
    height: clamp(200px, 35vh, 260px);
    border-radius: 8px;
  }

  .hero-image-container {
    height: min(65vh, 500px);
    border-radius: 8px;
  }

  .page {
    margin: 24px auto;
    padding: 0 16px 60px;
  }

  .page h1 {
    margin: 20px 0 12px;
    font-size: clamp(24px, 5vw, 32px);
  }
}

.piece {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 150px;
  display: grid;
  place-items: center;
  opacity: 0;
  /* Default global scale, overridden responsively below */
  --scale: 2.2;
}

/* Greys for non-text elements */
svg [stroke] {
  stroke: #c0c0c0;
}

svg [fill="#ffffff"] {
  fill: #cfcfcf;
}

/* Keyframes: animate from edge offsets relative to center to per-piece final offsets */
@keyframes fly-in-centered {
  0% {
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.9) rotate(var(--sr));
    opacity: 0;
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(var(--scale, 1)) rotate(0deg);
    opacity: 1;
  }
}

/* Staggered durations */
.piece-eye {
  animation: fly-in-centered 1400ms cubic-bezier(.2, .8, .2, 1) var(--delay, 0ms) forwards;
}

.piece-connector {
  animation: fly-in-centered 1500ms cubic-bezier(.2, .8, .2, 1) var(--delay, 80ms) forwards;
}

.piece-text-precog {
  animation: fly-in-centered 1600ms cubic-bezier(.2, .8, .2, 1) var(--delay, 160ms) forwards;
}

.piece-text-recog {
  animation: fly-in-centered 1600ms cubic-bezier(.2, .8, .2, 1) var(--delay, 240ms) forwards;
}

.piece-scanlines {
  animation: fly-in-centered 1800ms cubic-bezier(.2, .8, .2, 1) var(--delay, 320ms) forwards;
}

/* Responsive scaling based on width */
@media (max-width: 480px) {
  .piece {
    --scale: 0.8;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .piece {
    --scale: 1.0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .piece {
    --scale: 1.3;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .piece {
    --scale: 1.6;
  }
}

@media (min-width: 1440px) {
  .piece {
    --scale: 1.8;
  }
}

/* Height-constrained fallback (keeps logo from clipping on short viewports) */
@media (max-height: 700px) and (max-width: 767px) {
  .piece {
    --scale: 0.8;
  }
}

@media (max-height: 700px) and (min-width: 768px) and (max-width: 1023px) {
  .piece {
    --scale: 1.1;
  }
}

@media (max-height: 700px) and (min-width: 1024px) {
  .piece {
    --scale: 1.4;
  }
}

/* Page content scaffolding */
.page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px 80px;
}

.page h1 {
  margin: 24px 0 12px;
  font-weight: 800;
}

.page p {
  color: #cccccc;
}

.page a,
.page p a,
.page li a {
  color: #b0b0b0;
  text-decoration: underline;
}

.page a:hover,
.page p a:hover,
.page li a:hover {
  color: #d0d0d0;
}

/* News items */
.news-item {
  margin-top: 24px;
  overflow: hidden;
  /* Contain floats */
}

.news-item>a {
  text-decoration: none;
  display: block;
}

.news-item>a:hover .news-image {
  opacity: 0.9;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.news-image {
  width: auto;
  max-width: 227px;
  /* Approximately 60mm at 96 DPI */
  height: auto;
  border-radius: 8px;
  border: 1px solid #222222;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .news-item>a {
    float: left;
    margin-right: 24px;
    margin-bottom: 12px;
  }

  .news-image {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .news-image {
    max-width: 227px;
    margin-bottom: 16px;
  }
}

/* Team page */
.team-entry {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-top: 24px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 28px 24px 24px;
  border: 1px solid #222222;
  border-radius: 12px;
  background: #0a0a0a;
  width: 220px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  border-color: #444444;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.04);
}

.team-photo-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 16px;
}

.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #333333;
  display: block;
}

.linkedin-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.team-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}

.team-title {
  margin: 6px 0 0;
  font-size: 14px;
  color: #999999;
  text-align: center;
}

@media (max-width: 767px) {
  .team-entry {
    flex-direction: column;
    align-items: center;
  }
}

.team-bio {
  color: #cccccc;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding-top: 28px;
}

/* ============================================
   Buy Journey — CTA Buttons
   ============================================ */

.buy-cta-group {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
}

.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid #444444;
}

.btn-secondary:hover {
  border-color: #888888;
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.06);
}

/* ============================================
   Buy Journey — Trial Form
   ============================================ */

.trial-form-section {
  margin-top: 48px;
  max-width: 480px;
}

.trial-form-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
}

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

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

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #cccccc;
}

.form-group label .required {
  color: #cc6666;
}

.form-group label .optional {
  font-weight: 400;
  color: #666666;
  font-size: 13px;
}

.form-group input {
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #0a0a0a;
  border: 1px solid #333333;
  border-radius: 8px;
  color: #ffffff;
  transition: border-color 0.25s ease;
}

.form-group input::placeholder {
  color: #555555;
}

.form-group input:focus {
  outline: none;
  border-color: #666666;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.trial-form .btn-primary {
  margin-top: 8px;
  width: 100%;
}

.trial-existing {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #222222;
}

.trial-existing p {
  font-size: 14px;
  color: #888888;
}

.trial-existing a {
  color: #b0b0b0;
  text-decoration: underline;
}

.trial-existing a:hover {
  color: #d0d0d0;
}

.trial-includes {
  margin-top: 32px;
  padding: 24px;
  background: #0a0a0a;
  border: 1px solid #222222;
  border-radius: 12px;
}

.trial-includes h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}

.trial-includes ul {
  margin: 0;
  padding: 0 0 0 20px;
  color: #cccccc;
}

.trial-includes li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.trial-note {
  margin-top: 16px;
  font-size: 14px;
  color: #888888;
  line-height: 1.5;
}

/* ============================================
   Buy Journey — Pricing Grid
   ============================================ */

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

.pricing-card {
  background: #0a0a0a;
  border: 1px solid #222222;
  border-radius: 12px;
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pricing-card:hover {
  border-color: #333333;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.03);
}

.pricing-card-featured {
  border-color: #444444;
  position: relative;
}

.pricing-card-featured::before {
  content: "Recommended";
  position: absolute;
  top: -12px;
  left: 28px;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.pricing-card-header {
  margin-bottom: 28px;
  position: relative;
}

.pricing-card-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}

.recommended-badge {
  position: absolute;
  top: -34px;
  left: 0;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.price {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
}

.price-period {
  font-size: 16px;
  font-weight: 400;
  color: #888888;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex: 1;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  color: #cccccc;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: "✓";
  color: #888888;
  font-size: 14px;
  flex-shrink: 0;
}

.pricing-card .btn-primary,
.pricing-card .btn-secondary {
  width: 100%;
  text-align: center;
}

@media (max-width: 767px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Buy Journey — How It Works Steps
   ============================================ */

.journey-section {
  margin-top: 64px;
}

.journey-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 32px;
}

.journey-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.journey-step {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 1px solid #444444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.journey-step h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.journey-step p {
  font-size: 14px;
  color: #888888;
  line-height: 1.5;
  margin: 0;
}

.journey-step-connector {
  width: 40px;
  height: 1px;
  background: #333333;
  margin-top: 20px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .journey-steps {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .journey-step {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
  }

  .step-number {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .journey-step-connector {
    width: 1px;
    height: 24px;
    margin-top: 0;
    margin-left: 20px;
  }
}

/* ============================================
   Buy Journey — FAQ Section
   ============================================ */

.faq-section {
  margin-top: 64px;
}

.faq-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
}

.faq-item {
  border-bottom: 1px solid #222222;
}

.faq-item summary {
  padding: 18px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #e0e0e0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: #666666;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: #ffffff;
}

.faq-item p {
  padding: 0 0 18px;
  margin: 0;
  font-size: 15px;
  color: #999999;
  line-height: 1.6;
}

/* Build version footer */
.build-version {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: #444444;
  font-family: monospace;
  z-index: 100;
  pointer-events: none;
  user-select: text;
}

@media (max-width: 767px) {
  .build-version {
    font-size: 9px;
    bottom: 6px;
    right: 8px;
  }
}

/* ============================================
   Home Page — Isophore Splash Area
   ============================================ */

.page.isophore-splash {
  margin-top: -20px; 
  padding-top: 0;
  border-top: none;
}

.isophore-splash .services-content {
  flex-direction: row;
  align-items: center;
  gap: 40px;
  padding-top: 60px;
}

.isophore-splash h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.isophore-splash .services-text {
  flex: 1;
}

.isophore-splash .services-text p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
}

.splash-thumbnail-container {
  flex: 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  background: #000;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.splash-thumbnail-container:hover {
  border-color: #555;
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.08);
}

.splash-thumbnail-container a {
  display: block;
  position: relative;
  text-decoration: none;
}

.splash-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.splash-thumbnail-container:hover .splash-image {
  transform: scale(1.02);
  opacity: 0.5;
}

.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  gap: 12px;
  transition: opacity 0.3s ease;
  color: #fff;
}

.splash-overlay svg {
  width: 48px;
  height: 48px;
}

.splash-overlay span {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.splash-thumbnail-container:hover .splash-overlay {
  opacity: 1;
}

.isophore-splash .action-buttons {
  margin-top: 32px;
}

@media (max-width: 900px) {
  .isophore-splash .services-content {
    flex-direction: column;
    gap: 32px;
  }
  
  .isophore-splash .services-text {
    order: 2;
  }
  
  .splash-thumbnail-container {
    order: 1;
    width: 100%;
  }
}