/* ─────────────────────────────────────────────
   Gemini Manager - Privacy Policy Stylesheet
   Design: Minimal, modern, Toss/Kakao-inspired
───────────────────────────────────────────── */

/* Pretendard (Korean) */
@font-face {
  font-family: "Pretendard";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/PretendardVariable.woff2") format("woff2-variations");
}

:root {
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
  --text-primary: #1a1a1e;
  --text-secondary: #55575d;
  --text-tertiary: #8b8d94;
  --border: #ececef;
  --accent: #6366f1;
  --accent-soft: #eef0ff;
  --accent-gradient: linear-gradient(135deg, #7B61FF 0%, #6366F1 50%, #4F46E5 100%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: "Pretendard", "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15.5px;
  font-weight: 400;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* Language switcher (segmented control) */
.lang-switch {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.18s ease;
  letter-spacing: -0.01em;
}

.lang-switch a:hover {
  color: var(--text-primary);
}

.lang-switch a.active {
  background: var(--bg);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}

/* ─── Main ───────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.doc-eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.doc-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.doc-meta {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 44px;
}

.doc-intro {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 48px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
}

/* Sections */
section {
  margin-bottom: 44px;
}

section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

section h2 .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 24px;
  letter-spacing: 0.02em;
}

section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
  letter-spacing: -0.01em;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

section ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

section ul li {
  color: var(--text-secondary);
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.65;
}

section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

section ul li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Highlight box */
.callout {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 16px 0;
  color: var(--text-primary);
  font-size: 14.5px;
  line-height: 1.65;
}

.callout strong {
  font-weight: 600;
}

/* ─── Feedback Form ──────────────────────── */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.form-label .required {
  color: var(--accent);
  margin-left: 3px;
}

/* Category card grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

.category-card {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 12px 16px;
  text-align: center;
  transition: all 0.15s ease;
  background: var(--bg);
}

.category-card:hover {
  border-color: var(--text-tertiary);
  background: var(--bg-soft);
}

.category-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-card input[type="radio"]:focus-visible + .category-body {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.category-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.category-icon {
  width: 26px;
  height: 26px;
  margin: 0 auto 8px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.category-card.is-selected .category-icon {
  color: var(--accent);
}

.category-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.category-card.is-selected .category-name {
  font-weight: 600;
  color: var(--accent);
}

/* Textarea */
.form-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.15s ease;
  letter-spacing: -0.005em;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.textarea-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.char-count.is-warn {
  color: #d97706;
}
.char-count.is-error {
  color: #dc2626;
}

/* Submit button */
.form-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
  min-width: 140px;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.36);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.submit-btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.is-loading .spinner {
  display: inline-block;
}

.submit-btn.is-loading .submit-label {
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success screen */
.success-panel {
  text-align: center;
  padding: 48px 24px 32px;
  animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.success-mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.success-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--bg-soft);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.btn-ghost:hover {
  background: var(--border);
}

/* Error message */
.form-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-size: 13.5px;
  line-height: 1.5;
  display: none;
}

.form-error.is-visible {
  display: block;
}

/* Small screens */
@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-card {
    padding: 16px 10px 14px;
  }
  .submit-btn {
    width: 100%;
  }
}

/* ─── Feedback CTA (privacy page) ────────── */
.feedback-cta {
  margin-top: 60px;
  padding: 28px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}

.feedback-cta h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.feedback-cta p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Footer ─────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.site-footer a:hover {
  border-bottom-color: var(--text-secondary);
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  .site-header-inner {
    padding: 14px 20px;
  }
  main {
    padding: 40px 20px 72px;
  }
  .doc-title {
    font-size: 28px;
  }
  .doc-intro {
    font-size: 15px;
    padding: 16px 18px;
  }
  section h2 {
    font-size: 18px;
  }
  .lang-switch a {
    padding: 5px 11px;
    font-size: 12.5px;
  }
}

/* ─── Reduced motion ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
