/* ── WEB TOOLS — SHARED STYLES ─────────────────────────────────────────────────────── */

/* VARIABLES */
:root {
  --orange: #FF5500;
  --orange-dk: #e04d00;
  --blue: #1A4CFF;
  --dark: #0C0C0C;
  --light: #F5F5F2;
  --light-2: #EBEBE8;
  --white: #FFFFFF;
  --mid: #777777;
  --border-light: rgba(0,0,0,0.07);
  --border-mid: rgba(0,0,0,0.12);
  --font-head: 'Bricolage Grotesque', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(0.16,1,0.3,1);
  --radius: 4px;
  --radius-lg: 12px;
}

/* RESET + BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* HEADER */
header {
  border-bottom: 1px solid var(--border-light);
  padding: 24px 0;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 50;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.logo span { color: var(--orange); padding-left: 4px; }
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  margin-right: 8px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.header-nav a {
  position: relative;
  color: var(--mid);
  text-decoration: none;
  width: 75px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.header-nav a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; flex-shrink: 0; }
.header-nav a:hover { color: var(--dark); background: var(--light); }
.header-nav a.active { color: var(--dark); background: var(--light-2); }
.header-nav a::before {
  content: '';
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 60;
}
.header-nav a::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
  z-index: 60;
}
.header-nav a:hover::before,
.header-nav a:hover::after { opacity: 1; }
.header-nav a:last-child::after,
.header-nav a:nth-last-child(2)::after {
  left: auto;
  right: 0;
  transform: none;
}
.header-nav a:last-child::before,
.header-nav a:nth-last-child(2)::before {
  left: auto;
  right: 12px;
  transform: none;
}
.header-tag {
  font-size: 11px;
  color: var(--mid);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* BURGER BUTTON */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-light);
  cursor: pointer;
  padding: 9px;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.burger-btn:hover { background: var(--light); border-color: var(--border-mid); }
.burger-btn span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s, width 0.2s;
  width: 100%;
  transform-origin: center;
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE OVERLAY */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}
.mobile-overlay.open { opacity: 1; }

/* MOBILE DRAWER */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--dark);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.drawer-top .logo { color: var(--white); }
.drawer-top .logo-mark { background: var(--white); color: var(--dark); }
.drawer-top .logo span { color: var(--orange); }
.drawer-close {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.15s;
  flex-shrink: 0;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); border-color: rgba(255, 255, 255, 0.2); }
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 12px;
  flex: 1;
  gap: 2px;
}
.drawer-nav a {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  letter-spacing: -0.01em;
  font-family: var(--font-body);
}
.drawer-nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.drawer-nav a.active { color: var(--white); background: rgba(255, 255, 255, 0.09); }
.drawer-foot {
  padding: 18px 24px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* HERO */
.hero {
  background: var(--dark);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(26,76,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
.hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--orange);
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 24px;
}
.hero p {
  font-size: clamp(15px, 1.5vw, 17px);
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 550px;
}

/* PANEL */
.panel {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.panel-body { padding: 20px 24px; }

/* BADGE */
.header-badge {
  font-size: 11px;
  background: var(--light);
  border: 1px solid var(--border-mid);
  color: var(--mid);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
}

/* PRIMARY BUTTON */
.btn-generate {
  width: 100%;
  padding: 16px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-generate:hover { background: var(--orange-dk); transform: translateY(-2px); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-generate svg { width: 16px; height: 16px; }

/* SECONDARY BUTTON */
.btn-secondary {
  flex: 1;
  background: transparent;
  color: var(--dark);
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--dark); background: rgba(0,0,0,0.04); }

/* SPINNER */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.14);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ERROR */
.error-msg {
  display: none;
  font-size: 13px;
  color: #a32d2d;
  margin-top: 10px;
  padding: 12px 16px;
  background: #fcebeb;
  border-radius: var(--radius);
  border: 1px solid #f5b8b8;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border-light);
  padding: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--mid);
}
footer a { color: var(--mid); text-decoration: none; }
footer a:hover { color: var(--dark); }

/* FORM FIELDS */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid rgba(0,0,0,0.14);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(0,0,0,0.3); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,76,255,0.1);
}
.field textarea { resize: vertical; }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  transform: translateY(12px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--mid);
  line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--light); }
.modal-error {
  font-size: 12px;
  color: #a32d2d;
  margin-bottom: 14px;
  display: none;
  padding: 10px 14px;
  background: #fcebeb;
  border-radius: var(--radius);
  border: 1px solid #f5b8b8;
}
.modal-error.visible { display: block; }
.modal-submit {
  width: 100%;
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, transform 0.2s var(--ease);
  letter-spacing: 0.01em;
}
.modal-submit:hover { background: var(--orange-dk); transform: translateY(-1px); }
.modal-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--dark);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius);
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a32d2d; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .header-inner { padding: 0 28px; }
  .hero-inner { padding: 0 28px; }
  .main { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 20px; }
  .hero-inner { padding: 0 20px; }
  .hero { padding: 60px 0 40px; }
  .header-nav { display: none; }
  .burger-btn { display: flex; }
  .main { padding-left: 20px; padding-right: 20px; padding-top: 32px; }
}
