/* Homepage styles — moved out of index.html (v3) so browsers cache them.
   After editing, bump ?v= on the <link> in index.html. */
  :root {
    --orange: #ff7600;
    --orange-dim: #c45800;
    --orange-glow: rgba(255,118,0,0.35);
    --orange-soft: rgba(255,118,0,0.07);
    --bg: #000000;
    --surface: #080808;
    --surface-2: #0e0e0e;
    --surface-hover: #141414;
    --border: rgba(255,118,0,0.12);
    --border-strong: rgba(255,118,0,0.3);
    --text: #e8e8e0;
    --text-dim: #b0b0a6;
    --text-muted: #86867d;
    --font: 'Courier Prime', 'Courier New', monospace;
    --radius: 3px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) #050505;
  }
  html::-webkit-scrollbar { width: 5px; }
  html::-webkit-scrollbar-track { background: #050505; }

  /* === SKIP LINK (visually hidden until keyboard-focused) === */
  .skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100000;
    background: var(--orange);
    color: #000;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 3px;
    transition: top 0.2s ease;
  }
  .skip-link:focus {
    top: 12px;
  }

  /* Visually hidden but accessible to screen readers */
  .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  html::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 2px; }

  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
  }

  /* === NOISE TEXTURE OVERLAY === */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1;
  }

  /* === SCANLINES === */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255,118,0,0.012) 3px,
      rgba(255,118,0,0.012) 4px
    );
    pointer-events: none;
    z-index: 2;
    animation: scanmove 12s linear infinite;
  }
  @keyframes scanmove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
  }

  /* === AMBIENT BACKGROUND === */
  .bg-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .bg-ambient::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 700px;
    background: radial-gradient(ellipse, rgba(255,118,0,0.07) 0%, transparent 65%);
    animation: ambientPulse 8s ease-in-out infinite;
  }
  .bg-ambient::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -10%;
    width: 600px; height: 500px;
    background: radial-gradient(ellipse, rgba(255,80,0,0.04) 0%, transparent 70%);
    animation: ambientPulse 11s ease-in-out infinite reverse;
  }
  @keyframes ambientPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
  }

  /* === GRID LINES BACKGROUND === */
  .bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
      linear-gradient(rgba(255,118,0,0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,118,0,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
  }

  /* === HEADER === */
  header {
    position: relative;
    padding: 60px 24px 48px;
    text-align: center;
    z-index: 10;
    overflow: hidden;
  }

  /* Knife SVG blade decorations */
  header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,118,0,0.15) 20%, var(--orange) 50%, rgba(255,118,0,0.15) 80%, transparent 100%);
  }

  .header-inner {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    z-index: 3;
  }

  /* === ANIMATED LOGO AREA === */
  .logo-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 4px;
  }

  .logo-wrap {
    position: relative;
    width: 80px; height: 80px;
  }

  .logo-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    filter: contrast(1.1) saturate(1.2);
    border: 1.5px solid rgba(255,118,0,0.4);
  }

  .logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(255,118,0,0.2);
    animation: ringRotate 8s linear infinite;
  }
  .logo-ring::before {
    content: '';
    position: absolute;
    top: -2px; left: 50%;
    transform: translateX(-50%);
    width: 5px; height: 5px;
    background: var(--orange);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--orange);
  }
  @keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  .logo-ring-2 {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 1px dashed rgba(255,118,0,0.1);
    animation: ringRotate 14s linear infinite reverse;
  }

  /* === TITLE === */
  .site-title {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.18em;
    line-height: 1;
    position: relative;
    display: inline-block;
  }

  .site-title .title-char {
    display: inline-block;
    animation: charDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .site-title .title-char:nth-child(1) { animation-delay: 0.05s; }
  .site-title .title-char:nth-child(2) { animation-delay: 0.1s; }
  .site-title .title-char:nth-child(3) { animation-delay: 0.15s; }
  .site-title .title-char:nth-child(4) { animation-delay: 0.2s; }
  .site-title .title-char:nth-child(5) { animation-delay: 0.25s; }
  .site-title .title-char:nth-child(6) { animation-delay: 0.3s; }
  .site-title .title-char:nth-child(7) { animation-delay: 0.35s; }
  @keyframes charDrop {
    from { opacity: 0; transform: translateY(-30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Glitch effect on title */
  .site-title::before,
  .site-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    font-weight: 700;
    letter-spacing: inherit;
  }
  .site-title::before {
    color: rgba(255,0,80,0.4);
    animation: glitchL 6s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  }
  .site-title::after {
    color: rgba(0,200,255,0.3);
    animation: glitchR 6s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  }
  @keyframes glitchL {
    0%, 90%, 100% { transform: translateX(0); opacity: 0; }
    91% { transform: translateX(-3px); opacity: 1; }
    93% { transform: translateX(2px); opacity: 0.7; }
    95% { transform: translateX(0); opacity: 0; }
  }
  @keyframes glitchR {
    0%, 92%, 100% { transform: translateX(0); opacity: 0; }
    93% { transform: translateX(3px); opacity: 1; }
    95% { transform: translateX(-2px); opacity: 0.6; }
    97% { transform: translateX(0); opacity: 0; }
  }

  .site-sub {
    font-size: 0.72rem;
    letter-spacing: 0.45em;
    color: var(--orange);
    opacity: 0.5;
    text-transform: uppercase;
    margin-top: 6px;
    margin-bottom: 36px;
    animation: fadeUp 0.8s 0.5s both;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 0.5; transform: translateY(0); }
  }

  /* === SEARCH === */
  .search-container {
    max-width: 520px;
    margin: 0 auto;
    animation: fadeUp 0.8s 0.6s both;
  }

  .search-wrap {
    position: relative;
  }

  #toolSearch {
    width: 100%;
    background: rgba(255,118,0,0.04);
    border: 1px solid rgba(255,118,0,0.25);
    border-left: 3px solid var(--orange);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    padding: 14px 46px 14px 46px;
    outline: none;
    letter-spacing: 0.05em;
    transition: var(--transition);
    border-radius: 0;
  }

  #toolSearch::placeholder { color: var(--text-muted); font-style: italic; }
  #toolSearch:focus {
    border-color: var(--orange);
    background: rgba(255,118,0,0.06);
    box-shadow: 0 0 0 1px rgba(255,118,0,0.08), 0 0 40px rgba(255,118,0,0.08);
  }

  .search-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--orange);
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.6;
  }

  .search-clear {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 1rem;
    display: none;
    padding: 4px 8px;
    transition: var(--transition);
  }
  .search-clear:hover { color: var(--orange); }

  .search-hint {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  #searchCount {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.08em;
    min-height: 18px;
  }
  #searchCount span { color: var(--orange); font-weight: 700; }

  /* === CATEGORY NAV === */
  .cat-nav {
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-nav::-webkit-scrollbar { display: none; }

  /* Edge fade hints: signal there are more category chips to scroll to */
  .cat-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .cat-nav-wrap::before, .cat-nav-wrap::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 101;
  }
  .cat-nav-wrap::before {
    left: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.85), transparent);
  }
  .cat-nav-wrap::after {
    right: 0;
    background: linear-gradient(270deg, rgba(0,0,0,0.85), transparent);
  }

  .cat-nav-inner {
    display: flex;
    gap: 0;
    max-width: 1280px;
    margin: 0 auto;
    overflow-x: auto;
  }

  .cat-nav-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 16px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
  }

  .cat-nav-btn:hover { color: var(--text-dim); }
  .cat-nav-btn.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
  }
  .cat-nav-btn--popular { color: rgba(255,118,0,0.75); }
  .cat-nav-btn--popular:hover { color: var(--orange); }

  /* === MAIN === */
  main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 120px;
    position: relative;
    z-index: 5;
  }

  /* === NO RESULTS === */
  #noResults {
    display: none;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }
  #noResults span { color: var(--orange); font-weight: 700; }

  /* === FEATURED TOOLS === */
  .featured-section { margin-top: 40px; }

  .featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }

  .featured-card {
    position: relative;
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--border-strong);
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition);
    overflow: hidden;
  }
  .featured-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
  }
  .featured-card:hover,
  .featured-card:focus-visible {
    border-color: var(--orange);
    background: var(--surface-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,118,0,0.1);
  }
  .featured-card:hover::before,
  .featured-card:focus-visible::before { transform: scaleX(1); }

  .featured-icon { width: 26px; height: 26px; opacity: 0.85; margin-bottom: 6px; }

  .featured-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.02em;
  }
  .featured-card:hover .featured-name { filter: brightness(1.25); }

  .featured-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.5;
    flex: 1;
  }

  .featured-cta {
    margin-top: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .fc-arrow { transition: transform 0.25s ease; }
  .featured-card:hover .fc-arrow { transform: translateX(4px); }

  /* === CATEGORY SECTION === */
  .cat-section {
    margin-top: 64px;
    opacity: 1;
    transform: translateY(14px);
    transition: transform 0.6s ease;
  }
  .cat-section.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }

  .cat-phase-num {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    text-transform: uppercase;
    min-width: 60px;
    font-weight: 700;
    opacity: 0.85;
  }

  .cat-vert-line {
    width: 1px;
    height: 28px;
    background: rgba(255,118,0,0.3);
    flex-shrink: 0;
  }

  .cat-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
  }

  .cat-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
  }

  .cat-count {
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-weight: 400;
    margin-left: 6px;
  }

  .cat-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,118,0,0.15), transparent);
  }

  /* === TOOL GRID === */
  .tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 8px;
  }

  /* === TOOL CARD === */
  .tool-card {
    background: var(--surface);
    border: 1px solid rgba(255,118,0,0.08);
    border-left: 2px solid rgba(255,118,0,0.4);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
  }
  .tool-card .blade { margin-top: 2px; }
  .tool-card .tool-arrow { margin-top: 2px; }

  /* Shimmer sweep on hover */
  .tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,118,0,0.06), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
  }
  .tool-card:hover::before { left: 150%; }

  /* Left glow bar */
  .tool-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 0;
    background: var(--orange);
    transition: height 0.3s ease;
    box-shadow: 0 0 8px var(--orange);
  }
  .tool-card:hover::after { height: 100%; }

  .tool-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255,118,0,0.3);
    border-left-color: var(--orange);
    transform: translateX(3px);
    box-shadow: -3px 0 20px rgba(255,118,0,0.06), 4px 0 0 rgba(255,118,0,0.04);
  }

  .tool-card.hidden { display: none; }

  /* Search results are relevance-ranked with CSS `order`, and ordering the
     phase sections needs their parent to be a flex container. Scoped to
     .searching so the resting layout stays exactly what it was. */
  main.searching { display: flex; flex-direction: column; }
  main.searching #noResults { order: -1; }

  /* The current top match — the card Enter opens. Colour and an existing
     pseudo-element only, so re-ranking on each keystroke costs no reflow. */
  .tool-card.top-match {
    background: var(--surface-hover);
    border-color: rgba(255,118,0,0.3);
    border-left-color: var(--orange);
  }
  .tool-card.top-match::after { height: 100%; }
  .tool-card.top-match .tool-arrow { opacity: 1; color: var(--orange); }
  .tool-card.top-match .tool-arrow::before { content: '\21B5  '; }

  /* === BLADE ICON === */
  .blade {
    width: 20px; height: 20px;
    flex-shrink: 0;
    opacity: 0.55;
    transition: var(--transition);
  }
  .tool-card:hover .blade {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255,118,0,0.5));
    transform: scale(1.1);
  }

  .tool-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
  }

  .tool-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--orange);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
    letter-spacing: 0.02em;
  }
  .tool-card:hover .tool-name { filter: brightness(1.25); }

  .tool-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: block;
    margin-top: 3px;
    line-height: 1.4;
    letter-spacing: 0.01em;
  }

  .tool-domain {
    font-size: 0.62rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    letter-spacing: 0.03em;
    transition: var(--transition);
    font-style: italic;
    opacity: 0.9;
  }
  .tool-card:hover .tool-domain { color: rgba(255,118,0,0.4); }

  /* === POPULAR BADGE === */
  .tool-badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--orange);
    color: #000;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 9px 3px 10px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
    z-index: 2;
  }

  /* === KEYBOARD FOCUS === */
  a:focus-visible,
  button:focus-visible,
  input:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
  .tool-card:focus-visible {
    background: var(--surface-hover);
    border-left-color: var(--orange);
    transform: translateX(3px);
  }
  .tool-card:focus-visible .tool-arrow,
  .tool-card:focus-visible .blade { opacity: 1; }

  .tool-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
  }
  .status-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #00cc66;
    box-shadow: 0 0 5px #00cc66;
    animation: blink 3s ease-in-out infinite;
  }
  .status-text {
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .tool-arrow {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.55;
    transition: var(--transition);
    transform: translateX(-4px);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .tool-card:hover .tool-arrow,
  .tool-card:focus-visible .tool-arrow { opacity: 1; color: var(--orange); transform: translateX(0); }

  /* === SCROLL-TO-TOP === */
  .scroll-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 42px; height: 42px;
    background: var(--bg);
    border: 1px solid var(--orange);
    color: var(--orange);
    font-family: var(--font);
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
  }
  .scroll-top.visible { opacity: 1; visibility: visible; }
  .scroll-top:hover { background: var(--orange); color: #000; }

  /* === SCROLL CUE === */
  .scroll-cue {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(8,8,8,0.85);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 8px 18px 6px;
    font-family: var(--font);
    color: var(--orange);
    backdrop-filter: blur(6px);
    opacity: 0;
    animation: scrollCueIn 0.6s 2.2s ease forwards;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }
  .scroll-cue.scroll-cue--hidden {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    animation: none;
  }
  .scroll-cue-text {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .scroll-cue-arrow {
    font-size: 0.95rem;
    line-height: 1;
    animation: scrollCueBounce 1.4s ease-in-out infinite;
  }
  @keyframes scrollCueIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  @keyframes scrollCueBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .scroll-cue { animation: none; opacity: 1; }
    .scroll-cue-arrow { animation: none; }
  }
  @media (max-width: 480px) {
    .scroll-cue { bottom: 18px; padding: 7px 14px 5px; }
  }

  /* === FOOTER === */
  footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 48px 20px;
    position: relative;
    z-index: 5;
  }

  .footer-logo {
    font-size: 1.6rem;
    color: var(--orange);
    font-weight: 700;
    letter-spacing: 0.2em;
    opacity: 0.8;
  }

  .footer-line {
    width: 40px; height: 1px;
    background: rgba(255,118,0,0.3);
    margin: 16px auto;
  }

  .footer-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
  .footer-sub a {
    color: rgba(255,118,0,0.6);
    text-decoration: none;
    transition: var(--transition);
  }
  .footer-sub a:hover { color: var(--orange); }

  .footer-legal {
    margin-top: 18px;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
  }
  .footer-legal a:hover { color: var(--orange); }
  .footer-dot { color: var(--text-muted); margin: 0 10px; opacity: 0.8; }

  /* === KNIFE ANIMATION ON LOAD === */
  .intro-knife {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    animation: introFade 0.3s 1.15s forwards;
  }
  @keyframes introFade {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
  }

  .intro-logo {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 0.2em;
    font-family: var(--font);
    animation: introText 0.45s 0.55s both;
  }
  @keyframes introText {
    from { opacity: 0; letter-spacing: 0.5em; }
    to { opacity: 1; letter-spacing: 0.2em; }
  }

  .intro-bar {
    width: 200px; height: 1px;
    background: rgba(255,118,0,0.3);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
  }
  .intro-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--orange);
    animation: introBarFill 0.85s 0.2s ease forwards;
    box-shadow: 0 0 10px var(--orange);
  }
  @keyframes introBarFill {
    to { left: 0; }
  }

  .intro-sub {
    font-size: 0.62rem;
    letter-spacing: 0.35em;
    color: rgba(255,118,0,0.4);
    text-transform: uppercase;
    font-family: var(--font);
    animation: introText 0.45s 0.8s both;
  }

  /* === TYPING ANIMATION FOR SEARCH PLACEHOLDER === */
  @keyframes typingCursor {
    0%, 100% { border-right-color: var(--orange); }
    50% { border-right-color: transparent; }
  }

  /* === PARTICLES === */
  #particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
  }

  /* === RESPONSIVE === */
  @media (max-width: 768px) {
    .site-title { font-size: 2.2rem; }
    .tool-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .logo-wrap { width: 60px; height: 60px; }
    .logo-img { width: 60px; height: 60px; }
  }
  @media (max-width: 480px) {
    header { padding: 40px 16px 36px; }
    .cat-nav-btn { padding: 12px 10px; }
    .tool-card { padding: 12px 13px; }
  }

  /* === ADVERTISER BANNER === */
  .advertiser-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    margin: 32px auto;
    max-width: 100%;
    min-height: 90px;
    text-align: center;
  }

  .advertiser-banner a {
    display: inline-block;
    text-decoration: none;
  }

  .advertiser-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
  }

  @media (max-width: 768px) {
    .advertiser-banner {
      padding: 20px 15px;
      margin: 24px auto;
    }
  }

  @media (max-width: 480px) {
    .advertiser-banner {
      padding: 16px 12px;
      margin: 16px auto;
    }
  }

  /* === PERFORMANCE / MOTION PREFERENCE === */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    body::after { animation: none; }
    .bg-ambient::before, .bg-ambient::after { animation: none; opacity: 0.7; }
    .logo-ring, .logo-ring-2 { animation: none; }
    #particles-canvas { display: none; }
  }
