/* ========================================
   Sndirian — Static Website Stylesheet
   Design system matching app terracotta & mint aesthetic
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors from SndirianColors */
  --warm-white: #FFFAF5;
  --pale-terracotta: #F5DDD0;
  --terracotta: #C75B39;
  --dark-terracotta: #8B2500;
  --mint: #6DBEA3;
  --mint-surface: #E8F5F0;
  --text-primary: #3C2415;
  --text-secondary: #7D6E63;
  --card-bg: #FFFFFF;
  --card-shadow: rgba(60, 36, 21, 0.08);
  --card-shadow-hover: rgba(60, 36, 21, 0.16);
  --border: var(--pale-terracotta);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-body: 400;
  --font-weight-heading: 600;
  --font-weight-hero: 700;

  /* Layout */
  --max-width: 1100px;
  --section-padding: 5rem 1.5rem;
  --card-radius: 18px;
  --btn-radius: 50px;

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-body);
  color: var(--text-primary);
  background: var(--warm-white);
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--pale-terracotta) 50%, var(--warm-white) 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  will-change: background-position;
  z-index: -1;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--dark-terracotta);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: var(--font-weight-heading);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 3rem; font-weight: var(--font-weight-hero); }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding);
}

.section-accent {
  background: var(--pale-terracotta);
  border-radius: 0;
}

.section-mint {
  background: var(--mint-surface);
}

.text-center {
  text-align: center;
}

/* --- Header / Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 250, 245, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 221, 208, 0.5);
  transition: box-shadow var(--transition-medium);
  will-change: box-shadow;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px var(--card-shadow);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--font-weight-hero);
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-logo svg {
  width: 36px;
  height: 36px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.navbar-links a:hover {
  color: var(--terracotta);
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

/* --- Language Toggle --- */
.lang-toggle {
  display: inline-flex;
  background: var(--pale-terracotta);
  border-radius: var(--btn-radius);
  padding: 3px;
  gap: 0;
}

.lang-btn {
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: var(--btn-radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-family);
}

.lang-btn.active {
  background: var(--card-bg);
  color: var(--terracotta);
  box-shadow: 0 1px 4px var(--card-shadow);
}

/* Bilingual content switching */
.lang-id,
.lang-en {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.lang-en .lang-id {
  display: none;
}

body.lang-id .lang-en {
  display: none;
}

/* Default: Indonesian */
body:not(.lang-en) .lang-en {
  display: none;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--btn-radius);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mint {
  background: var(--mint);
  color: #FFFFFF;
}

.btn-mint:hover {
  background: #5aab91;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(109, 190, 163, 0.35);
}

.btn-terracotta {
  background: var(--terracotta);
  color: #FFFFFF;
}

.btn-terracotta:hover {
  background: var(--dark-terracotta);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(199, 91, 57, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--terracotta);
  border: 2px solid var(--terracotta);
}

.btn-outline:hover {
  background: var(--terracotta);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--card-shadow);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--card-shadow-hover);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--mint-surface);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card-icon.terracotta {
  background: var(--pale-terracotta);
}

.card h3 {
  margin-bottom: 0.75rem;
}

/* --- Hero Section --- */
.hero {
  padding: 8rem 1.5rem 4rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--mint-surface);
  color: var(--mint);
  border-radius: var(--btn-radius);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero h1 .accent {
  color: var(--terracotta);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone {
  width: 280px;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(60, 36, 21, 0.15);
  animation: heroFloat 6s ease-in-out infinite, heroFadeIn 1s ease 0.3s forwards;
  opacity: 0;
}

/* Floating animation */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(0.5deg); }
  75% { transform: translateY(8px) rotate(-0.5deg); }
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  background: var(--terracotta);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: var(--font-weight-hero);
  margin: 0 auto 1.25rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

/* Arrow between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -1.25rem;
  width: calc(2.5rem);
  height: 2px;
  background: var(--pale-terracotta);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

/* --- App Showcase --- */
.showcase-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.showcase-phone {
  width: 220px;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(60, 36, 21, 0.12);
  transition: transform var(--transition-medium);
  will-change: transform;
}

.showcase-phone:nth-child(1) { animation: float1 7s ease-in-out infinite; }
.showcase-phone:nth-child(2) { animation: float2 8s ease-in-out infinite; }
.showcase-phone:nth-child(3) { animation: float3 6s ease-in-out infinite; }
.showcase-phone:nth-child(4) { animation: float4 7.5s ease-in-out infinite; }

@keyframes float1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes float4 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* --- Download Section --- */
.download-badges {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.download-badge {
  height: 52px;
  transition: transform var(--transition-fast);
}

.download-badge:hover {
  transform: scale(1.05);
}

/* --- Footer --- */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-brand svg {
  width: 32px;
  height: 32px;
}

.footer-brand span {
  font-weight: var(--font-weight-hero);
  font-size: 1.15rem;
  color: #FFFFFF;
}

.footer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer h4 {
  color: #FFFFFF;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--mint);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Legal / Document Pages --- */
.legal-page {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.legal-header {
  margin-bottom: 3rem;
}

.legal-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.legal-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.legal-meta span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--mint-surface);
  padding: 0.3rem 0.75rem;
  border-radius: var(--btn-radius);
}

.legal-content {
  max-width: 780px;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.legal-section h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-section p {
  font-size: 1rem;
  line-height: 1.8;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.legal-section li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-section th,
.legal-section td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-section thead tr {
  border-bottom: 2px solid var(--border);
}

.legal-notice {
  background: var(--pale-terracotta);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Support / FAQ --- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 6px var(--card-shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--mint-surface);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--mint);
  font-weight: 700;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Account Deletion --- */
.deletion-steps {
  counter-reset: deletion-step;
  max-width: 780px;
}

.deletion-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.deletion-step-num {
  width: 40px;
  height: 40px;
  background: var(--terracotta);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.deletion-step-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.deletion-step-content p {
  font-size: 0.95rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px var(--card-shadow);
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background: var(--pale-terracotta);
  font-weight: 600;
  color: var(--text-primary);
}

.data-table td {
  border-top: 1px solid var(--pale-terracotta);
  color: var(--text-secondary);
}

/* --- Contact Card --- */
.contact-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--card-shadow);
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
}

.contact-card .email-link {
  font-size: 1.35rem;
  font-weight: var(--font-weight-heading);
  color: var(--terracotta);
  display: block;
  margin: 1rem 0;
}

/* --- Responsive --- */
@media (max-width: 968px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.6rem; }

  .hero {
    padding: 7rem 1.5rem 3rem;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-phone {
    width: 220px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 250, 245, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--pale-terracotta);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  .showcase-phone {
    width: 160px;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }

  .section {
    padding: 3.5rem 1rem;
  }

  .hero {
    padding: 6rem 1rem 2.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-phone {
    width: 180px;
  }

  .showcase-phone {
    width: 130px;
  }

  .card {
    padding: 1.5rem;
  }

  .legal-page {
    padding-top: 5rem;
  }

  .legal-header h1 {
    font-size: 1.6rem;
  }

  .legal-section h2 {
    font-size: 1.1rem;
  }

  .legal-section p {
    font-size: 0.95rem;
  }

  .legal-content {
    max-width: 100%;
  }
}

/* --- Embed Mode (in-app WebView) --- */
body.embed .navbar,
body.embed .footer {
  display: none !important;
}

body.embed .legal-page {
  padding-top: 1.5rem;
}

body.embed::before {
  display: none;
}

/* --- Utilities --- */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
