/* ==========================================================================
   Onnax Tools — Design System (main.css)
   Theme: Turquoise #18C5C8 / Dark #222222 / White — Modern SaaS
   ========================================================================== */

:root {
  /* Brand */
  --c-primary: #18C5C8;
  --c-primary-dark: #12A3A6;
  --c-primary-light: #E6FAFA;
  --c-secondary: #222222;
  --c-bg: #FFFFFF;
  --c-surface: #F8F9FB;
  --c-success: #21C55D;
  --c-warning: #F59E0B;
  --c-danger: #EF4444;
  /* Text */
  --c-text: #222222;
  --c-text-soft: #55606B;
  --c-text-faint: #8A94A0;
  --c-border: #E6EAF0;
  /* Effects */
  --grad-brand: linear-gradient(120deg, #18C5C8, #1FA2DE 55%, #18C5C8);
  --grad-soft: linear-gradient(180deg, #FFFFFF 0%, #F2FBFB 100%);
  --shadow-sm: 0 1px 3px rgba(16, 42, 67, .07);
  --shadow-md: 0 6px 24px rgba(16, 42, 67, .09);
  --shadow-lg: 0 18px 50px rgba(16, 42, 67, .14);
  --shadow-glow: 0 8px 30px rgba(24, 197, 200, .28);
  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;
  /* Type */
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* Layout */
  --container: 1200px;
  --header-h: 72px;
  --t-fast: .18s cubic-bezier(.4, 0, .2, 1);
  --t-med: .32s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.65;
  color: var(--c-text); background: var(--c-bg);
  overflow-x: hidden;
}
img, svg, canvas, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--c-primary-dark); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary); }
ul[role="list"], ol[role="list"] { list-style: none; }
:focus-visible { outline: 3px solid rgba(24,197,200,.5); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(24,197,200,.25); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.22; font-weight: 700; color: var(--c-secondary); }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.015em; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }
p  { color: var(--c-text-soft); }
strong { color: var(--c-text); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--c-secondary); color: #fff; padding: .6rem 1.1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--c-surface); }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head .kicker {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-primary-dark);
  background: var(--c-primary-light); padding: .3rem .9rem; border-radius: var(--r-full); margin-bottom: 14px;
}
.section-head p { margin-top: 12px; font-size: 1.05rem; }
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.7rem; border-radius: var(--r-full);
  border: 2px solid transparent; cursor: pointer; user-select: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--grad-brand); background-size: 180% 100%; color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { background-position: 100% 0; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 34px rgba(24,197,200,.4); }
.btn--dark { background: var(--c-secondary); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: var(--c-border); color: var(--c-text); background: var(--c-bg); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-dark); transform: translateY(-2px); }
.btn--lg { padding: 1rem 2.2rem; font-size: 1.02rem; }
.btn--sm { padding: .5rem 1.1rem; font-size: .85rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900; height: var(--header-h);
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230,234,240,.7);
  transition: box-shadow var(--t-med);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.28rem; color: var(--c-secondary); }
.logo:hover { color: var(--c-secondary); }
.logo__mark {
  width: 34px; height: 40px; flex: none;
  display: grid; place-items: center;
}
.logo__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo span em { font-style: normal; color: var(--c-primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-drop > button {
  padding: .55rem .95rem; border-radius: var(--r-sm); font-weight: 500; font-size: .95rem;
  color: var(--c-text-soft); background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: .35rem;
}
.main-nav > a:hover, .main-nav > a.is-active, .nav-drop > button:hover { color: var(--c-primary-dark); background: var(--c-primary-light); }
.nav-drop { position: relative; }
.nav-drop__menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: all var(--t-med); z-index: 950;
}
.nav-drop.is-open .nav-drop__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop__menu a { display: flex; align-items: center; gap: 10px; padding: .6rem .8rem; border-radius: var(--r-sm); color: var(--c-text); font-size: .93rem; }
.nav-drop__menu a:hover { background: var(--c-primary-light); color: var(--c-primary-dark); }
.nav-drop__menu .cat-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--c-primary-light); color: var(--c-primary-dark); }

.header-search { position: relative; width: 300px; margin-left: auto; }
.main-nav + .header-search, .header-search + .main-nav { margin-left: 0; }
.header-cta { margin-left: 6px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--c-secondary); margin: 5px 0; border-radius: 2px; transition: var(--t-med); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-secondary); color: #C9D2DB; margin-top: 72px; position: relative; }
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-brand); background-size: 220% 100%; animation: borderFlow 7s linear infinite;
}
@keyframes borderFlow { to { background-position: 220% 0; } }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.25fr; gap: 40px; padding: 60px 0 40px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #AEB9C4; font-size: .92rem; }
.site-footer a:hover { color: var(--c-primary); }
.footer-brand p { color: #AEB9C4; font-size: .92rem; margin: 14px 0 18px; max-width: 300px; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: var(--t-fast);
}
.social-row a:hover { background: var(--c-primary); transform: translateY(-3px); color: #fff; }
.footer-news p { font-size: .9rem; color: #AEB9C4; margin-bottom: 12px; }
.footer-news form { display: flex; gap: 8px; }
.footer-news input {
  flex: 1; min-width: 0; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-full); padding: .65rem 1.1rem; color: #fff; font-size: .9rem;
}
.footer-news input::placeholder { color: #8A94A0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: #8A94A0; }
.footer-bottom a { color: #8A94A0; margin-left: 16px; }

/* ---------- Cards ---------- */
.tool-card {
  position: relative; background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 26px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  overflow: hidden; isolation: isolate;
}
.tool-card::before {
  content: ""; position: absolute; inset: -40% -40% auto auto; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(24,197,200,.14), transparent 65%);
  opacity: 0; transition: opacity var(--t-med); z-index: -1;
}
.tool-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: rgba(24,197,200,.55); }
.tool-card:hover::before { opacity: 1; }
.tool-card__icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--c-primary-light); color: var(--c-primary-dark); font-size: 1.35rem;
  transition: var(--t-med);
}
.tool-card:hover .tool-card__icon { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); transform: rotate(-6deg) scale(1.06); }
.tool-card h3 { font-size: 1.06rem; }
.tool-card h3 a { color: inherit; }
.tool-card h3 a::after { content: ""; position: absolute; inset: 0; }
.tool-card p { font-size: .89rem; line-height: 1.55; flex: 1; }
.tool-card__go { font-weight: 600; font-size: .88rem; color: var(--c-primary-dark); display: inline-flex; align-items: center; gap: .3rem; }
.tool-card__badge {
  position: absolute; top: 16px; right: 16px; font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: .22rem .6rem; border-radius: var(--r-full);
}
.badge--popular { background: #FFF4E0; color: #B45309; }
.badge--new { background: #E3FCEC; color: #15803D; }

/* ---------- Ad placeholders ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #FAFBFC, #FAFBFC 12px, #F4F6F8 12px, #F4F6F8 24px);
  border: 1.5px dashed var(--c-border); border-radius: var(--r-md);
  color: var(--c-text-faint); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  min-height: 90px; margin: 28px auto; max-width: var(--container); text-align: center;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rect { min-height: 250px; max-width: 336px; }
.ad-slot--sidebar { min-height: 600px; max-width: 300px; margin: 0; position: sticky; top: calc(var(--header-h) + 20px); }
.ad-slot--mobile-sticky {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  min-height: 60px; margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
  background: #fff;
}

/* ---------- Misc ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

.text-center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-search { width: 230px; }
}
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 890;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-lg);
    padding: 14px 20px 20px; margin: 0;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all var(--t-med);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-drop__menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 14px; display: none; }
  .nav-drop.is-open .nav-drop__menu { display: block; }
  .header-search { display: none; }
  .header-cta { display: none; }
  .ad-slot--mobile-sticky { display: flex; }
  body { padding-bottom: 64px; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .container { padding-inline: 18px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
