/* ============================================
   ClawdPay.ai — Styles
   Matches OpenClaws.agency theme exactly
   ============================================ */

/* --- CSS Variables --- */
:root {
  --coral: #ff4d4d;
  --coral-mid: #e63946;
  --coral-dark: #991b1b;
  --coral-glow: rgba(255, 77, 77, .25);
  --teal: #00e5cc;
  --teal-mid: #14b8a6;
  --teal-glow: rgba(0, 229, 204, .2);
  --bg-deep: #050810;
  --bg-surface: #0a0f1a;
  --bg-elevated: #111827;
  --text-primary: #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted: #5a6480;
  --border-subtle: rgba(136, 146, 176, .15);
  --border-accent: rgba(255, 77, 77, .3);
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
input, textarea, select { font: inherit; }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--coral);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus {
  top: 16px;
}

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

/* --- Typography --- */
.text-coral { color: var(--coral); }
.text-gradient {
  background: linear-gradient(135deg, var(--coral), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Tag --- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--coral);
  margin-bottom: 16px;
  letter-spacing: .02em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 0 20px var(--coral-glow);
}
.btn--primary:hover {
  background: var(--coral-mid);
  box-shadow: 0 0 30px var(--coral-glow), 0 4px 20px rgba(0,0,0,.3);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn--outline:hover {
  border-color: var(--coral);
  color: var(--coral);
  box-shadow: 0 0 20px var(--coral-glow);
  transform: translateY(-2px);
}
.btn--sm {
  padding: 10px 20px;
  font-size: .85rem;
}
.btn--full {
  width: 100%;
  justify-content: center;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
}
.nav {
  height: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(5, 8, 16, .8);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  font-size: .9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav__link:hover {
  color: var(--text-primary);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width var(--transition);
}
.nav__link:hover::after {
  width: 100%;
}
.nav__cta {
  margin-left: 8px;
}

/* Mobile Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}
.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav__toggle.active .nav__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active .nav__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(136, 146, 176, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 146, 176, .06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}
.hero__glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--coral-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -.03em;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}
.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Terminal --- */
.terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
}
.terminal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }
.terminal__title {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: auto;
}
.terminal__body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.8;
}
.terminal__line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s, transform .4s;
}
.terminal__line.visible {
  opacity: 1;
  transform: translateY(0);
}
.terminal__prompt {
  color: var(--teal);
  margin-right: 8px;
}
.terminal__text {
  color: var(--text-primary);
}
.terminal__accent {
  color: var(--coral);
}
.terminal__line--output {
  color: var(--text-secondary);
}
.terminal__success {
  color: var(--teal);
}
.terminal__line--success {
  color: var(--teal);
}

/* Typing cursor */
.typing::after {
  content: '▋';
  animation: blink .8s infinite;
  color: var(--teal);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Sections --- */
.section {
  padding: 100px 0;
  position: relative;
}
.section--alt {
  background: var(--bg-surface);
}
.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
  letter-spacing: -.02em;
}
.section__cta {
  text-align: center;
  margin-top: 48px;
}

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

/* --- Cards --- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  border-top: 3px solid transparent;
}
.card:hover {
  border-top-color: var(--coral);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3), 0 0 20px var(--coral-glow);
}
.card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.card__icon--lg {
  font-size: 2.5rem;
}
.card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.card__desc {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Steps --- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.step {
  display: flex;
  gap: 28px;
  padding: 32px 0;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 76px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--coral), var(--teal));
  opacity: .3;
}
.step__number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--coral-mid));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--coral-glow);
}
.step__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.step__desc {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- About --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__text p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.about__text strong {
  color: var(--text-primary);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 4px;
}
.stat__label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Code block */
.code-block {
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
}
.code-comment {
  color: var(--text-muted);
}
.code-key {
  color: var(--teal);
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
  overflow: hidden;
}
.faq[open] {
  border-color: var(--border-accent);
}
.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  list-style: none;
  transition: color var(--transition);
}
.faq__question::-webkit-details-marker {
  display: none;
}
.faq__question::marker {
  display: none;
  content: '';
}
.faq__question:hover {
  color: var(--coral);
}
.faq__icon {
  font-size: 1.4rem;
  color: var(--coral);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}
.faq[open] .faq__icon {
  transform: rotate(45deg);
}
.faq__answer {
  padding: 0 24px 20px;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.faq__answer strong {
  color: var(--text-primary);
}

/* --- Contact --- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-glow);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-status {
  margin-top: 16px;
  font-size: .9rem;
  text-align: center;
  min-height: 24px;
}
.form-status--success {
  color: var(--teal);
}
.form-status--error {
  color: var(--coral);
}

/* Contact Cards */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.contact-card__text {
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.contact-card__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--coral);
  transition: opacity var(--transition);
}
.contact-card__email:hover {
  opacity: .8;
}

/* Next Steps */
.next-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.next-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: .9rem;
  line-height: 1.5;
}
.next-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Footer --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand .nav__logo {
  margin-bottom: 12px;
  display: inline-block;
}
.footer__tagline {
  font-size: .9rem;
  color: var(--text-muted);
  max-width: 320px;
}
.footer__heading {
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}
.footer__links li {
  margin-bottom: 10px;
}
.footer__links a {
  font-size: .9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__links a:hover {
  color: var(--coral);
}
.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer__bottom a {
  color: var(--coral);
  transition: opacity var(--transition);
}
.footer__bottom a:hover {
  opacity: .8;
}

/* --- Scroll Animations --- */
.anim-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.4, 0, .2, 1), transform .6s cubic-bezier(.4, 0, .2, 1);
}
.anim-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid .anim-fade:nth-child(2) { transition-delay: .08s; }
.grid .anim-fade:nth-child(3) { transition-delay: .16s; }
.grid .anim-fade:nth-child(4) { transition-delay: .24s; }
.grid .anim-fade:nth-child(5) { transition-delay: .32s; }
.grid .anim-fade:nth-child(6) { transition-delay: .40s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero__subtitle {
    margin: 0 auto 32px;
  }
  .hero__ctas {
    justify-content: center;
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav__toggle {
    display: flex;
  }
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    gap: 0;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 999;
  }
  .nav__menu.open {
    transform: translateX(0);
  }
  .nav__link {
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }
  .nav__link::after {
    display: none;
  }
  .nav__cta {
    margin-left: 0;
    margin-top: 16px;
    text-align: center;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 40px;
  }
  .hero__inner {
    padding: 40px 24px;
  }
  .hero__title {
    font-size: 1.8rem;
  }

  .section {
    padding: 64px 0;
  }
  .section__title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer__brand {
    grid-column: auto;
  }

  .step {
    gap: 20px;
    padding: 24px 0;
  }
  .step:not(:last-child)::after {
    left: 20px;
    top: 68px;
  }
  .step__number {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero__title {
    font-size: 1.5rem;
  }
  .hero__subtitle {
    font-size: .95rem;
  }
  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    padding: 12px 24px;
    font-size: .9rem;
  }
  .card {
    padding: 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat {
    padding: 16px 8px;
  }
  .stat__number {
    font-size: 1.2rem;
  }
  .terminal__body {
    padding: 16px;
    font-size: .75rem;
  }
}

/* --- Mobile Menu Overlay --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Print --- */
@media print {
  .site-header, .hero__grid-bg, .hero__glow, .nav-overlay { display: none; }
  body { background: #fff; color: #000; }
  .card, .terminal { border: 1px solid #ccc; box-shadow: none; }
}
