/* ==========================================================
   AVARA DESIGNS — Main page styles
   ========================================================== */

/* ---------- LOGO WORDMARK (HTML) ---------- */
.logo-word {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 1em;
  color: inherit;
  display: inline-block;
}
.logo-dot {
  display: inline-block;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: var(--color-cyan);
  margin-left: 0.18em;
  vertical-align: 0.06em;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
}

/* ==========================================================
   NAV
   ========================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: 16px 0;
  transition: background 250ms ease, backdrop-filter 250ms ease, border-color 250ms ease, padding 250ms ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-logo {
  font-size: 22px;
  color: var(--color-text);
  display: inline-flex;
  align-items: baseline;
  transition: transform 200ms var(--ease-out);
}
.nav-logo:hover { transform: scale(1.04); }

.nav-links {
  display: flex;
  gap: var(--space-8);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 180ms ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  height: 1px;
  width: 0;
  background: var(--color-cyan);
  transition: width 220ms var(--ease-out);
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { padding: 10px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 220ms var(--ease-out), opacity 180ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  background-image: radial-gradient(circle at 80% 10%, rgba(255, 107, 91, 0.18), transparent 50%), radial-gradient(circle at 10% 90%, rgba(0, 212, 255, 0.18), transparent 50%);
  z-index: 99;
  padding: 100px 32px 40px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav nav { display: flex; flex-direction: column; gap: 28px; font-size: 28px; font-weight: 700; }
.mobile-nav a { color: var(--color-text); }
.mobile-nav .btn { font-size: 18px; margin-top: 12px; }

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================
   HERO
   ========================================================== */

.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-glow-1 {
  width: 720px; height: 720px;
  top: -200px; right: -200px;
  animation: drift 18s var(--ease-in-out) infinite alternate;
}
.hero-glow-2 {
  width: 600px; height: 600px;
  bottom: -180px; left: -180px;
  animation: drift 22s var(--ease-in-out) infinite alternate-reverse;
}
@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 30px); }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}

/* The browser frame at hero scale */
.hero-bframe {
  width: min(920px, 100%);
  margin: 0 auto;
}

.hero-content {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
}

.hero-content-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
}
.hero-content-inner.is-visible { opacity: 1; }

.hero-eyebrow { margin-bottom: var(--space-4); }

.hero-wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: var(--space-4);
  position: relative;
  padding-left: 38px; /* offset to optically center against the dot */
}

.hero-wordmark-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 11vw, 120px);
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--color-text);
}
.hero-wordmark-text .hl {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
}
.hero-wordmark-text .hl.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out);
}

.hero-wordmark-dot {
  width: clamp(16px, 2.4vw, 28px);
  height: clamp(16px, 2.4vw, 28px);
  border-radius: 50%;
  background: var(--color-cyan);
  opacity: 0;
  transform: scale(0);
  margin-bottom: 0.18em;
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
}
.hero-wordmark-dot.is-in {
  opacity: 1;
  transform: scale(1);
  transition: transform 320ms var(--ease-out), opacity 200ms ease;
}
.hero-wordmark-dot.is-glow {
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.6);
  transition: box-shadow 600ms ease;
}

.hero-tagline {
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: -0.005em;
}

/* Address bar typing animation elements */
.bframe-url {
  font-family: var(--font-mono);
  background-image: linear-gradient(90deg, var(--color-text-muted) 0%, var(--color-text-muted) 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  transition: color 200ms ease;
}
.bframe-url.is-swept {
  background-image: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-coral) 100%);
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-position: 0% 0;
  animation: urlSweep 280ms cubic-bezier(.5,0,.2,1) forwards;
}
@keyframes urlSweep {
  0%   { background-position: 200% 0; }
  100% { background-position: 0% 0; }
}
.bframe-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--color-cyan);
  margin-left: 2px;
  vertical-align: -2px;
  opacity: 0;
}
.bframe-cursor.is-blink { animation: blink 0.6s step-end infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* The "below the frame" hero copy */
.hero-belowframe {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  opacity: 0;
}
.hero-belowframe.is-visible { opacity: 1; }
.hero-belowframe .headline-display { margin-bottom: var(--space-6); }
.hero-belowframe .subheadline { margin-inline: auto; margin-bottom: var(--space-8); }

.hero-cta-row {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero { padding-top: 110px; min-height: auto; }
  .hero-content { min-height: 260px; padding: 40px 20px; }
  .hero-wordmark { padding-left: 26px; gap: 8px; }
  .bframe-titlebar { padding: 10px 12px; gap: 10px; }
  .bframe-addr { font-size: 11px; padding: 5px 10px; }
}

/* Mobile: when reduced motion or pre-animation, render finals visible by default */
@media (prefers-reduced-motion: reduce) {
  .hero-content-inner, .hero-belowframe { opacity: 1; }
  .hero-wordmark-text .hl { opacity: 1; transform: none; }
  .hero-wordmark-dot { opacity: 1; transform: scale(1); }
  .bframe-cursor { display: none; }
}

/* ==========================================================
   SOCIAL PROOF MARQUEE
   ========================================================== */

.social-proof {
  padding: 32px 0 64px;
  text-align: center;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.2);
}
.social-proof-eyebrow { margin-bottom: 24px; }

.marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}
.marquee-bullet { color: var(--color-cyan); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================
   SECTION HEADER (used across all sections)
   ========================================================== */

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}
.section-header .subheadline { margin-inline: auto; }

/* ==========================================================
   PROCESS
   ========================================================== */

.process-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 880px) {
  .process-grid { grid-template-columns: 1fr; }
}

.process-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}
.process-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: var(--space-2);
}
.process-card p { color: var(--color-text-muted); }

.process-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--color-cyan);
  letter-spacing: -0.02em;
}

.process-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: var(--radius-md);
  color: var(--color-cyan);
}

/* ==========================================================
   CONCEPT GALLERY
   ========================================================== */

.concepts-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) { .concepts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .concepts-grid { grid-template-columns: 1fr; } }

.concept-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: transform 300ms var(--ease-out);
}
.concept-tile:hover { transform: translateY(-6px); }

.concept-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: box-shadow 300ms var(--ease-out);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
}
.concept-tile:hover .concept-frame {
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 212, 255, 0.45);
}

.concept-thumb {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--color-bg);
}
.concept-thumb iframe {
  position: absolute;
  top: 0; left: 0;
  width: 250%;
  height: 250%;
  transform: scale(0.4);
  transform-origin: top left;
  border: none;
  pointer-events: none;
  background: var(--color-bg);
  transition: transform 400ms var(--ease-out);
}
.concept-tile:hover .concept-thumb iframe { transform: scale(0.42); }
.concept-thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, transparent 70%, rgba(10, 14, 26, 0.4) 100%);
}

.concept-meta { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 4px; }
.concept-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.concept-desc { color: var(--color-text-muted); font-size: 15px; }
.concept-link {
  color: var(--color-cyan);
  font-size: 14px;
  font-weight: 600;
  margin-top: var(--space-2);
  letter-spacing: -0.005em;
  transition: gap 200ms var(--ease-out);
}

/* ==========================================================
   SERVICES
   ========================================================== */

.services-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .services-grid { grid-template-columns: 1fr; } }

.service-card { padding: var(--space-8); }
.service-card h3 { font-size: 20px; font-weight: 700; margin: var(--space-4) 0 var(--space-2); letter-spacing: -0.01em; }
.service-card p { color: var(--color-text-muted); font-size: 15px; }
.service-icon { color: var(--color-cyan); }

/* ==========================================================
   COMPARISON TABLE
   ========================================================== */

.compare-table-wrap {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  vertical-align: middle;
}
.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--color-border);
}
.compare-table thead .compare-th-avara {
  color: var(--color-cyan);
  border-bottom: 2px solid var(--color-cyan);
  background: rgba(0, 212, 255, 0.06);
}
.compare-table tbody th {
  font-weight: 600;
  color: var(--color-text);
  width: 28%;
}
.compare-table tbody td { color: var(--color-text-muted); }
.compare-table .compare-td-avara {
  color: var(--color-text);
  font-weight: 600;
  background: rgba(0, 212, 255, 0.04);
  border-left: 1px solid rgba(0, 212, 255, 0.25);
  border-right: 1px solid rgba(0, 212, 255, 0.25);
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-yes { color: var(--color-cyan); font-weight: 700; font-size: 18px; margin-right: 4px; }
.compare-no  { color: var(--color-text-subtle); font-weight: 700; font-size: 16px; margin-right: 4px; }

/* ==========================================================
   AUDIT FORM (PRIMARY CONVERSION)
   ========================================================== */

.audit { position: relative; overflow: hidden; }
.audit-glow {
  width: 800px; height: 800px;
  top: -200px; left: 50%; transform: translateX(-50%);
  opacity: 0.6;
}

.audit-container { position: relative; z-index: 1; max-width: 900px; }
.audit-header { margin-bottom: var(--space-12); }

.audit-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 212, 255, 0.08);
  position: relative;
}

.audit-submit { margin-top: var(--space-4); padding: 18px 32px; font-size: 17px; }
.audit-fineprint {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-subtle);
}

.audit-success {
  text-align: center;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.audit-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--color-cyan);
  color: var(--color-cyan);
  margin-bottom: var(--space-2);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
}
.audit-success-headline {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.audit-success-sub {
  color: var(--color-text-muted);
  font-size: 17px;
  max-width: 480px;
  line-height: 1.55;
}

/* ==========================================================
   FAQ
   ========================================================== */

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 220ms ease;
}
.faq-item[open] { border-color: rgba(0, 212, 255, 0.4); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 200ms ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--color-cyan); }

.faq-chevron {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-cyan);
  transition: transform 280ms var(--ease-out);
  flex-shrink: 0;
}
.faq-item[open] .faq-chevron { transform: rotate(45deg); }

.faq-answer {
  padding: 0 28px 24px;
  color: var(--color-text-muted);
  line-height: 1.65;
  font-size: 15px;
  animation: faqFade 320ms var(--ease-out);
}
@keyframes faqFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   FINAL CTA
   ========================================================== */

.final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(96px, 16vw, 200px);
}
.final-cta-glow-1 {
  width: 600px; height: 600px;
  top: -100px; left: -200px;
  animation: drift 24s var(--ease-in-out) infinite alternate;
}
.final-cta-glow-2 {
  width: 600px; height: 600px;
  bottom: -100px; right: -200px;
  animation: drift 26s var(--ease-in-out) infinite alternate-reverse;
}
.final-cta-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.final-cta .headline-display { margin: 0 auto var(--space-6); }
.final-cta .subheadline { margin: 0 auto var(--space-8); }
.final-cta-btn { font-size: 18px; padding: 18px 36px; }

/* ==========================================================
   FOOTER
   ========================================================== */

.footer {
  background: #07090F;
  border-top: 1px solid var(--color-border);
  padding-top: 80px;
}

.footer-inner {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.5fr 1fr 1fr;
  padding-bottom: 64px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 40px; } }

.footer-logo {
  display: inline-flex; align-items: baseline;
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.footer-tagline { color: var(--color-text-muted); margin-bottom: var(--space-6); font-size: 15px; }
.footer-contact { font-size: 14px; color: var(--color-text-muted); line-height: 1.9; }
.footer-contact a { transition: color 180ms ease; }
.footer-contact a:hover { color: var(--color-cyan); }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  font-size: 15px;
  color: var(--color-text);
  transition: color 180ms ease;
}
.footer-col a:hover { color: var(--color-cyan); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text-subtle);
}
.footer-mono {
  font-family: var(--font-mono);
  color: var(--color-cyan);
  letter-spacing: 0.04em;
}

/* ==========================================================
   SCROLL REVEAL HOOKS
   ========================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

.section-header.reveal,
.section-header > * { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
