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

:root {
  --primary:      #2563EB;
  --primary-dk:   #1D4ED8;
  --primary-lt:   #EFF6FF;
  --primary-mid:  rgba(37,99,235,.12);
  --grad:         linear-gradient(135deg, #4F46E5 0%, #2563EB 100%);
  --red:          #EF4444;
  --green:        #10B981;
  --dark:         #0F172A;
  --body:         #334155;
  --muted:        #64748B;
  --border:       #E2E8F0;
  --bg:           #F8FAFC;
  --white:        #FFFFFF;
  --card-shadow:  0 4px 24px rgba(15,23,42,.08);
  --card-shadow-h:0 8px 40px rgba(37,99,235,.15);
  --radius:       20px;
  --radius-sm:    12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--dark); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .4rem; }
p { color: var(--body); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden { display: none !important; }

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  text-decoration: none;
}
.logo svg { color: var(--primary); flex-shrink: 0; }
.logo:hover { text-decoration: none; opacity: .85; }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.site-nav a:hover { color: var(--primary); text-decoration: none; }

/* ─── Hero Section ──────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(160deg, #F0F5FF 0%, #F8FAFC 60%, #EFF6FF 100%);
  padding: 48px 0 60px;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--primary-lt);
  color: var(--primary-dk);
  border: 1px solid rgba(37,99,235,.2);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  margin-bottom: 1.25rem;
}

h1 { margin-bottom: 1rem; }

.hero-text {
  text-align: center;
  max-width: 700px;
  width: 100%;
}
.hero-text h1 { font-size: 2rem; margin-bottom: .75rem; }

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 1.25rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
}
.hero-bullets li {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--dark);
}
.hero-bullets .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: .65rem;
  flex-shrink: 0;
}

/* ─── Recorder Card ─────────────────────────────────────────── */
.recorder-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 700px;
}

.recorder-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 2rem 2rem 1.75rem;
  min-height: 300px;
  display: flex;
  align-items: stretch;
}

/* Each state fills the card */
.rec-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

/* ── Ready State ── */
.mic-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
}
.mic-sm { color: var(--muted); flex-shrink: 0; }
.mic-select {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .85rem;
  color: var(--dark);
  outline: none;
  cursor: pointer;
}
.mic-refresh {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color .2s;
}
.mic-refresh:hover { color: var(--primary); }
.mic-refresh.spinning svg { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,99,235,.35);
  transition: transform .2s, box-shadow .2s;
  margin: .5rem 0;
  position: relative;
}
.record-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37,99,235,.25);
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.record-btn:hover { transform: scale(1.06); box-shadow: 0 10px 32px rgba(37,99,235,.45); }
.record-btn:active { transform: scale(.97); }

.rec-hint { font-weight: 600; color: var(--dark); font-size: .95rem; }
.rec-sub   { font-size: .8rem; color: var(--muted); text-align: center; }
.rec-terms { font-size: .68rem; color: #b0b5c0; text-align: center; line-height: 1.5; margin-top: .5rem; }
.rec-terms a { color: #b0b5c0; text-decoration: underline; }
.rec-terms a:hover { color: var(--muted); }

/* ── Recording State ── */
.rec-toprow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.rec-badge {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--red);
}
.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

.timer {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.wave-canvas {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.rec-controls {
  display: flex;
  gap: .75rem;
  width: 100%;
}
.ctrl-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--dark);
  border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.ctrl-btn:hover { background: var(--border); }
.ctrl-btn.stop {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.ctrl-btn.stop:hover { background: #1e293b; }

/* ── Playback State ── */
.pb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.pb-done {
  font-size: .85rem;
  font-weight: 600;
  color: var(--green);
}
.pb-dur {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
}

.wave-section {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
}
.wave-player-wrap {
  flex: 1;
  position: relative;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.static-wave {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: block;
  touch-action: none;
}
.wave-prog {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 0%;
  width: 2px;
  background: rgba(37,99,235,.75);
  border-radius: 2px;
  pointer-events: none;
  display: none;
}

/* Trim info label */
.trim-info {
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.2em;
}
.trim-info strong { color: var(--primary); }

/* Cut Silence row */
.silence-row {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .65rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.silence-controls {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.cut-silence-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .75rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--border);
  transition: all .18s;
  white-space: nowrap;
}
.cut-silence-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
}
.cut-silence-btn:disabled { opacity: .55; cursor: not-allowed; }

.silence-select {
  font-family: inherit;
  font-size: .8rem;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .38rem .55rem;
  cursor: pointer;
  outline: none;
}

.silence-feedback {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 1.1em;
}
.cut-info {
  font-size: .78rem;
  color: var(--green);
  font-weight: 500;
}
.cut-info.warn { color: var(--muted); }

.undo-cut-btn {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  transition: color .15s;
}
.undo-cut-btn:hover { color: var(--dark); }

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.play-btn:hover { background: var(--primary-dk); }

.time-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: .75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-left: 52px; /* align with waveform start (play btn 44px + gap 8px) */
}

/* ── Download Section ── */
.dl-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: .25rem;
}
.fmt-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.fmt-lbl {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.fmt-btns { display: flex; gap: .4rem; }
.fmt-btn {
  padding: .3rem .7rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all .18s;
}
.fmt-btn.active, .fmt-btn:hover {
  background: var(--primary-lt);
  color: var(--primary);
  border-color: rgba(37,99,235,.3);
}

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  padding: .85rem;
  border-radius: var(--radius-sm);
  background: var(--grad);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
  transition: opacity .2s, transform .15s, box-shadow .2s;
}
.dl-btn:hover { opacity: .93; box-shadow: 0 6px 24px rgba(37,99,235,.4); transform: translateY(-1px); }
.dl-btn:active { transform: translateY(0); }
.dl-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

.again-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  padding: .6rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all .18s;
}
.again-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }

/* ── Trust Row ── */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 1.25rem;
}
.trust-row span {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
}

/* ─── Steps Section ─────────────────────────────────────────── */
.steps-section {
  padding: 80px 0;
  background: var(--white);
}
.steps-section h2, .features-section h2,
.usecases-section h2, .formats-section h2,
.faq-section h2 {
  text-align: center;
  margin-bottom: .6rem;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 2.5rem;
}

.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.step-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: .5rem; text-align: center; justify-content: center; }
.step-card p  { font-size: .9rem; color: var(--muted); line-height: 1.6; }
.step-optional {
  font-size: .65rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: #f0f4ff; color: #4a6cf7; border: 1px solid #c7d6ff;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--border);
  padding-top: 50px;
  flex-shrink: 0;
}

/* ─── Features ──────────────────────────────────────────────── */
.features-section { padding: 80px 0; background: var(--bg); }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.feat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow .2s, transform .2s;
}
.feat-card:hover { box-shadow: var(--card-shadow-h); transform: translateY(-2px); }
.feat-icon { font-size: 1.6rem; margin-bottom: .75rem; }
.feat-card h3 { font-size: .95rem; color: var(--dark); }
.feat-card p  { font-size: .85rem; color: var(--muted); line-height: 1.6; margin-top: .3rem; }

/* ─── Use Cases ─────────────────────────────────────────────── */
.usecases-section { padding: 80px 0; background: var(--white); }

.uc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.uc-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: border-color .2s;
}
.uc-card:hover { border-color: rgba(37,99,235,.3); }
.uc-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .1rem; }
.uc-card h3 { font-size: .9rem; color: var(--dark); margin-bottom: .3rem; }
.uc-card p  { font-size: .82rem; color: var(--muted); line-height: 1.55; }

/* ─── Formats Table ─────────────────────────────────────────── */
.formats-section { padding: 80px 0; background: var(--bg); }

.fmt-table-wrap { overflow-x: auto; margin-bottom: 1.25rem; }
.fmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.fmt-table th {
  background: var(--dark);
  color: #fff;
  padding: .85rem 1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.fmt-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--body);
}
.fmt-table tbody tr:last-child td { border-bottom: none; }
.fmt-table tbody tr:hover { background: var(--primary-lt); }

.fmt-tip {
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

/* ─── FAQ ───────────────────────────────────────────────────── */
.faq-section { padding: 80px 0; background: var(--white); }

.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: .5rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  background: var(--bg);
  font-size: .95rem;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background .18s;
}
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-q[aria-expanded="true"] { background: var(--primary-lt); }
.faq-q:hover { background: var(--primary-lt); }

.faq-a {
  padding: 1rem 1.25rem 1.25rem;
  background: var(--white);
  font-size: .9rem;
  line-height: 1.7;
  color: var(--body);
}
.faq-a p + p { margin-top: .75rem; }
.faq-a ul, .faq-a ol { padding-left: 1.25rem; list-style: disc; margin-top: .5rem; }
.faq-a li { margin-bottom: .35rem; }

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  padding: 48px 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 1.25rem;
}

.footer-brand .logo { color: #fff; margin-bottom: .75rem; }
.footer-brand .logo svg { color: rgba(255,255,255,.7); }
.footer-brand p { font-size: .85rem; max-width: 260px; }

.footer-links h4 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .18s;
}
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom { font-size: .8rem; text-align: center; }

/* ─── Inner Page Layout ─────────────────────────────────────── */
.inner-hero {
  background: linear-gradient(135deg, #F0F5FF 0%, #F8FAFC 100%);
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}
.inner-hero h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); margin-bottom: .5rem; }
.inner-hero .sub { color: var(--muted); font-size: .95rem; }

.inner-body {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 1.5rem;
}
.inner-body h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; color: var(--dark); }
.inner-body p  { margin-bottom: 1rem; font-size: .95rem; line-height: 1.75; }
.inner-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.inner-body li { margin-bottom: .4rem; font-size: .95rem; line-height: 1.7; }
.inner-body a  { color: var(--primary); }

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.contact-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.contact-card a { font-size: .95rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--dark); }
.form-group input, .form-group textarea, .form-group select {
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color .18s;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-submit {
  padding: .85rem 1.5rem;
  background: var(--grad);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 700;
  align-self: flex-start;
  transition: opacity .2s;
}
.form-submit:hover { opacity: .9; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .feat-grid  { grid-template-columns: repeat(2, 1fr); }
  .steps-row  { flex-direction: column; }
  .step-arrow { display: none; }
}

@media (max-width: 640px) {
  .hero-section { padding: 28px 0 36px; }
  .feat-grid   { grid-template-columns: 1fr; }
  .uc-grid     { grid-template-columns: 1fr; }
  .recorder-card { padding: 1.25rem; }
  .footer-top  { flex-direction: column; }
  .site-nav a  { font-size: .82rem; }
  .fmt-table   { font-size: .82rem; }
}
