/* ============================================================
   QuickAtWork — Homepage Styles
   QAW-21 redesign: monoline icons, hero search, expanded
   category cards, trust bar, privacy block.
   Fonts: DM Sans (headings) + Inter (body) — no General Sans.
   Colors: our own CSS tokens — no external hex values.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:          #FAF8F5;
  --surface:     #F2EDE6;
  --surface2:    #EBE4DA;
  --border:      #DDD5C8;
  --border-soft: #EDE6DC;
  --text-1:      #1C1917;
  --text-2:      #6B5E52;
  --text-3:      #9C8C80;
  --accent:      #C17F3A;
  --accent-dark: #A36A28;
  --accent-pale: #F5EBD8;
  --white:       #FFFFFF;

  --font-heading: 'DM Sans', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-pill: 999px;
  --radius-card: 18px;
}

*, *::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(--bg);
  color: var(--text-1);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Global focus style */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Top Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  color: var(--text-1);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-pill);
  transition: color 200ms ease, background 200ms ease;
}

.nav-link:hover { color: var(--text-1); background: var(--surface2); }

/* ── Hero ── */
.hero {
  padding: 72px 32px 40px;
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}


.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 7vw, 62px);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ── Hero Search ── */
.hero-search-wrap {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.hero-search-box {
  position: relative;
  margin-bottom: 18px;
}

.hero-search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-3);
  pointer-events: none;
  line-height: 1;
}

.hero-search-input {
  width: 100%;
  padding: 19px 56px 19px 52px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-1);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(27, 26, 23, 0.05);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.hero-search-input::placeholder { color: var(--text-3); }

.hero-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(193, 122, 56, 0.12);
}

.hero-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
  flex-shrink: 0;
}

.hero-search-clear:hover { background: var(--surface2); }
.hero-search-clear[hidden] { display: none; }

/* Popular chips row */
.hero-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-chips-label {
  font-size: 13.5px;
  color: var(--text-3);
  font-weight: 500;
}

.hero-chip {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease;
  cursor: pointer;
}

.hero-chip:hover {
  border-color: var(--accent);
  color: var(--text-1);
}

/* ── Trust / Guarantee bar ── */
.trust-bar {
  padding: 24px 32px 32px;
}

.trust-bar-inner {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 18px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trust-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
}

/* ── Search Results Panel ── */
.search-results-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 32px;
}

.search-results-panel[hidden] { display: none; }

.search-results-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 12px;
}

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

.search-result-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-result-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(27, 26, 23, 0.07);
}

.search-result-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: var(--text-1);
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-cat {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.search-empty {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
}

.search-empty[hidden] { display: none; }

/* ── Categories Section ── */
.categories-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 32px 64px;
}

.categories-header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  gap: 6px;
  text-align: center;
}

.categories-h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.categories-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 520px;
}

.categories-meta {
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 6px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

/* ── Category Card ── */
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 24px;
  text-decoration: none;
  color: var(--text-1);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
}

.cat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 26px rgba(27, 26, 23, 0.07);
}

.cat-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.cat-icon-tile {
  width: 48px;
  height: 48px;
  background: var(--accent-pale);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-1);
  flex-shrink: 0;
}

.cat-card-title-wrap { flex: 1; min-width: 0; }

.cat-card-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.2;
}

.cat-card-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 3px;
}

.cat-card-blurb {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 14px;
}

.cat-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  align-content: flex-start;
  margin-bottom: 16px;
}

.cat-chip {
  background: var(--accent-pale);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  text-decoration: none;
}
a.cat-chip:hover {
  background: var(--accent-pale-hover, #ede0cc);
  border-color: var(--accent);
}

.cat-chip-more {
  font-size: 13px;
  color: var(--text-3);
  padding: 6px 4px;
  align-self: center;
}

.cat-card-footer {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  transition: color 200ms ease;
  text-decoration: none;
}

.cat-card:hover .cat-card-footer { color: var(--accent); }

/* ── Privacy Block ── */
.privacy-block {
  padding: 0 32px 64px;
}

.privacy-block-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--text-1);
  border-radius: 24px;
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.privacy-h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--bg);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.privacy-p {
  font-size: 16px;
  color: rgba(250, 248, 245, 0.72);
  line-height: 1.6;
  max-width: 520px;
}

.privacy-cta {
  display: inline-block;
  padding: 13px 28px;
  background: var(--bg);
  color: var(--text-1);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 200ms ease, color 200ms ease;
}

.privacy-cta:hover {
  background: var(--accent);
  color: var(--white);
}

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  padding: 48px 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto 40px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 200ms ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-brand { margin-bottom: 12px; }

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.footer-brand-name .accent { color: var(--accent); }

.footer-brand-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 16px 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 13px; color: var(--text-3); }

.footer-domain {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

/* ── Preview Mode bar ── */
.footer-preview {
  border-top: 1px dashed #3A3128;
  margin-top: 20px;
  padding: 16px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 12px;
}

.footer-preview-label {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #C17F3A;
  background: rgba(193, 127, 58, .12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(193, 127, 58, .25);
  white-space: nowrap;
}

.footer-preview a {
  color: #8C7B70;
  text-decoration: none;
  font-size: 12px;
  transition: color 150ms;
}

.footer-preview a:hover { color: #C17F3A; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid     { grid-template-columns: repeat(2, 1fr); }
  .privacy-block-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .categories-header-row { flex-direction: column; }
  .categories-meta { padding-top: 0; }
}

@media (max-width: 600px) {
  .nav             { padding: 0 16px; gap: 12px; }
  .nav-links       { display: none; }
  .hero            { padding: 48px 16px 32px; }
  .hero-sub        { font-size: 17px; }
  .trust-bar       { padding: 16px 16px 24px; }
  .trust-bar-inner { padding: 16px 20px; gap: 12px 20px; }
  .search-results-panel { padding: 0 16px 24px; }
  .categories-section { padding: 8px 16px 48px; }
  .categories-grid { grid-template-columns: 1fr; }
  .privacy-block   { padding: 0 16px 48px; }
  .privacy-block-inner { padding: 32px 24px; border-radius: 16px; }
  .privacy-h3      { font-size: 21px; }
  .footer-grid     { grid-template-columns: 1fr 1fr; gap: 24px; }
  footer           { padding: 32px 16px 0; }
}

@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}
