/* ================================================================
   Canvads — Design System
   Warm, editorial, anti-SaaS aesthetic
   ================================================================ */

/* ---- Circular Std — self-hosted ---- */
@font-face {
  font-family: 'Circular Std';
  src: url('/fonts/CircularStd-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: url('/fonts/CircularStd-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Circular Std';
  src: url('/fonts/CircularStd-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Force logo size — override global max-width for real mobile devices */
img.comp-logo {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  min-width: 28px;
  min-height: 28px;
}

:root {
  --bg: #faf8f4;
  --bg-alt: #f0ece4;
  --text: #1a1714;
  --text-mid: #4a4540;
  --text-muted: #7a756e;
  --accent: #c44b1a;
  --accent-hover: #a33d14;
  --border: #d9d3ca;
  --success: #2d6a30;
  --error: #b91c1c;
  --radius: 6px;
  --font-display: 'Circular Std', system-ui, sans-serif;
  --font-body: 'Circular Std', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */
.header,
.hero,
.waitlist,
.video-section,
.footer {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* ---- Header ---- */
.header {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* ---- Hero ---- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
}

.hero-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 18ch;
  margin-bottom: 1.5rem;
}

.price-kill {
  position: relative;
  color: var(--text-muted);
}

.price-kill::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: 52%;
  height: 3px;
  background: var(--accent);
  transform: rotate(-2deg);
}

.hero-sub {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 52ch;
}

/* -- Inline competitor logos -- */
.logo-strip {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-inline: 0.25em;
}

.comp-logo {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px;
  max-height: 28px;
  border-radius: 5px;
  object-fit: cover;
  border: 1.5px solid var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  flex-shrink: 0;
}

.comp-logo:first-child {
  transform: rotate(-6deg);
}

.comp-logo:last-child {
  transform: rotate(4deg);
}

.comp-logo+.comp-logo {
  margin-left: -6px;
}

.comp-logo:hover {
  transform: scale(1.35) rotate(0deg);
  z-index: 2;
}

/* -- Mobile line break -- */
.mobile-break {
  display: inline;
}

@media (max-width: 600px) {
  .mobile-break {
    display: block;
  }

  /* ---- Mobile: fix logo sizing on real devices ---- */
  img.comp-logo {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
  }

  /* ---- Mobile: prevent video section blowout on real devices ---- */
  .video-section {
    overflow: hidden !important;
    max-width: 100vw !important;
  }

  .carousel-track {
    gap: 0.5rem;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .active-slide {
    width: 140px !important;
    max-width: 38vw !important;
    overflow: hidden !important;
    contain: inline-size;
  }

  .active-slide video {
    width: 100% !important;
    max-width: 140px !important;
    max-height: 55vh !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  .ph-md {
    width: 100px !important;
    max-width: 26vw !important;
  }

  .ph-sm {
    width: 70px !important;
    max-width: 18vw !important;
  }

  .video-headline {
    font-size: 0.8rem;
  }
}

/* ---- Video Section ---- */
.video-section {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  padding-block: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
}

.video-headline {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  margin-top: 1rem;
}

/* -- Carousel -- */
.carousel-track {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: 0.5rem;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
}

.active-slide {
  width: 180px;
  max-width: 38vw;
  border: 1px solid var(--border);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  overflow: hidden;
}

.active-slide video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.placeholder-slide {
  aspect-ratio: 9 / 16;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: opacity 0.2s;
}

.ph-md {
  width: 140px;
  max-width: 28vw;
  opacity: 0.35;
  flex-shrink: 0;
}

.ph-sm {
  width: 100px;
  max-width: 20vw;
  opacity: 0.2;
  flex-shrink: 0;
}

.placeholder-slide:hover {
  opacity: 0.55;
}

/* ---- Waitlist ---- */
.waitlist {
  padding-block: clamp(2rem, 5vw, 4rem);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.section-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---- Form ---- */
form {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.25rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 1.5vw, 1rem);
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
}

input[type="text"],
input[type="email"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 75, 26, 0.08);
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Budget pills */
.budget-fieldset {
  border: none;
}

.budget-fieldset legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 0.6rem;
}

.budget-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.budget-opt {
  position: relative;
  cursor: pointer;
}

.budget-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.budget-opt span {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-mid);
  transition: all 0.15s ease;
  user-select: none;
}

.budget-opt input:checked+span {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 75, 26, 0.05);
}

.budget-opt:hover span {
  border-color: var(--text-muted);
}

.budget-opt input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Submit */
.btn-submit {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  align-self: flex-start;
}

.btn-submit:hover {
  background: var(--accent);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-submit.is-loading .btn-label {
  visibility: hidden;
}

.btn-submit.is-loading .btn-spinner {
  display: block;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  position: absolute;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* States */
.success-msg[hidden],
.error-msg[hidden] {
  display: none !important;
}

.success-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--success);
  font-weight: 500;
  animation: fadeIn 0.4s ease;
}

.success-msg svg {
  flex-shrink: 0;
}

.error-msg {
  color: var(--error);
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
}

.field-error input {
  border-color: var(--error) !important;
}

.field-error-text {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.15rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- CTA Section ---- */
.cta-section {
  padding-block: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  max-width: 680px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  content-visibility: auto;
  contain-intrinsic-size: 0 200px;
}

.cta-text {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
}

/* ---- Social Proof & Objection ---- */
.proof-section {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  max-width: 680px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
  content-visibility: auto;
  contain-intrinsic-size: 0 150px;
}

.social-proof {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
}

.objection-killer {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ---- Footer ---- */
.footer {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Entrance animation ---- */
@media (prefers-reduced-motion: no-preference) {

  .hero-tag,
  .hero-title,
  .hero-sub {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: opacity, transform;
  }

  .hero-title {
    animation-delay: 0.06s;
  }

  .hero-sub {
    animation-delay: 0.12s;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}