/* ===================================
   HamaryTools — Design System
   =================================== */

:root {
  /* Colors */
  --navy-950: #0a0f1d;
  --navy-900: #0F1729;
  --navy-800: #1A2438;
  --navy-700: #28344A;
  --slate-500: #64748B;
  --slate-400: #8B98AC;
  --slate-200: #E2E6ED;
  --cream-50: #FAFAF8;
  --cream-100: #F4F2EC;
  --amber-500: #F59E0B;
  --amber-400: #FBBC3D;
  --amber-50: #FEF6E7;
  --green-500: #22C55E;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --container-w: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 41, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 41, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream-50);
  color: var(--navy-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Skip link / accessibility ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber-500);
  color: var(--navy-900);
  padding: 10px 16px;
  z-index: 999;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2.5px solid var(--amber-500);
  outline-offset: 2px;
}

/* ===================================
   HEADER
   =================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--navy-900);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-400);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.logo .accent { color: var(--amber-500); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 0.15s ease;
  position: relative;
}
.main-nav a:hover { color: var(--navy-900); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-icon-search {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  color: var(--cream-50);
  transition: transform 0.15s ease;
}
.btn-icon-search:hover { transform: scale(1.06); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}

/* ===================================
   HERO
   =================================== */
.hero {
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--amber-50) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-500);
  background: var(--amber-50);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-500);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--navy-900);
  margin-bottom: 22px;
}

.hero h1 .underline-amber {
  position: relative;
  white-space: nowrap;
}
.hero h1 .underline-amber::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px; bottom: 4px;
  height: 12px;
  background: var(--amber-400);
  opacity: 0.45;
  z-index: -1;
  border-radius: 3px;
}

.hero-sub {
  font-size: 18px;
  color: var(--slate-500);
  max-width: 480px;
  margin-bottom: 34px;
  line-height: 1.6;
}

.hero-search {
  position: relative;
  max-width: 480px;
  margin-bottom: 22px;
}

.hero-search input {
  width: 100%;
  height: 58px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  padding: 0 56px 0 22px;
  font-size: 15.5px;
  font-family: var(--font-body);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hero-search input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px var(--amber-50);
}
.hero-search input::placeholder { color: var(--slate-400); }

.hero-search button {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.hero-search button:hover { background: var(--navy-700); }

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-tags span:first-child {
  font-size: 13px;
  color: var(--slate-400);
  margin-right: 4px;
}
.hero-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-900);
  background: var(--white);
  border: 1px solid var(--slate-200);
  padding: 6px 13px;
  border-radius: 100px;
  transition: all 0.15s ease;
}
.hero-tag:hover {
  border-color: var(--amber-500);
  background: var(--amber-50);
}

/* ----- Hero live widget (signature element) ----- */
.hero-widget {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245,158,11,0.12), transparent 60%);
  pointer-events: none;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.widget-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.widget-live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.widget-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.06);
  padding: 4px;
  border-radius: 10px;
}
.widget-tab {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate-400);
  padding: 8px 0;
  border-radius: 7px;
  transition: all 0.15s ease;
}
.widget-tab.active {
  background: var(--white);
  color: var(--navy-900);
}

.widget-body { display: none; }
.widget-body.active { display: block; }

.field-row { margin-bottom: 14px; }
.field-row label {
  display: block;
  font-size: 12px;
  color: var(--slate-400);
  margin-bottom: 6px;
  font-weight: 500;
}
.field-row input, .field-row select {
  width: 100%;
  height: 46px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 0 14px;
}
.field-row input:focus { border-color: var(--amber-500); }
.field-row input::placeholder { color: rgba(255,255,255,0.3); font-family: var(--font-body); }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.widget-result {
  margin-top: 18px;
  padding: 18px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.widget-result-label { font-size: 13px; color: var(--amber-400); font-weight: 500; }
.widget-result-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
}

.widget-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--slate-400);
}
.widget-footer a { color: var(--amber-400); font-weight: 500; }

/* ===================================
   TRUST STRIP
   =================================== */
.trust-strip {
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  background: var(--white);
  padding: 28px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--amber-50);
  color: var(--amber-500);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trust-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy-900);
  font-weight: 600;
}
.trust-text span { font-size: 12.5px; color: var(--slate-500); }

/* ===================================
   SECTIONS — generic
   =================================== */
.section { padding: 88px 0; }
.section-cream { background: var(--cream-100); }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 52px;
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-bottom: 12px;
  display: block;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-head p { color: var(--slate-500); font-size: 16px; line-height: 1.6; }

/* ===================================
   CATEGORY TABS
   =================================== */
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-500);
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  padding: 10px 18px;
  border-radius: 100px;
  transition: all 0.15s ease;
}
.cat-tab:hover { border-color: var(--navy-900); color: var(--navy-900); }
.cat-tab.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

/* ===================================
   TOOL CARDS GRID
   =================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.tool-card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.5;
  margin-bottom: 14px;
  min-height: 38px;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.tool-card-tag {
  color: var(--slate-400);
  font-weight: 500;
}
.tool-card-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cream-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-900);
  transition: all 0.18s ease;
}
.tool-card:hover .tool-card-arrow {
  background: var(--amber-500);
  color: var(--white);
  transform: translateX(2px);
}

.view-all-wrap { text-align: center; margin-top: 44px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-900);
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  padding: 13px 26px;
  border-radius: 100px;
  transition: all 0.15s ease;
}
.btn-secondary:hover { border-color: var(--navy-900); }

/* ===================================
   HOW IT WORKS
   =================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step-card { position: relative; }
.step-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--slate-200);
  line-height: 1;
  margin-bottom: 14px;
}
.step-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 10px;
}
.step-card p { color: var(--slate-500); font-size: 14.5px; line-height: 1.6; }

/* ===================================
   CTA BANNER
   =================================== */
.cta-banner {
  background: var(--navy-900);
  border-radius: 28px;
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  right: -100px; top: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(245,158,11,0.18), transparent 70%);
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  max-width: 440px;
}
.cta-banner p { color: var(--slate-400); font-size: 15px; max-width: 420px; }
.btn-amber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-500);
  color: var(--navy-900);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 28px;
  border-radius: 100px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-amber:hover { background: var(--amber-400); transform: translateY(-1px); }

/* ===================================
   FOOTER
   =================================== */
.site-footer {
  background: var(--navy-950);
  color: var(--slate-400);
  padding: 64px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--navy-700);
}
.footer-brand .logo { color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; line-height: 1.6; max-width: 260px; color: var(--slate-400); }
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 14px; color: var(--cream-100); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--amber-400); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
}
.footer-bottom a { color: var(--slate-400); }
.footer-bottom a:hover { color: var(--white); }
.footer-legal { display: flex; gap: 22px; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .steps-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .main-nav { display: none; }
  .main-nav.nav-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: flex; }
  .cta-banner { flex-direction: column; text-align: center; padding: 44px 28px; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 16px; }
  .tool-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 27px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .cat-tabs { overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cta-banner h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
