/* Shared styles for Nasloy standalone tools — unified header/footer/theme */
:root {
  --background: 240 20% 4%;
  --foreground: 210 40% 98%;
  --card: 240 15% 8%;
  --card-foreground: 210 40% 98%;
  --popover: 240 15% 8%;
  --popover-foreground: 210 40% 98%;
  --primary: 239 84% 67%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 15% 12%;
  --secondary-foreground: 210 40% 98%;
  --muted: 240 15% 12%;
  --muted-foreground: 215 20% 65%;
  --accent: 24 100% 55%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 240 10% 18%;
  --input: 240 10% 18%;
  --ring: 239 84% 67%;
  --radius: 0.625rem;
  --site-dark: 240 20% 4%;
  --site-dark-light: 240 15% 8%;
  --site-dark-lighter: 240 14% 12%;
  --bg: hsl(var(--site-dark));
  --text: hsl(var(--foreground));
  --muted-text: hsl(var(--muted-foreground));
  --line: hsl(var(--border));
  --tool-accent: #ff7a1a;
  --ok: #20d18d;
  --danger: #ff4d5a;
  color-scheme: dark;
}
[data-theme="light"] {
  --background: 220 33% 98%;
  --foreground: 224 45% 12%;
  --card: 0 0% 100%;
  --card-foreground: 224 45% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 45% 12%;
  --primary: 239 84% 67%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 95%;
  --secondary-foreground: 224 45% 15%;
  --muted: 220 20% 95%;
  --muted-foreground: 220 15% 36%;
  --accent: 24 100% 55%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 16% 86%;
  --input: 220 16% 86%;
  --ring: 239 84% 67%;
  --site-dark: 220 33% 98%;
  --site-dark-light: 0 0% 100%;
  --site-dark-lighter: 220 20% 95%;
  --bg: hsl(var(--site-dark));
  --text: hsl(var(--foreground));
  --muted-text: hsl(var(--muted-foreground));
  --line: hsl(var(--border));
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, box-shadow .3s;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: hsl(var(--site-dark) / .8);
  backdrop-filter: blur(16px);
  border-bottom-color: hsl(var(--border) / .4);
}
[data-theme="light"] .site-header.scrolled {
  background: hsl(0 0% 100% / .88);
  border-bottom-color: hsl(220 16% 86% / .8);
}
.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
@media (min-width: 1024px) { .header-inner { height: 72px; padding: 0 24px; } }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-box {
  width: 38px; height: 38px; border-radius: 10px;
  overflow: hidden; border: 1px solid hsl(var(--foreground) / .12);
  background: hsl(var(--foreground) / .06);
  display: flex; align-items: center; justify-content: center;
}
.logo-box img { width: 26px; height: 26px; object-fit: contain; }
.logo-text { font-weight: 600; font-size: 19px; color: var(--text); }
.desktop-nav { display: none; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }
.nav-link {
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: hsl(var(--foreground) / .05); }
[data-theme="light"] .nav-link { color: hsl(220 15% 36%); }
[data-theme="light"] .nav-link:hover { color: hsl(224 45% 12%); background: hsl(220 20% 90% / .5); }
.header-actions { display: none; align-items: center; gap: 10px; }
@media (min-width: 1024px) { .header-actions { display: flex; } }
.theme-toggle, .cta-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.theme-toggle {
  border: 1px solid hsl(var(--foreground) / .12);
  background: hsl(var(--foreground) / .05);
  color: var(--text); padding: 8px 12px;
}
.theme-toggle:hover { background: hsl(var(--primary) / .12); border-color: hsl(var(--primary) / .3); }
[data-theme="light"] .theme-toggle { background: #fff; border-color: hsl(var(--border)); color: hsl(224 45% 12%); }
[data-theme="light"] .theme-toggle:hover { background: hsl(220 20% 95%); }
.theme-toggle svg { width: 15px; height: 15px; }
.cta-button {
  background: hsl(var(--primary)); color: #fff; border: none; padding: 9px 18px;
  text-decoration: none;
}
.cta-button:hover { filter: brightness(1.08); box-shadow: 0 0 22px hsl(var(--primary) / .35); }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  border: 1px solid hsl(var(--foreground) / .12); background: hsl(var(--foreground) / .05);
  color: var(--text);
}
.menu-btn:hover { background: hsl(var(--foreground) / .1); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: hsl(var(--site-dark) / .95);
  backdrop-filter: blur(12px);
  flex-direction: column;
  padding: 80px 20px 24px;
}
[data-theme="light"] .mobile-menu { background: hsl(0 0% 100% / .97); }
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid hsl(var(--border) / .5);
  color: var(--text); font-size: 16px; font-weight: 500;
  background: transparent; border-left: none; border-right: none; border-top: none;
  cursor: pointer; width: 100%; text-align: left;
}
.mobile-menu a:hover, .mobile-menu button:hover { color: hsl(var(--primary)); }
.mobile-close {
  position: absolute; top: 14px; right: 16px; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid hsl(var(--foreground) / .12);
  background: hsl(var(--foreground) / .05); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-close svg { width: 20px; height: 20px; }

/* Page layout */
.page-wrap { max-width: 1000px; margin: 0 auto; padding: 96px 16px 64px; }
@media (min-width: 1024px) { .page-wrap { padding-top: 112px; } }
.page-hero { margin-bottom: 28px; }
.page-hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.page-hero .lead { margin: 0; color: var(--muted-text); max-width: 820px; font-size: 17px; }

/* Tool cards / sections */
.tool-card {
  background: linear-gradient(160deg, hsl(var(--site-dark-light) / .95), hsl(var(--site-dark) / .95));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / .04), 0 16px 36px rgba(0,0,0,.18);
}
[data-theme="light"] .tool-card { box-shadow: 0 4px 20px rgba(15,23,42,.06); }
h2.section-title { margin: 28px 0 12px; font-size: 20px; }

/* Forms */
label { display: block; font-size: 14px; margin-bottom: 6px; color: hsl(var(--foreground) / .85); }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); background: hsl(var(--site-dark));
  color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 15px; font-family: inherit;
}
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select { background: hsl(var(--card)); }
input:focus, textarea:focus, select:focus { outline: none; border-color: hsl(var(--primary)); ring: 2px hsl(var(--ring) / .3); }
button.action { border: none; border-radius: 10px; padding: 11px 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
.btn-main { display: inline-block; background: linear-gradient(90deg,#ff8a34,var(--tool-accent)); color: #1f1205; text-decoration: none; border-radius: 10px; padding: 13px 22px; font-weight: 700; }
.btn-main:hover { filter: brightness(1.08); }
.btn-soft { background: hsl(var(--secondary)); color: var(--secondary-foreground); border: 1px solid var(--line); }

/* Hero + CTA sections shared by every standalone tool page */
.hero { margin: 46px 0 34px; text-align: center; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: hsl(var(--primary) / .15); color: hsl(var(--primary)); border: 1px solid hsl(var(--primary) / .35); font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 48px); line-height: 1.12; font-weight: 800; }
.gradient { background: linear-gradient(90deg, #ff8a34, var(--tool-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.lead { margin: 0 auto; max-width: 780px; color: var(--muted-text); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.55; }
.cta { margin-top: 48px; padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, hsl(var(--site-dark-light) / .7), hsl(var(--site-dark) / .7)); text-align: center; }
.cta h2 { margin: 0 0 10px; font-size: 24px; }
.cta p { margin: 0 0 18px; color: var(--muted-text); }
@media(max-width:900px){ .hero { margin: 34px 0 26px; } }

/* Footer */
.site-footer {
  background: hsl(var(--site-dark-light));
  border-top: 1px solid hsl(var(--border) / .5);
}
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 56px 16px 24px; }
@media (min-width: 1024px) { .footer-inner { padding: 64px 24px 28px; } }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; } }
.footer-brand p { color: var(--muted-text); font-size: 14px; max-width: 320px; margin: 16px 0; }
.footer-contacts {
  border: 1px solid hsl(var(--border) / .6); border-radius: 14px;
  background: hsl(var(--site-dark) / .5); padding: 16px; margin-bottom: 20px;
}
.footer-contacts p { margin: 0 0 6px; font-size: 13px; color: var(--muted-text); }
.footer-contacts a { color: hsl(var(--primary)); text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-form { margin-bottom: 18px; }
.footer-form h4 { margin: 0 0 10px; font-size: 14px; }
.footer-form form { display: flex; gap: 8px; }
.footer-form input { flex: 1; }
.footer-form button {
  background: hsl(var(--primary)); color: #fff; border: none; border-radius: 10px;
  width: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.footer-form label { font-size: 11px; color: var(--muted-text); margin-top: 8px; line-height: 1.4; }
.footer-form label a { color: hsl(var(--primary)); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid hsl(var(--border) / .6);
  background: hsl(var(--site-dark) / .5); color: var(--muted-text);
  display: flex; align-items: center; justify-content: center;
}
.footer-socials a:hover { color: var(--text); border-color: hsl(var(--primary) / .4); background: hsl(var(--primary) / .1); }
.footer-col h4 { margin: 0 0 14px; font-size: 14px; color: var(--text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--muted-text); font-size: 13px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid hsl(var(--border) / .5); padding-top: 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-bottom p, .footer-bottom a { margin: 0; font-size: 12px; color: var(--muted-text); }
.footer-bottom a:hover { color: hsl(var(--primary)); }

/* Utility */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.text-muted { color: var(--muted-text); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
