/* ============================================================
   SINHALA FONT STUDIO — style.css
   Design: Editorial Dark — ink, paper, precision
   ============================================================ */

:root {
  --bg: #0d0d0f;
  --surface: #161618;
  --surface2: #1e1e22;
  --border: #2a2a30;
  --accent: #ff6b35;
  --accent2: #ffb347;
  --accent3: #4ecdc4;
  --text: #f0efe8;
  --text-muted: #888890;
  --text-dim: #555560;
  --card-bg: #14141a;
  --card-hover: #1c1c24;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.7);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f8f7f2;
  --surface: #ffffff;
  --surface2: #f0efe8;
  --border: #ddddd0;
  --text: #1a1a1e;
  --text-muted: #666668;
  --text-dim: #aaaaaa;
  --card-bg: #ffffff;
  --card-hover: #faf9f4;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-header { margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }
.section-header .tag {
  display: inline-block; padding: 4px 14px; border-radius: 100px;
  background: rgba(255,107,53,0.15); color: var(--accent);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 12px;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
#navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13,13,15,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  transition: background var(--transition);
}
[data-theme="light"] #navbar { background: rgba(248,247,242,0.92); }

.nav-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 900;
  color: var(--text); white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

.nav-search {
  flex: 1; max-width: 420px;
  position: relative;
}
.nav-search input {
  width: 100%; padding: 10px 16px 10px 42px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search input::placeholder { color: var(--text-dim); }
.nav-search .search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-dim);
  pointer-events: none;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--text-muted);
  transition: all var(--transition); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface2); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.btn-theme {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); font-size: 1rem;
}
.btn-theme:hover { color: var(--accent); border-color: var(--accent); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}

/* ── MOBILE NAV ─────────────────────────────────────────── */
.mobile-menu {
  display: none; position: fixed; inset: 64px 0 0 0;
  background: var(--bg); z-index: 999;
  padding: 24px; overflow-y: auto;
}
.mobile-menu.open { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu a {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); font-size: 1rem;
  border: 1px solid var(--border);
  transition: background var(--transition);
}
.mobile-menu a:hover { background: var(--surface2); }

/* ── HERO ───────────────────────────────────────────────── */
#hero {
  padding: 80px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(255,107,53,0.12) 0%, transparent 70%);
  position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0z' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(255,107,53,0.1); border: 1px solid rgba(255,107,53,0.3);
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 24px;
}
.hero-badge .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }

#hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-bottom: 20px; line-height: 1.1;
}
#hero h1 em { font-style: normal; color: var(--accent); }
#hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── HERO INPUT BOX ─────────────────────────────────────── */
.hero-input-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.input-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.hero-textarea {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 1.1rem;
  padding: 16px; resize: none; outline: none;
  font-family: var(--font-body); line-height: 1.5;
  transition: border-color var(--transition);
  min-height: 80px;
}
.hero-textarea:focus { border-color: var(--accent); }
.hero-textarea::placeholder { color: var(--text-dim); }

.hero-controls {
  display: flex; gap: 12px; align-items: center;
  margin-top: 16px; flex-wrap: wrap;
}
.control-group { display: flex; align-items: center; gap: 10px; }
.control-label { font-size: 0.8rem; color: var(--text-muted); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 4px; background: var(--border);
  outline: none; cursor: pointer; width: 100px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.25);
}
input[type="color"] {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
  background: none; outline: none; padding: 2px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 100px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #ff8255; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,53,0.4); }
.btn-secondary {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-icon {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.9rem;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }
.btn-icon.active { background: rgba(255,107,53,0.15); color: var(--accent); border-color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* ── TREND TAGS ─────────────────────────────────────────── */
.trend-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.trend-tag {
  padding: 6px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.trend-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,107,53,0.08); }

/* ── FONT GRID ──────────────────────────────────────────── */
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── FONT CARD ──────────────────────────────────────────── */
.font-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex; flex-direction: column;
}
.font-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,107,53,0.4);
  box-shadow: var(--shadow);
  background: var(--card-hover);
}

.card-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px; z-index: 2;
}
.badge {
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-new { background: rgba(78,205,196,0.2); color: var(--accent3); border: 1px solid rgba(78,205,196,0.4); }
.badge-trending { background: rgba(255,107,53,0.2); color: var(--accent); border: 1px solid rgba(255,107,53,0.4); }

.card-preview {
  padding: 40px 24px 24px;
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1.4;
  text-align: center; word-break: break-all;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }

.card-title { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; }
.card-category {
  display: inline-block; padding: 2px 10px;
  border-radius: 100px; font-size: 0.72rem;
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border);
}

.card-stats {
  display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-dim);
}
.card-stat { display: flex; align-items: center; gap: 4px; }

.card-actions {
  display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px;
  border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px;
}
.card-btn {
  flex: 1; min-width: 80px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 0.75rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text-muted);
  transition: all var(--transition); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.card-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.card-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.card-btn.primary:hover { background: #ff8255; }

/* ── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 32px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-btn {
  padding: 7px 16px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sort-select {
  margin-left: auto; padding: 8px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text); font-size: 0.82rem;
  cursor: pointer; outline: none;
}

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  align-items: center; margin-top: 48px; flex-wrap: wrap;
}
.page-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn.dots { background: none; border: none; color: var(--text-dim); cursor: default; }
.page-nav {
  padding: 0 16px; min-width: unset;
  font-size: 0.82rem; font-weight: 600;
}

/* ── CATEGORIES SECTION ──────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.category-card:hover { border-color: var(--accent); background: rgba(255,107,53,0.05); transform: translateY(-2px); }
.category-icon { font-size: 1.6rem; }
.category-name { font-weight: 600; font-size: 0.875rem; }
.category-count { font-size: 0.75rem; color: var(--text-dim); }

/* ── COMPARISON TOOL ─────────────────────────────────────── */
.comparison-tool {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; margin: 0;
}
.comparison-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 20px;
}
.compare-slot {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.compare-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.875rem; margin-bottom: 16px; outline: none;
}
.compare-preview {
  font-size: 1.8rem; min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; word-break: break-all;
  border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px;
}
.compare-name { font-weight: 700; margin-bottom: 4px; font-size: 0.9rem; }

/* ── NEWSLETTER ─────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, rgba(78,205,196,0.05) 100%);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: 24px; padding: 56px 40px; text-align: center;
  position: relative; overflow: hidden;
}
.newsletter-section::before {
  content: ''; position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,107,53,0.15), transparent 70%);
  top: -100px; right: -100px; pointer-events: none;
}
.newsletter-section h2 { font-size: 2rem; margin-bottom: 12px; }
.newsletter-section p { color: var(--text-muted); margin-bottom: 28px; }
.newsletter-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter-input {
  flex: 1; padding: 13px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: border-color var(--transition);
}
.newsletter-input:focus { border-color: var(--accent); }

/* ── SHARE MODAL ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; max-width: 440px; width: 90%;
  transform: scale(0.95); transition: transform var(--transition);
  position: relative;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal h3 { font-size: 1.3rem; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition);
}
.modal-close:hover { color: var(--accent); }
.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btn {
  padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); cursor: pointer; text-align: center;
  font-size: 0.85rem; font-weight: 600;
  transition: all var(--transition); display: flex;
  align-items: center; justify-content: center; gap: 8px;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── COOKIE BANNER ──────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; gap: 16px; align-items: center;
  flex-wrap: wrap;
}
#cookie-banner p { font-size: 0.875rem; color: var(--text-muted); flex: 1; min-width: 200px; }
#cookie-banner.hidden { display: none; }

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; margin-top: 10px; line-height: 1.7; }
.footer-col h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 10px; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-dim); flex-wrap: wrap; gap: 12px;
}

/* ── TOAST ──────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 100px;
  font-size: 0.875rem; font-weight: 600;
  z-index: 5000; opacity: 0;
  transition: all 0.3s ease; pointer-events: none;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── AD CONTAINERS ──────────────────────────────────────── */
.ad-container {
  background: var(--surface2); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; color: var(--text-dim);
  font-size: 0.75rem; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin: 24px 0;
}
.ad-container span { display: block; margin-bottom: 4px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ── SCROLL TO TOP ──────────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 4px 16px rgba(255,107,53,0.4);
  opacity: 0; transform: translateY(20px);
  transition: all var(--transition); pointer-events: none;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#scroll-top:hover { background: #ff8255; transform: translateY(-2px); }

/* ── LOADING SKELETON ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 260px; border-radius: var(--radius); }

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-family: var(--font-body); font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 0.875rem; }

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  padding: 56px 0 48px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,107,53,0.08) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 10px; }
.page-header p { color: var(--text-muted); max-width: 560px; }

/* ── FONT DETAIL ────────────────────────────────────────── */
.font-detail-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 48px; text-align: center;
  margin-bottom: 32px; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; word-break: break-all; line-height: 1.4;
}
.font-meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.font-meta-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.font-meta-card .value { font-size: 1.6rem; font-weight: 700; color: var(--accent); font-family: var(--font-display); }
.font-meta-card .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── CONTACT FORM ───────────────────────────────────────── */
.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.form-control {
  width: 100%; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── ABOUT PAGE ─────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.about-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.about-stat .number { font-size: 2rem; font-weight: 900; color: var(--accent); font-family: var(--font-display); }
.about-stat .label { font-size: 0.825rem; color: var(--text-muted); margin-top: 4px; }

/* ── PROSE ──────────────────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 40px; margin-bottom: 14px; }
.prose h3 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 10px; font-family: var(--font-body); }
.prose p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.75; }
.prose ul { padding-left: 24px; color: var(--text-muted); margin-bottom: 16px; }
.prose li { margin-bottom: 8px; line-height: 1.7; }

/* ── 404 ────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 120px 24px; }
.error-code { font-size: clamp(6rem, 20vw, 12rem); font-family: var(--font-display); font-weight: 900; line-height: 1; color: var(--accent); opacity: 0.3; }
.error-page h2 { font-size: 1.8rem; margin: 16px 0 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 32px; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ============================================================
   HOW TO USE SECTION
   ============================================================ */
.htu-section {
  padding: 72px 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(78,205,196,0.06) 0%, transparent 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.htu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.htu-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
  overflow: hidden;
}

.htu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,107,53,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.htu-card:hover {
  border-color: rgba(255,107,53,0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.htu-card:hover::before { opacity: 1; }

.htu-step {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: rgba(255,107,53,0.12);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-body);
}

.htu-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.htu-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.htu-card p {
  font-size: 0.865rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* connector line between steps */
.htu-grid .htu-card:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.2rem;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

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

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: rgba(255,107,53,0.4);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  transition: background var(--transition);
}

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

.faq-question[aria-expanded="true"] {
  color: var(--accent);
  background: rgba(255,107,53,0.06);
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: all var(--transition);
  line-height: 1;
}

.faq-question[aria-expanded="true"] .faq-icon {
  background: rgba(255,107,53,0.12);
  border-color: rgba(255,107,53,0.4);
  color: var(--accent);
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 20px;
  animation: faqOpen 0.22s ease forwards;
}

.faq-answer[hidden] {
  display: none;
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

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

/* ── RESPONSIVE: How To Use ──────────────────────────────── */
@media (max-width: 900px) {
  .htu-grid { grid-template-columns: repeat(2, 1fr); }
  .htu-grid .htu-card:nth-child(2)::after { display: none; }
  .htu-grid .htu-card:nth-child(1)::after,
  .htu-grid .htu-card:nth-child(3)::after { display: none; }
}

@media (max-width: 540px) {
  .htu-grid { grid-template-columns: 1fr; }
  .htu-grid .htu-card::after { display: none; }
  .htu-section, .faq-section { padding: 48px 0; }
  .faq-question { padding: 16px 18px; font-size: 0.92rem; }
  .faq-answer { padding: 0 18px 16px; }
}
