/* ============================================================
   Tarinala — styles.css
   ============================================================ */

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

:root {
  --bg:          #0d0f14;
  --bg-card:     #13161e;
  --bg-nav:      rgba(13, 15, 20, 0.88);
  --border:      rgba(255,255,255,0.07);
  --accent:      #a78bfa;        /* violet */
  --accent-2:    #7c3aed;
  --accent-glow: rgba(167,139,250,0.18);
  --text:        #e8e6f0;
  --muted:       #8b8a9e;
  --heading-font: 'IM Fell English', 'Georgia', serif;
  --body-font:    'Inter', system-ui, sans-serif;
  --radius:       12px;
  --transition:   0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--heading-font);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.nav__logo svg { flex-shrink: 0; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--transition);
}

.nav__links a:hover { color: var(--text); }

.nav__cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--body-font);
}

.btn-primary {
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 0 24px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 0 36px rgba(167,139,250,0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

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

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

/* Radial glow bg */
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.13) 0%, transparent 65%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.hero__title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin-bottom: 20px;
  color: #f0eeff;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__meta {
  margin-top: 40px;
  display: flex;
  gap: 32px;
}

.hero__stat strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--heading-font);
  color: var(--accent);
}

.hero__stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* App screenshot mockup */
.hero__visual {
  position: relative;
}

.mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(124,58,237,0.08);
}

.mockup__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup__dot--red   { background: #ff5f57; }
.mockup__dot--yellow{ background: #febc2e; }
.mockup__dot--green { background: #28c840; }

.mockup__titletext {
  margin-left: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.mockup__body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 340px;
}

.mockup__sidebar {
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mockup__sidebar-item {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.mockup__sidebar-item.active {
  background: rgba(167,139,250,0.12);
  color: var(--accent);
}

.mockup__sidebar-item.chapter-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(139,138,158,0.6);
  margin-top: 8px;
  padding: 4px 10px;
}

.mockup__editor {
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.mockup__editor-line {
  height: 11px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  margin-bottom: 10px;
}

.mockup__editor-line.w-full  { width: 100%; }
.mockup__editor-line.w-90    { width: 90%; }
.mockup__editor-line.w-75    { width: 75%; }
.mockup__editor-line.w-60    { width: 60%; }
.mockup__editor-line.w-45    { width: 45%; }
.mockup__editor-line.w-30    { width: 30%; }
.mockup__editor-line.heading {
  height: 16px;
  background: rgba(167,139,250,0.18);
  width: 55%;
  margin-bottom: 16px;
}

.mockup__ai-panel {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 180px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(167,139,250,0.22);
  border-radius: 8px;
  padding: 12px;
}

.mockup__ai-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.mockup__ai-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
  margin-bottom: 6px;
  overflow: hidden;
}

.mockup__ai-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  animation: shimmer 2.5s ease-in-out infinite;
}

/* ---------- Features ---------- */
.section { padding: 100px 0; }

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  color: #f0eeff;
  margin-bottom: 12px;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(167,139,250,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 20px var(--accent-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- AI Showcase ---------- */
.ai-section {
  background: linear-gradient(180deg, var(--bg) 0%, #100d1a 50%, var(--bg) 100%);
  padding: 100px 0;
}

.ai-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ai-content h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: #f0eeff;
  margin-bottom: 16px;
}

.ai-content p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 440px;
}

.ai-list {
  list-style: none;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--text);
}

.ai-list li::before {
  content: '';
  flex-shrink: 0;
  margin-top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(167,139,250,0.15);
  border: 1px solid var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2,6 5,9 10,3'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

/* AI metrics visual */
.ai-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.ai-metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.ai-metric-card h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.ai-metric-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.ai-metric-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1.2s ease;
}

.ai-metric-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.ai-metric-footer strong { color: var(--accent); }

/* ---------- Workflow ---------- */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.workflow-grid::before {
  content: '';
  position: absolute;
  top: 28px; left: 60px; right: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

.workflow-step {
  text-align: center;
  padding: 20px 24px;
}

.workflow-step__num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.workflow-step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.workflow-step p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Download CTA ---------- */
.download {
  text-align: center;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  bottom: -100px; left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.15) 0%, transparent 65%);
  pointer-events: none;
}

.download h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #f0eeff;
  margin-bottom: 16px;
}

.download p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.download__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.download__note {
  font-size: 0.8rem;
  color: var(--muted);
}

.download__note svg {
  display: inline;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  margin-right: 4px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 240px;
}

.footer__col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col ul a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color var(--transition);
}

.footer__col ul a:hover { color: var(--text); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes shimmer {
  0%   { opacity: 0.6; }
  50%  { opacity: 1;   }
  100% { opacity: 0.6; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid::before { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .ai-inner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }

  .nav__links, .nav__cta {
    display: none;
  }

  .nav__links.open, .nav__cta.open {
    display: flex;
  }

  .nav__hamburger { display: flex; }

  .nav__links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
  }

  .nav__cta {
    position: fixed;
    top: auto;
    left: 0; right: 0;
    background: var(--bg);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__meta { gap: 20px; }
}
