/* ============================================================
   FontGeneratorWorld.com — shared stylesheet (style.css)
   Aesthetic: clean "creative tool", warm-violet identity,
   textured off-white surface, electric-coral accents.
   Display: Bricolage Grotesque · Body: Hanken Grotesk · Mono: JetBrains Mono
   ============================================================ */

:root {
  --violet:        #5b34d6;
  --violet-700:    #4724b3;
  --violet-100:    #ece7fb;
  --coral:         #ff5d73;
  --coral-700:     #e23e57;
  --mint:          #19c3a6;
  --bg:            #fbfaff;
  --bg-tint:       #f3f0fb;
  --surface:       #ffffff;
  --ink:           #1b1b29;
  --muted:         #6b6b80;
  --border:        #e8e6f2;
  --shadow-sm:     0 1px 2px rgba(27,27,41,.06), 0 2px 8px rgba(27,27,41,.05);
  --shadow-md:     0 6px 24px rgba(46,26,120,.12);
  --shadow-lg:     0 18px 50px rgba(46,26,120,.18);
  --radius:        16px;
  --radius-sm:     10px;
  --maxw:          900px;
  --font-display:  "Bricolage Grotesque", Georgia, serif;
  --font-body:     "Hanken Grotesk", system-ui, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14131f;
    --bg-tint:   #1a1828;
    --surface:   #1e1d2c;
    --ink:       #f2f1f7;
    --muted:     #a7a4be;
    --border:    #322f47;
    --violet-100:#2a2247;
    --shadow-md: 0 6px 24px rgba(0,0,0,.5);
    --shadow-lg: 0 18px 50px rgba(0,0,0,.6);
  }
}

/* ---- reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  /* subtle atmosphere: two faint radial glows + grain feel */
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(91,52,214,.07), transparent 60%),
    radial-gradient(50rem 40rem at -10% 10%, rgba(255,93,115,.06), transparent 55%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- layout ----------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
main { padding-block: 8px 56px; }
section { margin-block: 44px; }

/* ---- typography ------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.eyebrow { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--violet); font-weight: 600; }

/* ---- header / nav ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 8px; height: 62px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: -.02em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--coral)); }
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-item { position: relative; }
.nav-item > a, .nav-trigger {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; font-size: .95rem; background: none;
  border: 0; font-family: inherit; cursor: pointer;
}
.nav-item > a:hover, .nav-trigger:hover { background: var(--violet-100); text-decoration: none; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  display: none; flex-direction: column;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: flex; }
.dropdown a { padding: 7px 10px; border-radius: 8px; color: var(--ink); font-size: .92rem; }
.dropdown a:hover { background: var(--violet-100); text-decoration: none; }
.nav-toggle { display: none; }

/* ---- breadcrumb ------------------------------------------- */
.breadcrumb { font-size: .82rem; color: var(--muted); margin: 18px 0 2px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb span[aria-current] { color: var(--ink); }

/* ---- buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px rgba(255,93,115,.35); }
.btn-primary:hover { background: var(--coral-700); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }

/* ---- generator widget ------------------------------------- */
.generator {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px; margin-top: 18px;
}
.generator-input {
  width: 100%; font-family: var(--font-body); font-size: 1.15rem; color: var(--ink);
  padding: 16px 18px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .15s, box-shadow .15s;
}
.generator-input:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--violet-100);
}
.generator-hint { font-size: .82rem; color: var(--muted); margin: 10px 2px 0; }

.fgw-results { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.fgw-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
}
.fgw-row:hover { border-color: color-mix(in srgb, var(--violet) 40%, var(--border)); }
.fgw-row-main { flex: 1; min-width: 0; }
.fgw-name { display: block; font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.fgw-out { display: block; font-size: 1.25rem; line-height: 1.5;
  word-break: break-word; overflow-wrap: anywhere; }
.fgw-copy {
  flex: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: .82rem;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--violet); transition: all .14s;
}
.fgw-copy:hover { background: var(--violet); color: #fff; border-color: var(--violet); }
.fgw-copy.is-copied { background: var(--mint); color: #fff; border-color: var(--mint); }

/* ---- cards / tool grid ------------------------------------ */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--violet) 35%, var(--border)); }
.card h3 { margin: 0 0 6px; }
.card .sample { font-size: 1.4rem; margin: 8px 0; color: var(--violet); }
.card p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---- tables ----------------------------------------------- */
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
thead th { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
tbody tr:nth-child(even) { background: var(--bg-tint); }

/* ---- FAQ accordion (CSS-only) ----------------------------- */
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; background: var(--surface); overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600; font-family: var(--font-display);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--violet); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; color: var(--muted); }

/* ---- callout / note --------------------------------------- */
.note {
  border-left: 3px solid var(--violet); background: var(--violet-100);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2em 0;
}
.note.warn { border-left-color: var(--coral); background: color-mix(in srgb, var(--coral) 10%, var(--bg)); }

/* ---- footer ----------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-tint); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-block: 44px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--ink); font-size: .9rem; }
.footer-grid a:hover { color: var(--violet); }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { font-size: .88rem; color: var(--muted); max-width: 30ch; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 18px;
  font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- toast ------------------------------------------------ */
.fgw-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 10px 20px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.fgw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- responsive ------------------------------------------- */
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .nav-links { display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px; gap: 2px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-item, .nav-item > a, .nav-trigger { width: 100%; text-align: left; }
  .dropdown { position: static; display: flex; box-shadow: none; border: 0;
    padding-left: 12px; min-width: 0; }
  .nav-toggle { display: inline-flex; }
  .fgw-out { font-size: 1.1rem; }
}

/* ---- a11y / motion ---------------------------------------- */
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
