/* ========================================
   VELMORA FONT TOOLKIT — UPDATED STYLES
   ======================================== */

:root {
  --bg: #f5f5f8;
  --surface: #ffffff;
  --surface-soft: #faf9fc;
  --text: #17171d;
  --muted: #777783;
  --border: #e7e5ed;
  --accent: #8062df;
  --accent-dark: #6849c5;
  --accent-soft: #f0ebff;
  --success: #24865b;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(25, 20, 45, 0.045);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  min-width: 320px;
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(128, 98, 223, 0.3);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header {
  min-height: 76px;
  padding: 14px max(20px, calc((100% - 1120px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 1.2px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 19px;
  letter-spacing: 0;
  box-shadow: 0 5px 14px rgba(128, 98, 223, 0.22);
}

.brand-light {
  color: var(--accent);
}

.header-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

/* Hero */
.hero {
  padding: 64px 0 36px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 13px;
  padding: 6px 12px;
  border: 1px solid #e5ddff;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.muted-heading {
  color: var(--accent);
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

/* Workspace cards */
.workspace {
  margin: 22px auto;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.55px;
}

.field-label,
.control label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.helper {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.field-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* Form controls */
textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;}

textarea {
  display: block;
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

textarea::placeholder {
  color: #9a97a5;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(128, 98, 223, 0.1);
  outline: none;
}

select {
  min-height: 44px;
  cursor: pointer;
}

input[type="range"] {
  display: block;
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="color"] {
  width: 52px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

/* Buttons */
.text-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 13px rgba(128, 98, 223, 0.16);
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 7px 17px rgba(128, 98, 223, 0.22);
}

.secondary-button {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.secondary-button:hover {
  border-color: #cfc4f6;
  background: var(--accent-soft);
}

.text-button {
  min-height: 36px;
  padding: 8px 12px;
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.text-button:hover {
  border-color: #cfc4f6;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: translateY(0);
}

.full-button {
  width: 100%;
  margin-top: 14px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Text analyzer */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.stat-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.stat-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.8px;
}

.counter-note {
  margin-top: 14px;
}

/* Unicode text styler */
.style-list {
  display: grid;
  gap: 12px;
}

.style-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.style-info {
  min-width: 0;
  flex: 1;
}

.style-name {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 750;
}

.style-output {
  overflow-wrap: anywhere;
  color: #494653;
  font-size: 15px;
}

.style-item .copy-button {
  flex-shrink: 0;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.style-item .copy-button:hover {
  border-color: #cfc4f6;
  background: var(--accent-soft);
}

/* Font lab */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.control {
  min-width: 0;
}

.control label span {
  color: var(--muted);
  font-weight: 500;
}

.preview-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.preview-topline .field-label {
  margin: 0;
  letter-spacing: 0.5px;
}

.live-dot {
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.5px;
}

.font-preview {
  display: flex;
  align-items: center;
  min-height: 150px;
  padding: 26px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(45deg, #f7f6fa 25%, transparent 25%),
    linear-gradient(-45deg, #f7f6fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f7f6fa 75%),
    linear-gradient(-45deg, transparent 75%, #f7f6fa 75%);
  background-size: 20px 20px;
  background-color: #fff;
  font-size: 36px;
  line-height: 1.4;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* Text effects */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.toggle-row strong {
  display: block;
  font-size: 13px;
}

.toggle-description {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.toggle-row input {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Gradient studio */
.color-control {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.color-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gradient-preview-wrap {
  margin-top: 24px;
}

.gradient-preview-wrap > .field-label {
  margin-bottom: 12px;
}

.gradient-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
  padding: 25px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfaff;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  white-space: pre-wrap;
  overflow: hidden;
}

.gradient-preview span {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Closing info strip */
.info-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 44px;
  padding: 24px;
  border: 1px solid #e5ddff;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fff, #f6f2ff);
}

.info-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 21px;
  font-weight: 800;
}

.info-strip h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.info-strip p {
  color: var(--muted);
  font-size: 13px;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 22px;
  padding: 24px max(20px, calc((100% - 1120px) / 2));
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.footer-brand {
  font-size: 14px;
}

.footer-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 16px;
}

/* Toast */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  max-width: calc(100vw - 36px);
  padding: 12px 18px;
  border: 1px solid #ded5fa;
  border-radius: 12px;
  background: #211b32;
  color: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 900px) {
  #font-section .controls-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .site-header {
    min-height: 68px;
  }

  .hero {
    padding-top: 48px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .font-preview {
    font-size: 30px;
  }
}

@media (max-width: 540px) {
  .container {
    width: calc(100% - 24px);
  }

  .site-header {
    padding: 12px;
    gap: 10px;
  }

  .brand {
    gap: 7px;
    font-size: 14px;
    letter-spacing: 0.6px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  .header-label {
    max-width: 110px;
    font-size: 9px;
    letter-spacing: 0.7px;
    text-align: right;
  }

  .hero {
    padding: 42px 0 24px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 44px);
    letter-spacing: -1.4px;
  }

  .hero p {
    font-size: 14px;
  }

  .workspace {
    margin: 16px auto;
    padding: 17px;
    border-radius: 15px;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .controls-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .style-item {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .style-output {
    font-size: 13px;
  }

  .style-item .copy-button {
    padding: 7px 9px;
    font-size: 11px;
  }

  .font-preview {
    min-height: 120px;
    padding: 18px;
    font-size: 26px;
  }

  .preview-meta {
    align-items: flex-start;
  }

  .preview-meta .secondary-button {
    flex-shrink: 0;
  }

  .gradient-preview {
    min-height: 120px;
    padding: 18px;
    font-size: 29px;
  }

  .info-strip {
    align-items: flex-start;
    gap: 12px;
    padding: 17px;
  }

  .info-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 18px;
  }

  .site-footer {
    justify-content: center;
    padding: 22px 12px;
    text-align: center;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* FIX: Restore original Text Styler classes */

.style-results,
.style-list {
  display: grid;
  gap: 14px;
}

.style-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.style-info {
  min-width: 0;
  flex: 1;
}

.style-name {
  display: block;
  margin-bottom: 5px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.style-output {
  overflow-wrap: anywhere;
  color: #494653;
  font-size: 15px;
}

.style-item .copy-button {
  display: inline-flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.style-item .copy-button:hover {
  border-color: #cfc4f6;
  background: var(--accent-soft);
}

@media (max-width: 540px) {
  .style-item {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .style-output {
    font-size: 13px;
  }

  .style-item .copy-button {
    padding: 7px 10px;
  }
}


/* VELMORA FONT TOOLKIT — TEXT STYLER FIX */

.style-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.style-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  min-width: 0;
  border: 1px solid var(--border-color, #333344);
  border-radius: 14px;
  background: var(--card-bg, #17171f);
}

.style-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.style-name {
  color: var(--muted-text, #aaaabb);
  font-size: 12px;
  font-weight: 700;
}

.style-value {
  display: block;
  color: var(--text-color, #f5f5fa);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.style-card .copy-button {
  flex-shrink: 0;
  padding: 9px 15px;
  border: 1px solid var(--border-color, #444454);
  border-radius: 9px;
  background: #242431;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.style-card .copy-button:hover:not(:disabled) {
  background: #37334c;
  border-color: #a78bfa;
}

.style-card .copy-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .style-card {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .style-card .copy-button {
    padding: 8px 10px;
  }

  .style-value {
    font-size: 14px;
  }
}

/* ========================================
   VELMORA — SEO NAVIGATION & CONTENT
   ======================================== */

/* Tool navigation */
.tool-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 8px 0 26px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tool-navigation a:hover {
  border-color: #ded5fa;
  background: var(--accent-soft);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.tool-navigation a:focus-visible {
  outline: 3px solid rgba(128, 98, 223, 0.3);
  outline-offset: 3px;
}

/* SEO content section */
#about-toolkit {
  padding: 30px;
}

#about-toolkit > p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

#about-toolkit h3 {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

#about-toolkit h3 + p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Smooth anchor positioning */
html {
  scroll-padding-top: 30px;
}

/* Mobile navigation */
@media (max-width: 600px) {
  .tool-navigation {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
    scrollbar-width: thin;
  }

  .tool-navigation a {
    flex-shrink: 0;
    padding: 9px 11px;
    font-size: 11px;
  }

  #about-toolkit {
    padding: 19px;
  }

  #about-toolkit h3 {
    font-size: 16px;
  }

  #about-toolkit > p,
  #about-toolkit h3 + p {
    font-size: 13px;
  }
}
