/* ============================================
   Mind AI — Brand styles
   ============================================ */

:root {
  --bg-primary: #001B3D;
  --text-primary: #FFFFFF;
  --accent-blue: #B2CCEE;
  --text-secondary: #B4B4B4;
  --accent-purple: #8b7ec8;

  --accent-blue-soft: rgba(178, 204, 238, 0.12);
  --accent-blue-glow: rgba(178, 204, 238, 0.22);
  --accent-purple-soft: rgba(139, 126, 200, 0.14);
  --border-subtle: rgba(178, 204, 238, 0.18);
  --border-faint: rgba(255, 255, 255, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --max-width: 1040px;
  --section-padding: clamp(5rem, 14vw, 9rem);
  --content-gap: clamp(1.5rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* iPhone-style device frame (Space Black / Graphite) */
  --device-bezel-highlight: rgba(255, 255, 255, 0.14);
  --device-bezel-mid: #2a2a2e;
  --device-bezel-dark: #121214;
  --device-bezel-deep: #08080a;
  --device-notch: #000000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2rem);
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Typography */
.section-title {
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  max-width: 28rem;
  margin: 0 auto clamp(3rem, 8vw, 4.5rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem clamp(1.25rem, 5vw, 2rem);
  background: rgba(0, 27, 61, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-faint);
  transition: padding var(--transition);
}

.site-header.is-scrolled {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
  background: transparent;
  isolation: isolate;
}

.logo-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
}

.logo-icon .brand-logo-img {
  background: transparent;
}

/* Shared logo image — identical treatment in header and hero */
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
  animation: none;
  box-shadow: none;
  image-rendering: auto;
}

.logo-icon.is-fallback {
  background: transparent;
  border: none;
}

.logo-icon.is-fallback .brand-logo-img,
.hero-logo.is-fallback .brand-logo-img {
  display: none;
}

.nav {
  display: flex;
  gap: 2.25rem;
}

.nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--accent-blue);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Hero */
.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: var(--section-padding);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 36rem;
  padding-top: 2rem;
}

.hero-logo-wrap {
  margin-bottom: clamp(2rem, 6vw, 3rem);
  position: relative;
  z-index: 1;
  background: transparent;
  opacity: 1;
  transform: none;
  transition: none;
  animation: none;
}

.hero-logo-wrap::before,
.hero-logo-wrap::after,
.hero-logo::before,
.hero-logo::after {
  content: none;
  display: none;
}

/* Disable scroll-reveal inside hero so sibling animations cannot repaint the logo */
#hero .reveal,
#hero .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-logo {
  width: clamp(79.2px, 19.8vw, 105.6px);
  height: clamp(79.2px, 19.8vw, 105.6px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-logo .brand-logo-img {
  opacity: 1;
  filter: none;
  background: transparent;
}

.hero-logo.is-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.hero-logo.is-fallback::after {
  content: "Mind AI";
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-blue);
}

/* Logos must never inherit scroll-reveal motion */
.hero-logo-wrap.reveal,
.logo-icon.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-title {
  font-size: clamp(2.25rem, 6.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.8vw, 1.3125rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  letter-spacing: -0.015em;
  max-width: 22em;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

/* App Store button */
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.6875rem 1.375rem 0.6875rem 1.125rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 980px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.app-store-btn:hover {
  transform: scale(1.02);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(178, 204, 238, 0.35);
}

.app-store-btn:active {
  transform: scale(0.98);
}

.app-store-btn--large {
  padding: 0.8125rem 1.625rem 0.8125rem 1.375rem;
}

.app-store-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.app-store-btn--large .app-store-icon {
  width: 30px;
  height: 30px;
}

.app-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.app-store-label {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.app-store-name {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.app-store-btn--large .app-store-name {
  font-size: 1.3125rem;
}

/* Screenshots */
.screenshots {
  position: relative;
}

.screenshots::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(178, 204, 238, 0.03) 40%,
    transparent 100%
  );
  pointer-events: none;
}

.screenshots .container {
  position: relative;
  z-index: 1;
}

.screenshot-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: stretch;
  padding: 0 clamp(0rem, 2vw, 1rem);
}

.screenshot-frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.screenshot-device {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 7px;
  border-radius: calc(var(--radius-xl) + 4px);
  background: linear-gradient(
    155deg,
    #45454c 0%,
    var(--device-bezel-mid) 14%,
    var(--device-bezel-dark) 38%,
    var(--device-bezel-deep) 72%,
    #1c1c20 100%
  );
  border: 1px solid rgba(28, 28, 32, 0.9);
  box-shadow:
    inset 0 1px 0 var(--device-bezel-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    inset -1px 0 0 rgba(0, 0, 0, 0.35),
    0 20px 40px rgba(0, 0, 0, 0.42),
    0 6px 14px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.65);
  transition:
    transform 250ms cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 250ms cubic-bezier(0.25, 0.1, 0.25, 1),
    border-color 250ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.screenshot-media {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 9 / 19.5;
  border-radius: calc(var(--radius-xl) - 2px);
  overflow: hidden;
  background: var(--device-bezel-deep);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

/* Dynamic Island — identical on all four frames */
.screenshot-media::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 20px;
  background: var(--device-notch);
  border-radius: 18px;
  z-index: 3;
  pointer-events: none;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.screenshot-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.screenshot-media .screenshot-img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: calc(var(--radius-xl) - 2px);
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.screenshot-media .screenshot-placeholder {
  display: none;
}

.screenshot-media.is-fallback .screenshot-img {
  display: none;
}

.screenshot-media.is-fallback .screenshot-placeholder {
  display: flex;
}

.screenshot-placeholder {
  aspect-ratio: 9 / 19.5;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    #1a1a1e 0%,
    var(--device-bezel-dark) 50%,
    var(--device-bezel-deep) 100%
  );
  border-radius: calc(var(--radius-xl) - 2px);
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.screenshot-placeholder span {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 0.75rem;
}

/* Screenshot hover — desktop only */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .screenshot-showcase {
    padding-bottom: 14px;
  }

  .screenshot-frame:hover .screenshot-device {
    transform: translateY(-12px);
    border-color: rgba(178, 204, 238, 0.22);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.55),
      0 32px 58px rgba(0, 0, 0, 0.48),
      0 10px 20px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(178, 204, 238, 0.22),
      0 0 18px rgba(178, 204, 238, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screenshot-device {
    transition: none;
  }

  .screenshot-frame:hover .screenshot-device {
    transform: none;
  }
}

/* How It Works */
.how-it-works {
  border-top: 1px solid var(--border-faint);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 36rem;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 1.75rem;
  align-items: start;
  padding: clamp(1.75rem, 4vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-faint);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--transition), background var(--transition);
}

.step:hover {
  border-color: var(--border-subtle);
  background: var(--accent-blue-soft);
}

.step-number {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bg-primary);
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-blue-soft);
}

.step:first-child .step-number {
  background: linear-gradient(135deg, var(--accent-blue) 0%, rgba(139, 126, 200, 0.5) 100%);
}

.step-title {
  font-size: clamp(1.0625rem, 2.5vw, 1.1875rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* Download */
.download {
  text-align: center;
  border-top: 1px solid var(--border-faint);
  background-color: var(--bg-primary);
}

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-title {
  font-size: clamp(1.875rem, 4.5vw, 2.625rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 16ch;
}

.download-subtitle {
  font-size: clamp(1.0625rem, 2.2vw, 1.125rem);
  color: var(--text-secondary);
  margin-bottom: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
}

/* Contact */
.contact {
  border-top: 1px solid var(--border-faint);
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

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

.contact-text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.contact-email {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--accent-blue);
  letter-spacing: -0.01em;
  transition: opacity var(--transition);
}

.contact-email:hover {
  opacity: 0.8;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border-faint);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
}

.footer-brand {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* Responsive — mobile first refinements */
@media (max-width: 900px) {
  .screenshot-showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 420px;
    margin: 0 auto;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1.25rem;
    background: rgba(0, 27, 61, 0.96);
    border-bottom: 1px solid var(--border-faint);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding: 0.875rem 2rem;
    text-align: center;
    font-size: 0.9375rem;
  }

  .menu-toggle {
    display: flex;
  }

  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .screenshot-showcase {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
    gap: 0.875rem;
  }

  .screenshot-device {
    padding: 5px;
    border-radius: 1.25rem;
  }

  .screenshot-media,
  .screenshot-media .screenshot-img,
  .screenshot-placeholder {
    border-radius: 1rem;
  }

  .screenshot-media::before {
    top: 8px;
    height: 16px;
  }
}

@media (min-width: 901px) {
  .screenshot-showcase {
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
  }
}
