/* ============================================================
   3TAI.TECH — Stylesheet
   Design tokens: dark/gold luxury aesthetic
   ============================================================ */

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

:root {
  --bg:         #080808;
  --bg-2:       #111111;
  --bg-3:       #1C1C1C;
  --gold:       #F5C518;
  --gold-light: #FFDB30;
  --gold-dark:  #C49A13;
  --gray-300:   #CCCCCC;
  --gray-500:   #888888;
  --white:      #FFFFFF;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Syne', system-ui, sans-serif;
  --max-w:      1200px;
  --radius:     4px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--gray-300);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(245, 197, 24, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 197, 24, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* --- Nav --- */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 197, 24, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Logo */
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: var(--gold);
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--gray-300);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--gold-light);
}

/* CTA button */
.btn-nav {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.btn-nav:hover {
  background: var(--gold);
  color: var(--bg) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-300);
  transition: transform 0.25s, opacity 0.25s;
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay a {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--white);
  transition: color var(--transition);
}

.nav-overlay a:hover {
  color: var(--gold);
}

.nav-overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--gray-300);
  font-size: 1.6rem;
  cursor: pointer;
}

/* --- Hero --- */
#hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0;
}

/* Grain texture overlay */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.55;
  pointer-events: none;
}

/* Gold gradient glow */
#hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(ellipse at center, rgba(245, 197, 24, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

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

.hero-headline {
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--gray-300);
  max-width: 560px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* --- What We Do --- */
#what-we-do {
  background: var(--bg-2);
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-top: 0.75rem;
}

.section-intro {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--gray-300);
  max-width: 520px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.service-card {
  padding: 2.2rem;
  background: var(--bg-3);
  border: none;
  border-left: 3px solid var(--gold);
  border-radius: 0;
  transition: background var(--transition), border-left-color var(--transition);
}
.service-card:hover {
  background: rgba(245, 197, 24, 0.04);
  border-left-color: var(--gold-light);
}

.service-card .weight-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--bg);
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}

.service-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.service-card ul {
  list-style: none;
  padding: 0;
}

.service-card ul li {
  font-size: 0.88rem;
  color: var(--gray-500);
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.service-card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
}

.callout-bar {
  margin-top: 2.5rem;
  padding: 1.6rem 2rem;
  border-left: 3px solid var(--gold);
  background: rgba(245, 197, 24, 0.05);
}

.callout-bar p {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--white);
  font-style: italic;
}

/* --- How It Works --- */
#how-it-works {
  background: var(--bg);
}

.steps-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-body);
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(245, 197, 24, 0.35);
  line-height: 1;
  padding-top: 0.2rem;
}

.step-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--gold-light);
}

.step-content p {
  font-size: 0.92rem;
  color: var(--gray-300);
  line-height: 1.7;
  max-width: 620px;
}

/* --- Results --- */
#results {
  background: var(--bg-2);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.result-card {
  padding: 2.2rem;
  background: var(--bg);
  border: 1px solid rgba(245, 197, 24, 0.12);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition);
}
.result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 197, 24, 0.3);
}

.result-number {
  font-family: var(--font-body);
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.6rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.result-card h3 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.result-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- Philosophy --- */
#philosophy {
  background: var(--bg);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.principle {
  padding: 2rem;
  border-top: 2px solid var(--gold);
}

.principle-num {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.principle h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--white);
}

.principle p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* --- Contact --- */
#contact {
  background: var(--bg-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.contact-intro h2 {
  margin-bottom: 1rem;
}

.contact-intro p {
  font-size: 0.95rem;
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-fallback {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.contact-fallback a {
  color: var(--gold);
  transition: color var(--transition);
}

.contact-fallback a:hover {
  color: var(--gold-light);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-3);
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-500);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option {
  background: var(--bg-3);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.2rem;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  align-self: flex-start;
}

.btn-submit:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* --- Footer --- */
#footer {
  background: var(--bg);
  border-top: 1px solid rgba(245, 197, 24, 0.1);
  padding: 3rem 0;
}

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

.footer-logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
}

.footer-logo span {
  color: var(--gold);
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
  text-align: right;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.4rem;
  justify-content: flex-end;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--gray-500);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }

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

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-meta {
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .step {
    grid-template-columns: 48px 1fr;
    gap: 1rem;
  }

  .step-number {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

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

/* --- Ticker --- */
.ticker-wrap {
  background: rgba(245, 197, 24, 0.04);
  border-top: 1px solid rgba(245, 197, 24, 0.12);
  border-bottom: 1px solid rgba(245, 197, 24, 0.12);
  overflow: hidden;
  padding: 0.65rem 0;
}
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 24s linear infinite;
}
.ticker-item {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 2rem;
  flex-shrink: 0;
}
.ticker-sep {
  color: var(--gold-dark);
  flex-shrink: 0;
  align-self: center;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Result number entrance animation --- */
.result-number {
  opacity: 0;
  transform: translateY(8px);
}
.result-number.visible {
  opacity: 1;
  transform: translateY(0);
}
