/* =====================================================================
   DEROVAS — Design System
   Theme: "Job Ticket / Blueprint" — trade & contractor marketplace
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    /* Color tokens */
    --ink-900: #14213D;
    --ink-700: #1D3461;
    --ink-500: #345080;
    --amber-500: #F4A100;
    --amber-600: #D98C00;
    --paper: #FAFAF7;
    --paper-dim: #F1EFE8;
    --slate-600: #5B6472;
    --slate-400: #8A93A3;
    --line: #E2E1D8;
    --green-600: #2E7D5B;
    --red-600: #C13B3B;
    --white: #FFFFFF;

    /* Type */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Layout */
    --container: 1200px;
    --radius: 4px;
    --shadow-card: 0 1px 2px rgba(20,33,61,0.06), 0 4px 16px rgba(20,33,61,0.06);
    --shadow-lift: 0 8px 28px rgba(20,33,61,0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }

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

/* ---------- Eyebrow / Mono labels ---------- */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--amber-600);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.eyebrow::before {
    content: "";
    width: 18px; height: 2px;
    background: var(--amber-500);
    display: inline-block;
}

/* ---------- Tape-measure tick divider (signature element) ---------- */
.tick-divider {
    display: flex;
    align-items: flex-end;
    height: 14px;
    gap: 6px;
    margin: 28px 0;
    overflow: hidden;
}
.tick-divider span {
    width: 1px;
    background: var(--line);
    height: 6px;
    flex-shrink: 0;
}
.tick-divider span:nth-child(5n) { height: 14px; background: var(--slate-400); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--amber-500); color: var(--ink-900); }
.btn-primary:hover { background: var(--amber-600); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-dark { background: var(--ink-900); color: var(--paper); }
.btn-dark:hover { background: var(--ink-700); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: inherit; }
.btn-outline:hover { border-color: var(--amber-500); color: var(--amber-500); }
.btn-ghost { background: transparent; color: var(--ink-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-900); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--ink-900);
    color: var(--paper);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 3px solid var(--amber-500);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }
.logo { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--paper); display: flex; align-items: center; gap: 4px; }
.logo .dot { color: var(--amber-500); }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { font-size: 14.5px; font-weight: 500; color: rgba(250,250,247,.82); transition: color .15s; }
.main-nav a:hover { color: var(--amber-500); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions a.login-link { font-size: 14.5px; font-weight: 500; color: rgba(250,250,247,.82); }
.nav-toggle { display: none; background: none; border: none; color: var(--paper); font-size: 24px; }

/* ---------- Hero ---------- */
.hero {
    background: var(--ink-900);
    background-image:
        linear-gradient(180deg, rgba(20,33,61,.97), rgba(20,33,61,.93)),
        repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 40px);
    color: var(--paper);
    padding: 88px 24px 96px;
    position: relative;
}
.hero-content { max-width: 780px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: 48px; margin-bottom: 18px; }
.hero h1 .accent { color: var(--amber-500); }
.hero p.lead { font-size: 18px; color: rgba(250,250,247,.75); max-width: 560px; margin: 0 auto 36px; }

.search-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    gap: 8px;
    box-shadow: var(--shadow-lift);
    max-width: 700px;
    margin: 0 auto;
}
.search-card select, .search-card input {
    border: none;
    background: var(--paper-dim);
    padding: 13px 14px;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink-900);
    border-radius: 3px;
    flex: 1;
}
.search-card button { flex-shrink: 0; }

.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats .stat-num { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--amber-500); }
.hero-stats .stat-label { font-size: 13px; color: rgba(250,250,247,.6); margin-top: 4px; }

/* ---------- Section ---------- */
.section { padding: 76px 24px; }
.section-alt { background: var(--paper-dim); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: 32px; }
.section-head p { color: var(--slate-600); font-size: 16px; }
.section-head.align-left { text-align: left; margin: 0 0 40px; }

/* ---------- Category grid ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.cat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex; align-items: center; gap: 14px;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--amber-500); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.cat-card .icon {
    width: 44px; height: 44px; flex-shrink: 0;
    background: var(--ink-900); border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    color: var(--amber-500);
}
.cat-card .icon svg { width: 22px; height: 22px; }
.cat-card .name { font-weight: 600; font-size: 15px; }
.cat-card .count { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { position: relative; padding-top: 8px; }
.step .step-code { font-family: var(--font-mono); font-size: 13px; color: var(--amber-600); font-weight: 600; margin-bottom: 10px; display: block; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--slate-600); font-size: 14.5px; }

/* ---------- Company / listing cards ---------- */
.company-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.company-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.company-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.company-card .cc-cover { height: 130px; background: linear-gradient(135deg, var(--ink-700), var(--ink-900)); position: relative; }
.company-card .cc-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--amber-500); color: var(--ink-900);
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    padding: 4px 9px; border-radius: 3px;
    display: flex; align-items: center; gap: 5px;
}
.company-card .cc-body { padding: 18px 20px 20px; }
.company-card .cc-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.company-card .cc-cat { font-size: 13px; color: var(--slate-600); margin-bottom: 10px; }
.company-card .cc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 14px; }
.rating { display: flex; align-items: center; gap: 5px; color: var(--ink-900); font-weight: 600; }
.rating .stars { color: var(--amber-500); }
.rating .count { color: var(--slate-400); font-weight: 400; }
.cc-location { color: var(--slate-600); display: flex; align-items: center; gap: 4px; }

/* ---------- Cities ---------- */
.city-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.city-chip {
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; text-align: center; background: var(--white);
    transition: border-color .15s, background .15s;
}
.city-chip:hover { border-color: var(--ink-900); background: var(--paper-dim); }
.city-chip .city-name { font-weight: 600; font-size: 14.5px; }
.city-chip .city-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate-400); margin-top: 2px; }

/* ---------- CTA banner ---------- */
.cta-banner {
    background: var(--ink-900);
    border-radius: 6px;
    padding: 56px 48px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    color: var(--paper);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(244,161,0,.18), transparent 70%);
}
.cta-banner h2 { font-size: 28px; margin-bottom: 8px; }
.cta-banner p { color: rgba(250,250,247,.7); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: rgba(250,250,247,.7); padding: 64px 24px 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-col h4 { color: var(--paper); font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; font-size: 14px; }
.footer-col ul li a:hover { color: var(--amber-500); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 12px; }
.footer-brand p { max-width: 280px; font-size: 14px; color: rgba(250,250,247,.6); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--slate-600); padding: 18px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--amber-600); }
.breadcrumb .sep { color: var(--slate-400); }

/* ---------- Page header (category/city/search) ---------- */
.page-head { background: var(--ink-900); color: var(--paper); padding: 40px 0 48px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: rgba(250,250,247,.65); font-size: 15px; }
.page-head .breadcrumb { color: rgba(250,250,247,.55); }
.page-head .breadcrumb a { color: rgba(250,250,247,.75); }

/* ---------- Listing layout ---------- */
.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 40px 0 80px; }
.filter-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); margin-bottom: 16px; }
.filter-box h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.filter-box label { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; color: var(--slate-600); }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 14px; color: var(--slate-600); }
.results-list { display: flex; flex-direction: column; gap: 16px; }
.listing-row {
    display: flex; gap: 20px; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.listing-row .lr-thumb { width: 160px; height: 120px; border-radius: 3px; background: linear-gradient(135deg, var(--ink-700), var(--ink-900)); flex-shrink: 0; }
.listing-row .lr-body { flex: 1; }
.listing-row .lr-top { display: flex; justify-content: space-between; align-items: flex-start; }
.badge-verified { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; background: rgba(46,125,91,.1); color: var(--green-600); padding: 3px 8px; border-radius: 3px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; font-size: 13px; font-family: var(--font-mono); }
.pagination .active { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }

/* ---------- Company profile ---------- */
.profile-cover { height: 260px; background: linear-gradient(135deg, var(--ink-700), var(--ink-900)); position: relative; }
.profile-header { display: flex; gap: 24px; margin-top: -60px; align-items: flex-end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-logo { width: 108px; height: 108px; background: var(--white); border: 4px solid var(--white); border-radius: 6px; box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--ink-900); flex-shrink: 0; }
.profile-info { flex: 1; padding-bottom: 6px; }
.profile-info h1 { font-size: 26px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.profile-info .p-meta { display: flex; gap: 18px; font-size: 14px; color: var(--slate-600); flex-wrap: wrap; }
.profile-body { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 40px 0 80px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs a { padding: 10px 2px; font-size: 14.5px; font-weight: 600; color: var(--slate-600); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--ink-900); border-color: var(--amber-500); }
.sidebar-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--white); margin-bottom: 20px; }
.sidebar-card h4 { font-size: 14px; margin-bottom: 14px; }
.contact-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 12px; color: var(--slate-600); }
.hours-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.review-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border: none; }
.review-user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.avatar-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--ink-700); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; font-family: var(--font-display); }

/* ---------- Static content pages ---------- */
.static-page { padding: 56px 0 80px; max-width: 820px; margin: 0 auto; }
.static-page h1 { font-size: 34px; margin-bottom: 8px; }
.static-page .updated { font-family: var(--font-mono); font-size: 12.5px; color: var(--slate-400); margin-bottom: 32px; }
.static-page h2 { font-size: 21px; margin-top: 36px; }
.static-page p { color: var(--slate-600); font-size: 15.5px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary { font-weight: 600; font-size: 15.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--amber-600); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 26px; background: var(--white); }
.price-card.featured { border-color: var(--amber-500); box-shadow: var(--shadow-lift); position: relative; }
.price-card.featured::before { content: "MOST POPULAR"; position: absolute; top: -12px; left: 26px; background: var(--amber-500); color: var(--ink-900); font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 3px; }
.price-card .plan-name { font-family: var(--font-mono); font-size: 13px; color: var(--amber-600); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.price-card .plan-price { font-family: var(--font-display); font-size: 40px; font-weight: 700; margin: 10px 0 4px; }
.price-card .plan-price span { font-size: 15px; font-weight: 500; color: var(--slate-400); }
.price-card ul { margin: 24px 0; }
.price-card li { font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--slate-600); display: flex; gap: 8px; }

/* ---------- Contact form ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 56px 0 80px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px;
    font-family: var(--font-body); font-size: 14.5px; background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .company-grid { grid-template-columns: repeat(2, 1fr); }
    .city-grid { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .listing-layout, .profile-body, .contact-layout { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
    .main-nav, .header-actions .login-link { display: none; }
    .nav-toggle { display: block; }
    .hero h1 { font-size: 32px; }
    .search-card { flex-direction: column; }
    .cat-grid, .company-grid { grid-template-columns: 1fr; }
    .city-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-banner { flex-direction: column; text-align: center; }
    .pricing-grid { grid-template-columns: 1fr; }
}
