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

:root {
  --cf-orange: #F48120;
  --cf-orange-light: #FBAD41;
  --bg: #fafaf9;
  --text-primary: #000000;
  --text-secondary: #52525c;
  --text-muted: #6a7282;
  --border-color: #000000;
  --card-bg: #ffffff;
  --card-hover: #fafafa;
  --success: #22c55e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Canvas - only visible in marketing sections */
#backgroundCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.show-dots #backgroundCanvas {
  opacity: 1;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.header-inner {
  max-width: calc(1130px + 64px);
  height: 80px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 66px;
  height: 30px;
  color: var(--cf-orange);
  transition: color 0.2s;
}

.logo:hover .logo-icon {
  color: var(--text-primary);
}

/* Header search */
.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 500px;
  margin: 0 32px;
  padding: 8px 16px;
  border: 1px solid rgba(244, 129, 32, 0.3);
  border-radius: 8px;
  background: rgba(244, 129, 32, 0.03);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

body.searching .header-search,
.header-search.header-search-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search:focus-within {
  border-color: rgba(244, 129, 32, 0.6);
  background: rgba(244, 129, 32, 0.05);
}

.header-search-prompt {
  font-size: 18px;
  font-weight: 600;
  color: var(--cf-orange);
  margin-right: 8px;
}

.header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  outline: none;
  caret-color: transparent;
}

.header-search-input::placeholder {
  color: var(--text-muted);
}

.header-search-cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background: var(--cf-orange);
  margin-right: 8px;
  animation: headerCursorBlink 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes headerCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.header-search-clear {
  display: none;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.header-search-clear:hover {
  background: rgba(0,0,0,0.2);
  color: var(--text-primary);
}

.header-search.has-value .header-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Header nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
}

.nav-link {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--cf-orange);
}

.nav-btn {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: white;
  background: var(--text-primary);
  text-decoration: none;
  padding: 16px 32px;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #333;
}

/* Main scroll container */
.main-scroll {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  padding-top: 80px;
  overflow: hidden;
  scroll-snap-align: start;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: calc(1130px + 64px);
  padding: 0 32px;
  padding-bottom: 80px;
  margin: 0 auto;
  width: 100%;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.title-line {
  display: block;
}

.title-line-input {
  display: flex;
  align-items: center;
  cursor: text;
}

.title-prompt {
  color: var(--cf-orange);
  margin-right: 0.2em;
}

.title-typed {
  color: var(--text-primary);
  white-space: pre;
}

.title-typed.typing-placeholder {
  color: #9ca3af;
}

.title-cursor {
  display: inline-block;
  width: 12px;
  height: 0.9em;
  background: var(--cf-orange);
  margin-left: 4px;
  animation: titleCursorBlink 1s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes titleCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-title-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.hero-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
}

body.searching .hero-section {
  display: none;
}

/* Results Section */
.results-section {
  display: none;
  min-height: 100vh;
  padding: 120px 32px 80px;
}

body.searching .results-section {
  display: block;
}

.results-container {
  max-width: 1130px;
  margin: 0 auto;
}

.results-group {
  margin-bottom: 48px;
}

.results-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Domain card */
.domain-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.domain-card:hover {
  border-color: var(--cf-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.domain-card.featured {
  border-color: var(--cf-orange);
  background: linear-gradient(135deg, rgba(244, 129, 32, 0.03) 0%, transparent 100%);
}

.domain-name {
  font-size: 16px;
  font-weight: 500;
  word-break: break-all;
  color: var(--text-primary);
}

.domain-tld {
  color: var(--cf-orange);
}

.domain-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.domain-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.domain-status {
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.domain-status.available {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.domain-status.premium {
  background: rgba(244, 129, 32, 0.1);
  color: var(--cf-orange);
}

.domain-status.taken {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
}

/* Features Section */
.features-section {
  min-height: 100vh;
  padding: 120px 32px;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

.section-inner {
  max-width: 1130px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 48px;
}

.section-title-serif {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.section-link {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--cf-orange);
}

.features-grid {
  display: flex;
  border-top: 1px solid var(--border-color);
}

.feature-card {
  flex: 1;
  padding: 48px;
  border-right: 1px solid var(--border-color);
  transition: background 0.2s;
}

.feature-card:last-child {
  border-right: none;
}

.feature-card:hover {
  background: rgba(255,255,255,0.5);
}

.feature-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}

.feature-icon-shadow {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 100%;
  height: 100%;
  background: var(--cf-orange);
  transition: background 0.2s;
}

.feature-card:hover .feature-icon-shadow {
  background: var(--text-primary);
}

.feature-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.feature-card:hover .feature-icon {
  transform: translate(-2px, -2px);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.feature-card:hover .feature-title {
  color: var(--cf-orange);
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Why Section */
.why-section {
  min-height: 100vh;
  padding: 120px 32px;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.why-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.why-title em {
  color: #f63;
  font-style: italic;
}

.why-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.why-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-orange);
  text-decoration: none;
  transition: color 0.2s;
}

.why-cta:hover {
  color: var(--text-primary);
}

.why-stats {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  color: var(--cf-orange);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Pricing Graph Section */
.pricing-section {
  min-height: 100vh;
  padding: 120px 32px;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.pricing-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-box {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 48px 64px;
  box-shadow: 16px 16px 0px 0px #000000;
  transition: box-shadow 0.3s ease;
}

.pricing-box:hover {
  box-shadow: 20px 20px 0px 0px var(--cf-orange);
}

.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.pricing-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  margin-bottom: 12px;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
}

.pricing-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pricing-icon span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
}

.pricing-box:hover .pricing-icon {
  background: var(--text-primary);
  color: white;
}

.pricing-box:hover .pricing-icon span {
  color: var(--cf-orange);
}

.pricing-bars {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.price-bar-item {
  position: relative;
}

.price-bar-item.competitor {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.price-bar-item.competitor:hover {
  opacity: 1;
}

.price-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}

.price-bar-label {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.price-bar-label.muted {
  font-weight: 400;
  color: #71717b;
}

.price-bar-item.cloudflare:hover .price-bar-label {
  color: var(--cf-orange);
}

.price-bar-value {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 20px;
  font-weight: 700;
  padding: 4px 8px;
}

.price-bar-value.green {
  background: #e6f7eb;
  color: #00a63e;
}

.price-bar-value.red {
  color: #fb2c36;
  text-decoration: line-through;
}

.price-bar-track {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-color);
  padding: 4px;
  background: white;
  position: relative;
  overflow: hidden;
}

.price-bar-track.muted {
  border-color: rgba(0,0,0,0.2);
  background: #fafafa;
}

.price-bar-fill {
  height: 100%;
  width: 0;
  transition: width 1s ease-out;
}

.price-bar-fill.orange {
  background: linear-gradient(to right, #F48120, #fda45d);
}

.price-bar-fill.gray {
  background: linear-gradient(to right, #d4d4d8, #e4e4e7);
  position: relative;
}

.price-bar-fill.gray::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, #000 10px, #000 12px);
}

.price-bar-item.animated .price-bar-fill {
  width: var(--target-width);
}

.price-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 2px dashed rgba(0,0,0,0.2);
}

.markup-label {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateX(100%) rotate(-90deg);
  transform-origin: left center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fb2c36;
}

/* Footer Section */
.footer-section {
  position: relative;
  min-height: 100vh;
  padding: 120px 32px 48px;
  background: #FFF7ED;
  overflow: hidden;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

#footerCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1130px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}

.footer-brand {
  grid-column: 1;
}

.footer-logo {
  width: 48px;
  height: auto;
  color: var(--text-primary);
  margin-bottom: 24px;
  transition: color 0.2s;
}

.footer-logo:hover {
  color: var(--cf-orange);
}

.footer-tagline {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
}

.footer-tagline em {
  color: #f63;
  font-style: italic;
}

.footer-links {
  grid-column: 2 / 4;
  display: flex;
  gap: 80px;
  justify-content: flex-end;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--cf-orange);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text-primary);
}

/* Loading animation */
.loading {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-dot {
  width: 6px;
  height: 6px;
  background: var(--cf-orange);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    flex-direction: column;
  }
  
  .feature-card {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .feature-card:last-child {
    border-bottom: none;
  }
  
  .why-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-column: 1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 20px;
  }
  
  .hero-section,
  .results-section,
  .features-section,
  .why-section,
  .footer-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .header-nav {
    gap: 16px;
  }
  
  .nav-btn {
    padding: 12px 20px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .title-cursor {
    width: 16px;
    height: 28px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 32px;
  }
}
