/* ============================================================
   TEMPLEPHONICS — premium audio software
   Custom stylesheet. Standalone (no Bootstrap).
   ============================================================ */

:root {
  --bg: #0F1115;
  --bg-2: #181C23;
  --card: #20252D;
  --border: rgba(255, 255, 255, .08);
  --text: #F5F5F5;
  --muted: #A7ADB7;
  --accent: #C8A76A;
  --accent-soft: rgba(200, 167, 106, .12);
  --success: #5DBB63;
  --danger: #E85C5C;
  --radius-btn: 8px;
  --radius-card: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 780px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease), filter .25s var(--ease);
}
.btn-primary { background: var(--accent); color: #141007; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.04); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(15, 17, 21, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--border);
}
.brand-name {
  font-weight: 600; font-size: 15px; letter-spacing: .18em; color: var(--text);
}
.site-nav ul { display: flex; align-items: center; gap: 34px; }
.site-nav a {
  position: relative;
  font-size: 15px; font-weight: 500;
  color: var(--muted);
  transition: color .25s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-cta {
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600; font-size: 14px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-cta:hover { background: var(--accent); color: #141007; }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: transparent; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), transparent 75%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), transparent 75%);
  animation: grid-drift 40s linear infinite;
}
@keyframes grid-drift { to { background-position: 64px 64px; } }

.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 64px;
}
.hero-eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  margin-top: 26px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 540px;
  font-weight: 300;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-note { margin-top: 22px; font-size: 13px; color: rgba(167,173,183,.8); letter-spacing: .02em; }

/* Analyzer card */
.hero-visual { position: relative; }
.analyzer-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.7);
  animation: float 9s var(--ease) infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.analyzer-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.analyzer-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.analyzer-title { font-size: 12px; letter-spacing: .22em; font-weight: 600; color: var(--text); }
.analyzer-status { margin-left: auto; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.analyzer-body { height: 300px; padding: 18px; background: var(--bg); }
.analyzer-body canvas { width: 100%; height: 100%; display: block; }
.analyzer-foot {
  display: flex; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 11px; letter-spacing: .06em;
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 720px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: 12px; font-weight: 600;
  margin-bottom: 18px;
}
.section-head h2 {
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -.02em;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 26px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(200,167,106,.35); background: #232833; }
.feature-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 22px;
}
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 14.5px; font-weight: 300; }

/* Workflow */
.workflow { background: var(--bg-2); border-block: 1px solid var(--border); }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
  margin: 0;
}
.timeline-step {
  position: relative;
  padding: 34px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
}
.timeline-step::before {
  content: "";
  position: absolute; top: 44px; right: -20px;
  width: 20px; height: 1px; background: var(--border);
}
.timeline-step:last-child::before { display: none; }
.timeline-num {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: .18em;
  color: var(--accent); margin-bottom: 18px;
}
.timeline-step h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.timeline-step p { color: var(--muted); font-size: 14.5px; font-weight: 300; }

/* Screenshots */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.shot { margin: 0; }
.shot-frame {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}
.shot-frame img { transition: transform .6s var(--ease); }
.shot:hover .shot-frame img { transform: scale(1.03); }
.shot figcaption { padding: 18px 4px 0; }
.shot figcaption h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.shot figcaption p { color: var(--muted); font-size: 14px; font-weight: 300; }

/* Why */
.why { background: var(--bg-2); border-block: 1px solid var(--border); }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.why-card {
  padding: 34px 30px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-card);
}
.why-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.why-card p { color: var(--muted); font-size: 15px; font-weight: 300; }

/* Video */
.video-frame {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 8;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.video-tint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .35; }
.video-tint svg { width: 60%; height: 40%; }
.video-cover {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.play-button {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--text);
  transition: background .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.video-cover:hover .play-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #141007;
  transform: scale(1.06);
  box-shadow: 0 0 0 14px rgba(200,167,106,.12);
}
.video-label { font-size: 14px; font-weight: 500; letter-spacing: .08em; color: var(--text); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.faq-item.open { border-color: rgba(200,167,106,.35); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px;
  background: none; border: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; font-weight: 500; text-align: left;
  cursor: pointer;
}
.faq-icon {
  flex-shrink: 0;
  width: 14px; height: 14px; position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--accent);
  transition: transform .3s var(--ease);
}
.faq-icon::before { top: 6px; left: 0; width: 14px; height: 1.5px; }
.faq-icon::after { top: 0; left: 6px; width: 1.5px; height: 14px; }
.faq-item.open .faq-icon::after { transform: scaleY(0); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
}
.faq-a p {
  padding: 0 26px 24px;
  color: var(--muted);
  font-size: 15px; font-weight: 300;
  max-width: 640px;
}

/* Newsletter */
.newsletter-card {
  background: linear-gradient(180deg, var(--bg-2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 56px 48px;
  text-align: center;
}
.newsletter-card h2 { font-weight: 300; font-size: clamp(28px, 3vw, 40px); margin-bottom: 14px; }
.newsletter-sub { color: var(--muted); font-size: 16px; font-weight: 300; max-width: 520px; margin: 0 auto 30px; }
.newsletter-form {
  display: flex; gap: 12px;
  max-width: 480px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color .25s var(--ease);
}
.newsletter-form input::placeholder { color: rgba(167,173,183,.6); }
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-ok { margin-top: 16px; color: var(--success); font-weight: 500; }
.newsletter-terms { margin-top: 16px; font-size: 12px; color: rgba(167,173,183,.6); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-brand p { margin-top: 18px; color: var(--muted); font-size: 14px; font-weight: 300; max-width: 280px; }
.footer-col h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 18px; font-weight: 600;
}
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--muted); font-size: 14.5px; font-weight: 300; transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  color: rgba(167,173,183,.6);
  font-size: 13px;
  max-width: 1200px;
}
.footer-bottom p { text-align: center; }

/* ---------- Inner page hero ---------- */
.page-hero {
  padding: calc(var(--header-h) + 90px) 0 40px;
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
}
.page-hero h1 {
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 58px);
  letter-spacing: -.03em;
  max-width: 820px;
}
.page-sub { margin-top: 22px; color: var(--muted); font-size: 18px; font-weight: 300; max-width: 600px; }

.content-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.content-grid .section-head { margin-bottom: 0; }
.prose p { color: var(--muted); font-weight: 300; font-size: 16.5px; margin-bottom: 18px; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-item {
  padding: 34px 30px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-card);
}
.value-item h3 { font-size: 19px; font-weight: 600; margin-bottom: 12px; color: var(--accent); }
.value-item p { color: var(--muted); font-size: 15px; font-weight: 300; }

@media (max-width: 800px) {
  .content-grid { grid-template-columns: 1fr; gap: 36px; }
  .value-grid { grid-template-columns: 1fr; }
}

/* ---------- Product page ---------- */
.product-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.product-copy h2 { font-weight: 300; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.02em; margin-bottom: 16px; }
.product-desc { color: var(--muted); font-weight: 300; font-size: 16.5px; margin-bottom: 24px; max-width: 520px; }
.product-list { display: grid; gap: 12px; margin-bottom: 34px; }
.product-list li {
  position: relative; padding-left: 30px;
  color: var(--text); font-weight: 400; font-size: 15.5px;
}
.product-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent);
}
.product-visual img {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.spec { padding: 28px 26px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-card); }
.spec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.spec p { color: var(--text); font-size: 17px; font-weight: 400; }

@media (max-width: 900px) {
  .product-feature { grid-template-columns: 1fr; gap: 40px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Learn / Support / Contact pages ---------- */
.article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.article-card {
  padding: 32px 30px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-card);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.article-card:hover { transform: translateY(-4px); border-color: rgba(200,167,106,.35); }
.article-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.article-card p { color: var(--muted); font-size: 14.5px; font-weight: 300; margin-bottom: 20px; }
.article-card a { color: var(--accent); font-weight: 600; font-size: 14.5px; }
.article-card a span { transition: transform .25s var(--ease); display: inline-block; }
.article-card a:hover span { transform: translateX(4px); }

.support-grid { display: grid; gap: 48px; }
.support-contact {
  padding: 44px 40px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--radius-card);
  text-align: left;
}
.support-contact h2 { font-weight: 300; font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 12px; }
.support-contact p { color: var(--muted); font-weight: 300; margin-bottom: 26px; }

.contact-form { display: grid; gap: 14px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  resize: vertical;
  transition: border-color .25s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(167,173,183,.6); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; margin-top: 4px; }

.contact-alternates { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.contact-alternates a { color: var(--text); }
.contact-alternates a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .article-grid { grid-template-columns: 1fr; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .contact-alternates { grid-template-columns: 1fr; }
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid, .timeline { grid-template-columns: repeat(2, 1fr); }
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { min-height: auto; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .feature-grid, .timeline, .shot-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .newsletter-card { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
  .nav-cta { display: none; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 24px; }
  .site-nav a { font-size: 22px; font-weight: 400; }
  .timeline-step::before { display: none; }
  .video-frame { aspect-ratio: 16 / 11; }
}