/*
Theme Name: UniqueFont
Theme URI: https://uniquefont.net
Author: UniqueFont
Author URI: https://uniquefont.net
Description: Lightweight custom theme for UniqueFont – Fonts Generator Copy & Paste tool site.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: uniquefont
Tags: custom-logo, custom-menu, responsive-layout
*/

/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --bg:      #ffffff;
  --bg2:     #f5f7fa;
  --border:  #e2e8f0;
  --fg:      #0d1117;
  --fg2:     #4b5563;
  --fg3:     #6b7280;
  --accent:  #1a73e8;
  --accent-l:#e8f0fe;
  --green:   #0f9d58;
  --green-l: #e6f4ee;
  --red:     #e53e3e;
  --radius:  10px;
  --max:     860px;
  --fh:      'Plus Jakarta Sans', system-ui, sans-serif;
  --fb:      'DM Sans', system-ui, sans-serif;
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  padding: 13px 16px;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-logo {
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; }
#nav-menu { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
#nav-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg2);
  text-decoration: none;
}
#nav-menu a:hover { color: var(--accent); }

/* ─────────────────────────────────────────
   LAYOUT WRAPPER
───────────────────────────────────────── */
#page { display: flex; flex-direction: column; min-height: 100vh; }
#main-content { flex: 1; }
.content-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 16px 80px;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero { text-align: center; margin-bottom: 36px; }
.hero h1 {
  font-family: var(--fh);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .hero-desc {
  font-size: 1.02rem;
  color: var(--fg2);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ─────────────────────────────────────────
   TOOL BOX
───────────────────────────────────────── */
.tool-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  margin-bottom: 56px;
}
.tool-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
#uf-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: var(--fb);
  background: var(--bg);
  color: var(--fg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s;
}
#uf-input:focus { border-color: var(--accent); }
#uf-input::placeholder { color: var(--fg3); }
.btn-clear {
  padding: 13px 18px;
  background: var(--bg);
  color: var(--fg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-family: var(--fb);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.btn-clear:hover { border-color: var(--accent); color: var(--accent); }

/* pills */
.cat-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg2);
  cursor: pointer;
  transition: all .15s;
}
.pill:hover, .pill.active {
  background: var(--accent-l);
  border-color: var(--accent);
  color: var(--accent);
}

/* font grid — responsive columns */
.font-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);        /* mobile: 2 cols */
  align-items: stretch;
}
@media (min-width: 640px)  { .font-grid { grid-template-columns: repeat(3, 1fr); } }  /* normal laptop: 3 cols */
@media (min-width: 1920px) { .font-grid { grid-template-columns: repeat(4, 1fr); } }  /* very large screen: 4 cols */

.font-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 14px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  height: 112px;             /* fixed — every card identical size regardless of row/content */
  box-sizing: border-box;
  overflow: hidden;          /* hard clip — nothing can push outside the card */
  position: relative;
}
.font-row:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(26,115,232,.08); }
.font-label {
  font-size: .63rem;
  font-weight: 700;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1;
}
.font-preview {
  width: 100%;
  font-size: 1rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.copy-btn {
  align-self: flex-end;
  padding: 5px 12px;
  background: var(--accent-l);
  color: var(--accent);
  border: none;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  font-family: var(--fb);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.copied { background: var(--green-l); color: var(--green); }

/* ─────────────────────────────────────────
   CONTENT SECTIONS
───────────────────────────────────────── */
.uf-section { margin-bottom: 64px; }
.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 7px;
}
.uf-section h2 {
  font-family: var(--fh);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  text-wrap: balance;
  line-height: 1.22;
}
.uf-section .sec-desc {
  color: var(--fg2);
  font-size: .96rem;
  max-width: 680px;
  margin-bottom: 22px;
  line-height: 1.72;
}

/* showcase grid */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);                 /* mobile: 2 cols */
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 640px)  { .showcase-grid { grid-template-columns: repeat(3, 1fr); } }  /* normal laptop: 3 cols */
@media (min-width: 1920px) { .showcase-grid { grid-template-columns: repeat(4, 1fr); } }  /* very large screen: 4 cols */
.showcase-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  height: 128px;              /* fixed — every showcase card identical size */
  box-sizing: border-box;
  overflow: hidden;           /* hard clip — nothing can push outside the card */
  display: flex;
  flex-direction: column;
}
.showcase-card h3 {
  font-size: .68rem;
  font-weight: 700;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 7px;
  font-family: var(--fb);
  flex-shrink: 0;
}
.sc-text {
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--fg);
  word-break: break-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

/* how-it-works steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  counter-reset: step;
}
.step-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  counter-increment: step;
}
.step-card::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--fh);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 9px;
}
.step-card h3 {
  font-family: var(--fh);
  font-size: .93rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.step-card p { font-size: .87rem; color: var(--fg2); line-height: 1.55; }

/* platform cards */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.platform-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.platform-icon { font-size: 1.4rem; margin-bottom: 8px; }
.platform-card h3 {
  font-family: var(--fh);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.platform-card p { font-size: .82rem; color: var(--fg2); line-height: 1.5; }

/* use-case grid */
.use-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.use-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.use-card h3 {
  font-family: var(--fh);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.use-card p { font-size: .82rem; color: var(--fg2); line-height: 1.5; }

/* ─────────────────────────────────────────
   FAQ  (h4 inside)
───────────────────────────────────────── */
.faq-list { display: grid; gap: 8px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--bg2);
  color: var(--fg);
  font-family: var(--fb);
  font-size: .9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-q h4 {
  font-size: .9rem;
  font-weight: 500;
  font-family: var(--fb);
  margin: 0;
  line-height: 1.4;
}
.faq-arrow { font-size: .7rem; color: var(--fg3); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--fg2);
  line-height: 1.68;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.faq-item.open .faq-a { display: block; }

/* ─────────────────────────────────────────
   DISCLAIMER
───────────────────────────────────────── */
.disclaimer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .81rem;
  color: var(--fg3);
  line-height: 1.6;
  margin-bottom: 56px;
}
.disclaimer strong { color: var(--fg2); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 16px;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.footer-brand .f-logo {
  font-family: var(--fh);
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  display: block;
  margin-bottom: 7px;
  text-decoration: none;
}
.footer-brand p { font-size: .81rem; color: var(--fg2); max-width: 240px; line-height: 1.55; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer-links a { font-size: .81rem; color: var(--fg2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: .76rem;
  color: var(--fg3);
}

/* ─────────────────────────────────────────
   INNER PAGES
───────────────────────────────────────── */
.page-content h1 {
  font-family: var(--fh);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  line-height: 1.2;
}
.page-content h2 {
  font-family: var(--fh);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 28px 0 10px;
}
.page-content p { color: var(--fg2); margin-bottom: 14px; line-height: 1.7; }
.page-content ul { color: var(--fg2); padding-left: 20px; margin-bottom: 14px; }
.page-content li { margin-bottom: 6px; line-height: 1.65; }
.page-content a { color: var(--accent); }

/* ─────────────────────────────────────────
   CONTACT FORM
───────────────────────────────────────── */
.uf-form { display: grid; gap: 14px; max-width: 520px; }
.uf-form label { font-size: .875rem; font-weight: 500; display: block; margin-bottom: 5px; }
.uf-form input, .uf-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--fb);
  background: var(--bg);
  color: var(--fg);
  outline: none;
}
.uf-form input:focus, .uf-form textarea:focus { border-color: var(--accent); }
.uf-form textarea { resize: vertical; min-height: 120px; }
.uf-form .btn-submit {
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  font-family: var(--fb);
  cursor: pointer;
  justify-self: start;
  transition: opacity .15s;
}
.uf-form .btn-submit:hover { opacity: .88; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 520px) {
  #nav-menu { display: none; }
  .font-label { min-width: 76px; font-size: .62rem; }
  .font-preview { font-size: .92rem; }
  .copy-btn { padding: 5px 10px; font-size: .7rem; }
  .showcase-grid { grid-template-columns: 1fr; }
}
