/* TubeNotes / 영상노트 — styles.css
   브랜드 팔레트: video-note-flutter 앱 테마 기준
   Light (light_theme.dart): primary #FF0000 · bg #F9F9F9 · surface #FFFFFF · border #E5E5E5 · text #0F0F0F/#606060
   Dark  (dark_theme.dart):  primary #FF4444 · bg #0F0F0F · surface #1F1F1F · border #3F3F3F · text #F1F1F1/#AAAAAA
   Splash gradient: light #FF1A1A→#E60000→#B00000 / dark #B31414→#8C0000→#5E0000
*/

/* =====================
   CSS Variables — Light (default)
   ===================== */
:root {
  color-scheme: light;

  /* Backgrounds & surfaces */
  --bg: #f9f9f9;                /* scaffoldBackgroundColor */
  --bg-alt: #ffffff;            /* alternating sections */
  --surface: #ffffff;           /* cards */
  --surface-2: #f1f1f1;         /* inset panels, inputs */
  --border: #e5e5e5;

  /* Text */
  --text-primary: #0f0f0f;
  --text-secondary: #606060;
  --text-muted: #6b6b6b;

  /* Brand accent (YouTube red) */
  --accent: #ff0000;            /* primary */
  --accent-strong: #cc0000;     /* secondary / hover */
  --accent-deep: #cc0000;       /* filled chips (contrast-safe) */
  --accent-text: #cc0000;       /* AA-safe red for text/links */
  --on-accent: #ffffff;
  --accent-soft: rgba(255, 0, 0, 0.07);
  --accent-border: rgba(204, 0, 0, 0.28);
  --hero-glow: rgba(255, 26, 26, 0.07);
  --hover-veil: rgba(15, 15, 15, 0.03);

  /* Brand gradient (splash light) */
  --brand-gradient: linear-gradient(135deg, #ff1a1a 0%, #e60000 45%, #b00000 100%);
  --hero-title-grad: linear-gradient(135deg, #0f0f0f 0%, #b00000 100%);

  /* Chrome */
  --header-bg: rgba(255, 255, 255, 0.88);
  --img-ring: rgba(15, 15, 15, 0.06);
  --shadow: 0 4px 24px rgba(15, 15, 15, 0.08);
  --shadow-red: 0 4px 20px rgba(230, 0, 0, 0.16);

  /* Legacy aliases (inline styles in HTML) */
  --red: var(--accent);
  --red-dark: var(--accent-strong);
  --red-light: var(--accent-text);
  --accent-glow: var(--accent-soft);

  /* Theme toggle icon visibility */
  --tt-sun: none;
  --tt-moon: inline-block;

  --font-base: 'Segoe UI', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', system-ui, sans-serif;
  --radius: 12px;               /* app cardTheme radius */
  --radius-lg: 20px;
}

/* =====================
   CSS Variables — Dark
   (system preference, unless manually forced light)
   ===================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0f0f0f;
    --bg-alt: #161616;
    --surface: #1f1f1f;
    --surface-2: #2f2f2f;
    --border: #3f3f3f;

    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --text-muted: #8f8f8f;

    --accent: #ff4444;
    --accent-strong: #ff6666;
    --accent-deep: #c41111;
    --accent-text: #ff6666;
    --on-accent: #ffffff;
    --accent-soft: rgba(255, 68, 68, 0.12);
    --accent-border: rgba(255, 68, 68, 0.35);
    --hero-glow: rgba(255, 68, 68, 0.08);
    --hover-veil: rgba(255, 255, 255, 0.04);

    --brand-gradient: linear-gradient(135deg, #e64545 0%, #c41111 50%, #8c0000 100%);
    --hero-title-grad: linear-gradient(135deg, #f1f1f1 0%, #ffb0b0 100%);

    --header-bg: rgba(15, 15, 15, 0.85);
    --img-ring: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-red: 0 4px 20px rgba(255, 68, 68, 0.15);

    --tt-sun: inline-block;
    --tt-moon: none;
  }
}

/* Manual toggle override (data-theme="dark" on <html>) */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f0f0f;
  --bg-alt: #161616;
  --surface: #1f1f1f;
  --surface-2: #2f2f2f;
  --border: #3f3f3f;

  --text-primary: #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-muted: #8f8f8f;

  --accent: #ff4444;
  --accent-strong: #ff6666;
  --accent-deep: #c41111;
  --accent-text: #ff6666;
  --on-accent: #ffffff;
  --accent-soft: rgba(255, 68, 68, 0.12);
  --accent-border: rgba(255, 68, 68, 0.35);
  --hero-glow: rgba(255, 68, 68, 0.08);
  --hover-veil: rgba(255, 255, 255, 0.04);

  --brand-gradient: linear-gradient(135deg, #e64545 0%, #c41111 50%, #8c0000 100%);
  --hero-title-grad: linear-gradient(135deg, #f1f1f1 0%, #ffb0b0 100%);

  --header-bg: rgba(15, 15, 15, 0.85);
  --img-ring: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-red: 0 4px 20px rgba(255, 68, 68, 0.15);

  --tt-sun: inline-block;
  --tt-moon: none;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =====================
   Typography
   ===================== */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

/* =====================
   Layout Utilities
   ===================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.text-center { text-align: center; }

.badge {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* =====================
   Header / Nav
   ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; color: var(--text-primary); }

.nav-logo .icon {
  font-size: 1.4rem;
  box-shadow: 0 0 0 1px var(--img-ring);
}

.nav-logo .brand-en {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-lang select {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-lang select:focus { outline: none; border-color: var(--accent); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.theme-toggle .tt-sun { display: var(--tt-sun); }
.theme-toggle .tt-moon { display: var(--tt-moon); }

/* =====================
   Hero Section
   ===================== */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hero-title {
  margin-bottom: 1.25rem;
  background: var(--hero-title-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slogan {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-slogan strong {
  color: var(--accent-text);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px; /* app 버튼 라운드(20) 필 형태와 톤 일치 */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--on-accent);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  filter: brightness(0.94);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(230, 0, 0, 0.3);
  text-decoration: none;
  color: var(--on-accent);
}

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

.btn-outline:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  text-decoration: none;
}


/* =====================
   Summary Preview Card
   ===================== */
.hero-preview {
  position: relative;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.preview-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-yt-thumb {
  width: 48px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.preview-meta h4 {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.preview-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
}

.preview-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-section-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.preview-section-body .point {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.preview-section-body .point:last-child { margin-bottom: 0; }

.preview-section-body .bullet {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.preview-section-body .ts {
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.preview-copy-btn {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.preview-copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.preview-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* =====================
   Features Section
   ===================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}

.feature-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
}

/* =====================
   How It Works
   ===================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-num {
  width: 56px;
  height: 56px;
  background: var(--brand-gradient);
  color: var(--on-accent);
  font-size: 1.4rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.step-item h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-item p {
  font-size: 0.9rem;
}

/* =====================
   Disclaimer
   ===================== */
.disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 3rem 0 0;
  text-align: center;
}

/* =====================
   Download Section
   ===================== */
.download-section {
  text-align: center;
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.download-section::before {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  pointer-events: none;
}

.download-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
}

.store-btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-red);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text-primary);
}

.store-btn .store-icon {
  font-size: 1.5rem;
}

.store-btn .store-text {
  text-align: left;
  line-height: 1.2;
}

.store-btn .store-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
}

.store-btn .store-name {
  font-size: 1rem;
}


/* =====================
   Footer
   ===================== */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.footer-brand h3 span { color: var(--accent); }

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 340px;
}

.footer-links h4 {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =====================
   Sub Pages (Privacy/Terms/FAQ)
   ===================== */
.page-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.page-content {
  padding: 4rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.page-content h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.page-content ul li { margin-bottom: 0.4rem; }

.page-content a { color: var(--accent-text); }

/* =====================
   FAQ
   ===================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

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

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s;
}

.faq-question:hover { background: var(--hover-veil); }

.faq-question.active { color: var(--accent-text); }

.faq-arrow {
  font-size: 0.85rem;
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-question.active .faq-arrow { transform: rotate(180deg); color: var(--accent); }

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.faq-answer.open { display: block; }

/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    order: -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-links {
    display: none;
  }

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

@media (max-width: 480px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
