/* ==========================================================
   styles.css — acosta.me
   ========================================================== */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-void:    #0a0a0c;
  --bg-deep:    #0e0e12;
  --bg-surface: #16161d;

  --text-primary:   #e8eaf0;
  --text-secondary: #c8ccd4;
  --text-muted:     #8a95a0;

  --accent-silver:  #a0aab8;
  --accent-glow:    rgba(200, 204, 212, 0.06);
  --accent-line:    rgba(200, 204, 212, 0.11);
  --accent-warm:    var(--accent-red);
  --accent-red:     #b83a3f;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);

  --pad-x: clamp(1.75rem, 7vw, 5.5rem);
  --pad-y: clamp(5rem, 11vh, 8rem);
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── Grain Overlay ─────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Typography ────────────────────────────────────────── */
.label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.58rem, 0.9vw, 0.68rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* ── Section Base ──────────────────────────────────────── */
section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: clip;
  padding: var(--pad-y) var(--pad-x);
}

/* ── CTA Button ────────────────────────────────────────── */
.cta-button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--accent-red);
  padding: 1.05rem 2.75rem;
  border: none;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 4px;
  transition: background 0.3s ease, box-shadow 0.4s ease, transform 0.25s var(--ease-expo), outline-color 0.35s ease;
  white-space: nowrap;
}

.cta-button:hover {
  background: #c94449;
  outline-color: rgba(184, 58, 63, 0.45);
  box-shadow:
    0 0 0 1px rgba(184, 58, 63, 0.2),
    0 0 22px 4px rgba(184, 58, 63, 0.14),
    0 0 60px 12px rgba(184, 58, 63, 0.07);
  transform: translateY(-2px);
}

.cta-button:focus-visible {
  outline: 1px solid var(--accent-silver);
  outline-offset: 5px;
}

/* ── Scroll Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 1.1s var(--ease-expo), transform 1.1s var(--ease-expo);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}


/* ==========================================================
   S1 — HERO
   ========================================================== */

#hero {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 29px,
      rgba(255, 255, 255, 0.016) 29px,
      rgba(255, 255, 255, 0.016) 30px
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 29px,
      rgba(255, 255, 255, 0.016) 29px,
      rgba(255, 255, 255, 0.016) 30px
    ),
    radial-gradient(ellipse 72% 55% at 50% 42%, rgba(184, 58, 63, 0.09) 0%, transparent 62%),
    radial-gradient(ellipse 85% 65% at 12% 18%, rgba(110, 130, 170, 0.10) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 88% 80%, rgba(80, 100, 150, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 95%, rgba(184, 58, 63, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 8% 85%, rgba(184, 58, 63, 0.06) 0%, transparent 55%),
    linear-gradient(160deg, #0d0d12 0%, #0a0a0c 45%, #0c0b10 100%);
  justify-content: center;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.8rem;
  max-width: 960px;
}

.hero-label {
  animation: fadeUp 0.9s var(--ease-expo) 0.2s both;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.hero-label::before,
.hero-label::after {
  content: '';
  display: block;
  flex: 0 1 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(160, 170, 185, 0.35));
}

.hero-label::after {
  background: linear-gradient(to left, transparent, rgba(160, 170, 185, 0.35));
}

.hero-domain {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.8rem, 12vw, 10rem);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  animation: fadeUp 1s var(--ease-expo) 0.38s both;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.hero-domain::before {
  content: '';
  position: absolute;
  bottom: -0.18em;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(184, 58, 63, 0.5) 25%,
    rgba(200, 204, 212, 0.55) 50%,
    rgba(184, 58, 63, 0.5) 75%,
    transparent
  );
  pointer-events: none;
}


.hero-domain .tld {
  color: var(--accent-red);
  font-weight: 700;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.45rem);
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  animation: fadeUp 0.9s var(--ease-expo) 0.54s both;
}

.hero-sub {
  font-size: clamp(0.82rem, 1.3vw, 0.96rem);
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 500px;
  animation: fadeUp 0.9s var(--ease-expo) 0.68s both;
}

.hero-cta {
  margin-top: 0.5rem;
  animation: fadeUp 0.9s var(--ease-expo) 0.86s both;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: fadeUp 1s var(--ease-expo) 1.3s both;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--accent-line));
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out 1.5s infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.8; transform: scaleY(1.15); }
}

/* Section scroll-down arrow */
.section-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--accent-silver);
  opacity: 0;
  animation: chev-fade-in 0.8s var(--ease-expo) 1.8s forwards,
             chev-bob 2s ease-in-out 2.6s infinite;
  pointer-events: none;
}

.section-scroll-hint svg {
  display: block;
  width: 32px;
  height: 44px;
}

/* Cascading wave: tail → top chevron → bottom chevron */
.section-scroll-hint .chev-tail {
  animation: chev-wave 1.6s ease-in-out infinite;
}
.section-scroll-hint .chev-a {
  animation: chev-wave 1.6s ease-in-out 0.22s infinite;
}
.section-scroll-hint .chev-b {
  animation: chev-wave 1.6s ease-in-out 0.44s infinite;
}

@keyframes chev-wave {
  0%, 100% { opacity: 0.15; }
  35%, 60% { opacity: 1; }
}

@keyframes chev-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1;  transform: translateX(-50%) translateY(0); }
}

@keyframes chev-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* ==========================================================
   S2 — RANK #510
   ========================================================== */

#rank {
  background: var(--bg-deep);
}

/* Rings */
.rings-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
}

.ring-1 {
  width: min(520px, 82vw);
  height: min(520px, 82vw);
  border: 1px solid var(--accent-line);
  opacity: 0.55;
}

.ring-2 {
  width: min(780px, 118vw);
  height: min(780px, 118vw);
  border: 1px dashed rgba(200, 204, 212, 0.05);
}

.arc-svg {
  position: absolute;
  width: min(600px, 95vw);
  height: min(600px, 95vw);
}

.arc-circle {
  transform-origin: center;
  transform: rotate(-90deg);
  /* stroke-dasharray + stroke-dashoffset set by JS */
  transition: stroke-dashoffset 2s var(--ease-expo);
}

/* Stat content shared */
.stat-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  max-width: 700px;
  width: 100%;
}

.stat-content--narrow {
  max-width: 480px;
}

.stat-content--world {
  max-width: 680px;
}

.stat-number-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1;
  gap: 0.08em;
}

.stat-hash {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  color: var(--text-muted);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5.5rem, 18vw, 13.5rem);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.025em;
}

.stat-sub {
  font-size: clamp(0.82rem, 1.3vw, 0.96rem);
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 440px;
}

.stat-sub--wide {
  max-width: 560px;
}


/* ==========================================================
   S3 — 66,013
   ========================================================== */

#count-us {
  background: var(--bg-void);
}

.watermark-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.watermark-bg::before {
  content: attr(data-watermark);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(10rem, 38vw, 44rem);
  color: rgba(200, 204, 212, 0.022);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.stat-rule {
  width: 100%;
  border: none;
  border-top: 1px solid var(--accent-line);
  margin: 0.2rem 0;
}

.stat-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.82rem, 1.25vw, 0.96rem);
  color: var(--accent-silver);
  opacity: 0.88;
  letter-spacing: 0.01em;
}


/* ==========================================================
   S4 — 1.34M+
   ========================================================== */

#count-world {
  background: var(--bg-deep);
}

#dot-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stat-context {
  font-size: clamp(0.6rem, 1vw, 0.72rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.6rem;
}


/* ==========================================================
   S5 — 151 Countries
   ========================================================== */

#count-countries {
  background: var(--bg-void);
}

.globe-left,
.globe-right {
  position: absolute;
  top: 50%;
  height: min(520px, 82vh);
  width: auto;
  pointer-events: none;
}

.globe-left {
  left: -60px;
  transform: translateY(-50%);
}

.globe-right {
  right: -60px;
  transform: translateY(-50%) scaleX(-1);
}

.globe-left svg,
.globe-right svg {
  height: 100%;
  width: auto;
  display: block;
}

.meridian {
  /* stroke-dasharray + stroke-dashoffset set by JS */
  transition: stroke-dashoffset 1.6s var(--ease-expo);
}


/* ==========================================================
   S6 — EXCLUSIVITY
   ========================================================== */

#exclusivity {
  background: var(--bg-void);
}

#exclusivity::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 72% 55% at 50% 50%, rgba(184, 58, 63, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.excl-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
}

.excl-above {
  margin-bottom: 0.2rem;
}

.excl-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  line-height: 1;
}

.excl-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(10rem, 28vw, 22rem);
  color: var(--text-primary);
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.excl-reflection {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(10rem, 28vw, 22rem);
  color: var(--text-primary);
  line-height: 0.45;
  letter-spacing: -0.04em;
  transform: scaleY(-1);
  opacity: 0.07;
  mask-image: linear-gradient(to top, black 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 55%);
  pointer-events: none;
  user-select: none;
}

.excl-owner {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.38em;
  color: var(--accent-warm);
  text-transform: uppercase;
  margin-top: 0.6rem;
}

.excl-rule {
  width: min(260px, 55vw);
  border: none;
  border-top: 1px solid rgba(184, 58, 63, 0.35);
  margin: 0.4rem 0;
}

.excl-body {
  font-size: clamp(0.82rem, 1.3vw, 0.96rem);
  color: var(--text-muted);
  line-height: 2.1;
  max-width: 380px;
}

.excl-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

.excl-final {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.78rem, 1.15vw, 0.88rem);
  color: var(--accent-warm);
  opacity: 0.85;
  margin-top: 0.2rem;
}

.excl-cta {
  margin-top: 1rem;
}



/* ==========================================================
   S7 — WHY IT MATTERS
   ========================================================== */

#why {
  background: var(--bg-deep);
}

.why-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.why-header {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.why-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4.5rem;
}

.why-item {
  border-left: 2px solid var(--accent-line);
  padding-left: 1.5rem;
  position: relative;
}

.why-item::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent-silver), transparent);
  transition: height 0.75s var(--ease-expo);
}

.why-item.revealed::before {
  height: 100%;
}

.why-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.why-text {
  font-size: clamp(0.82rem, 1.25vw, 0.93rem);
  color: var(--text-muted);
  line-height: 1.85;
}


/* ==========================================================
   S8 — INQUIRY
   ========================================================== */

#inquiry {
  background: var(--bg-void);
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

#inquiry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(200, 204, 212, 0.045) 0%, transparent 72%);
  pointer-events: none;
}

.inquiry-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: var(--pad-y) var(--pad-x);
}

.inquiry-content.success-shown {
  gap: 0;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.inquiry-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.inquiry-price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--accent-silver);
  letter-spacing: 0.01em;
}

.inquiry-sub {
  font-size: clamp(0.82rem, 1.25vw, 0.94rem);
  color: var(--text-muted);
  line-height: 1.9;
}

/* Form */
#inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field-group label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.58rem, 0.9vw, 0.65rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-group input,
.field-group textarea {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1.2vw, 0.93rem);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--accent-line);
  border-radius: 2px;
  padding: 0.9rem 1.1rem;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  resize: vertical;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.6;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: rgba(85, 96, 110, 0.5);
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: rgba(160, 170, 184, 0.45);
  background: rgba(22, 22, 30, 0.9);
  box-shadow: 0 0 0 3px rgba(160, 170, 184, 0.08);
}

.submit-btn {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

/* Success state */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 3.5rem 2rem;
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, rgba(22, 22, 30, 0.9), rgba(14, 14, 18, 0.9));
  animation: successReveal 0.8s var(--ease-expo) both;
}

.form-success[hidden] {
  display: none;
}

@keyframes successReveal {
  from { opacity: 0; transform: scale(0.97) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.success-icon svg {
  width: 48px;
  height: 48px;
}

.success-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.success-sub {
  font-size: clamp(0.82rem, 1.25vw, 0.94rem);
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 360px;
}

/* Footer — full-bleed within section */
.site-footer {
  width: 100vw;
  border-top: 1px solid var(--accent-line);
  padding: 1.75rem var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer p {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.5;
}


/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 900px) {
  .why-items {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .globe-left { left: -100px; }
  .globe-right { right: -100px; }

  .stat-num {
    font-size: clamp(5rem, 24vw, 9rem);
  }

  .excl-num,
  .excl-reflection {
    font-size: clamp(9rem, 38vw, 16rem);
  }
}

@media (max-width: 540px) {
  .globe-left,
  .globe-right {
    opacity: 0.4;
    height: min(380px, 60vh);
  }

  .globe-left { left: -120px; }
  .globe-right { right: -120px; }

  .ring-2 { display: none; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (max-width: 400px) {
  .hero-domain {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .excl-num,
  .excl-reflection {
    font-size: clamp(8rem, 40vw, 12rem);
  }
}
