/* ============================================================
   SilversEdge — style.css
   Design: dark, restrained, high signal-to-noise
   ============================================================ */

/* --- RESET & BASE ----------------------------------------- */

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

:root {
  --bg:          #0F0F0F;
  --bg-raised:   #161616;
  --bg-card:     #1A1A1A;
  --accent:      #00C897;
  --accent-dim:  rgba(0, 200, 151, 0.12);
  --text-primary:   #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted:     #606060;
  --border:      rgba(255, 255, 255, 0.07);

  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   7rem;
  --space-2xl: 10rem;

  --radius-sm:  4px;
  --radius-md:  8px;

  --transition: 0.22s ease;
  --transition-slow: 0.45s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- TYPOGRAPHY ------------------------------------------- */

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

/* --- LAYOUT ----------------------------------------------- */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

/* --- SECTION LABEL ---------------------------------------- */

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

/* --- NAV -------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: opacity var(--transition);
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(0, 200, 151, 0.35);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
}

.nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* --- BUTTONS ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0A;
}

.btn-primary:hover {
  background: #00dfa8;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 200, 151, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
}

/* --- HERO ------------------------------------------------- */

.hero {
  padding-top: calc(64px + var(--space-xl));
  padding-bottom: var(--space-xl);
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 740px;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- PROBLEMS --------------------------------------------- */

.problems {
  border-top: 1px solid var(--border);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: border-color var(--transition);
}

.problem-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.problem-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.problem-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- PROCESS ---------------------------------------------- */

.process {
  border-top: 1px solid var(--border);
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.process-step:first-child {
  border-top: 1px solid var(--border);
}

.step-number {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.step-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.step-body p {
  font-size: 0.9375rem;
  max-width: 620px;
}

/* --- ABOUT ------------------------------------------------ */

.about {
  border-top: 1px solid var(--border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-lg);
  align-items: start;
}

.about-text .section-label {
  margin-bottom: var(--space-md);
}

.about-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 580px;
}

.headshot-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* [PLACEHOLDER: Remove this block and replace .about-visual with an <img> tag when headshot is ready] */
}

/* --- EXAMPLES --------------------------------------------- */

.examples {
  border-top: 1px solid var(--border);
}

.example-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-lg);
}

.example-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.example-item:first-child {
  border-top: 1px solid var(--border);
}

.example-marker {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.55rem;
}

.example-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.example-body p {
  font-size: 0.9375rem;
  max-width: 600px;
}

.examples-footer {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- EVIDENCE --------------------------------------------- */

.evidence {
  border-top: 1px solid var(--border);
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.evidence-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.video-placeholder span {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.evidence-case {
  padding: 2rem;
}

.case-placeholder {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.case-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.case-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- CONTACT ---------------------------------------------- */

.contact {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-inner {
  max-width: 640px;
}

.contact-text h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.contact-text > p {
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-email {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}

.contact-email:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* --- FOOTER ----------------------------------------------- */

.footer {
  padding: var(--space-md) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.footer-location,
.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- ANIMATIONS ------------------------------------------- */

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE ------------------------------------------- */

@media (max-width: 900px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
  }

  .headshot-placeholder {
    width: 140px;
    height: 140px;
    aspect-ratio: auto;
  }

  .evidence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  .nav-inner {
    padding: 0 1rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .hero {
    padding-top: calc(64px + 3rem);
    padding-bottom: 3rem;
    min-height: auto;
  }

  .process-step {
    grid-template-columns: 50px 1fr;
  }

  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* --- ABOUT TEXT PARAGRAPH SPACING ------------------------- */

.about-text p + p {
  margin-top: 1.1rem;
}

/* --- CHAT WIDGET ------------------------------------------ */

.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-trigger {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 200, 151, 0.28);
  transition: transform var(--transition), box-shadow var(--transition);
}

.chat-trigger:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(0, 200, 151, 0.42);
}

.chat-panel {
  width: 340px;
  height: 480px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-panel--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.chat-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.chat-subtitle {
  font-size: 0.75rem;
  color: #606060;
}

.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #606060;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  line-height: 0;
}

.chat-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 2px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-bubble--assistant {
  background: #2a2a2a;
  color: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.chat-bubble--user {
  background: var(--accent);
  color: #0A0A0A;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: #606060;
  border-radius: 50%;
  animation: typing-dot 1.2s ease-in-out infinite;
  display: block;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%            { opacity: 1;   transform: translateY(-3px); }
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.chat-input::placeholder {
  color: #505050;
}

.chat-input:focus {
  border-color: rgba(0, 200, 151, 0.4);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0A0A0A;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
  line-height: 0;
}

.chat-send:hover {
  background: #00dfa8;
  transform: scale(1.06);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 400px) {
  .chat-panel {
    width: calc(100vw - 40px);
  }
}
