/* ============================================================
   PontoonHQ — Main Stylesheet
   Design tokens → Reset → Typography → Layout → Components
   ============================================================ */

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
    /* Brand colors */
    --teal:        #1D9E75;
    --teal-dark:   #0F6E56;
    --teal-light:  #E1F5EE;
    --teal-mid:    #9FE1CB;
    --amber:       #BA7517;
    --amber-light: #FAEEDA;
    --red:         #A32D2D;
    --red-light:   #FCEBEB;

    /* Neutrals */
    --gray-900:  #1a1a1a;
    --gray-800:  #2d2d2d;
    --gray-700:  #444444;
    --gray-600:  #666666;
    --gray-400:  #999999;
    --gray-200:  #e5e5e5;
    --gray-100:  #f5f5f5;
    --white:     #ffffff;

    /* Typography */
    --font-display: 'Syne', Georgia, serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:   16px;
    --space-lg:   24px;
    --space-xl:   40px;
    --space-2xl:  64px;
    --space-3xl:  96px;

    /* Layout */
    --container:  1080px;
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);

    /* Transitions */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --duration:   150ms;

    /* Header */
    --header-h:   64px;
}

/* ── 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.7;
    color: var(--gray-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--teal-dark); }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: var(--radius-sm); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── ACCESSIBILITY ─────────────────────────────────────────── */
.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;
}
.skip-link {
    position: absolute; top: -40px; left: 0; z-index: 9999;
    background: var(--teal); color: white; padding: 8px 16px;
    transition: top var(--duration);
}
.skip-link:focus { top: 0; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
    font-size: 11px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; color: var(--teal); display: block;
    margin-bottom: 8px;
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-lg { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-lg); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

section { padding: var(--space-2xl) 0; }

/* ── ANNOUNCEMENT BAR ─────────────────────────────────────── */
.announcement-bar {
    background: var(--teal); color: white;
    font-size: 13px; text-align: center;
}
.ann-inner {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 8px 16px;
}
.ann-close {
    background: none; border: none; color: white;
    font-size: 18px; line-height: 1; opacity: 0.7;
}
.ann-close:hover { opacity: 1; }

/* ── SITE HEADER ──────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--white); height: var(--header-h);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow var(--duration) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-lg); height: 100%;
    max-width: var(--container); margin: 0 auto; padding: 0 var(--space-lg);
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo svg { color: var(--gray-900); }

/* Nav */
.primary-nav { flex: 1; }
.nav-list {
    display: flex; align-items: center; gap: 4px;
    justify-content: center;
}
.nav-link {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; color: var(--gray-700);
    white-space: nowrap; transition: background var(--duration), color var(--duration);
}
.nav-link:hover, .nav-link.active { background: var(--gray-100); color: var(--gray-900); }
.nav-arrow { font-size: 10px; opacity: 0.5; }

/* Mega Menu */
.nav-item { position: relative; }
.mega-menu {
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    min-width: 540px; padding: var(--space-lg);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
    transform: translateX(-50%) translateY(-8px);
}
.has-dropdown:hover .mega-menu,
.has-dropdown:focus-within .mega-menu {
    opacity: 1; visibility: visible; pointer-events: all;
    transform: translateX(-50%) translateY(0);
}
.mega-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-lg); }
.mega-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--gray-400); font-weight: 600; margin-bottom: 10px;
}
.mega-col a {
    display: block; font-size: 13px; color: var(--gray-700);
    padding: 4px 0; transition: color var(--duration);
}
.mega-col a:hover { color: var(--teal); }
.mega-cta-col { border-left: 1px solid var(--gray-200); padding-left: var(--space-lg); }
.mega-cta-link {
    display: block; padding: 10px 12px; border-radius: var(--radius-md);
    background: var(--gray-100); margin-bottom: 8px;
    transition: background var(--duration);
}
.mega-cta-link:hover { background: var(--teal-light); }
.mega-cta-link strong { display: block; font-size: 13px; color: var(--gray-900); margin-bottom: 2px; }
.mega-cta-link span { font-size: 12px; color: var(--gray-600); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-search {
    background: none; border: none; padding: 8px; color: var(--gray-600);
    border-radius: var(--radius-md); transition: background var(--duration), color var(--duration);
}
.btn-search:hover { background: var(--gray-100); color: var(--gray-900); }
.header-cta {
    background: var(--teal); color: white; padding: 8px 16px;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
    transition: background var(--duration);
}
.header-cta:hover { background: var(--teal-dark); color: white; }
.btn-mobile-menu {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; padding: 8px; cursor: pointer;
}
.hamburger-line {
    display: block; width: 22px; height: 2px;
    background: var(--gray-800); border-radius: 1px;
    transition: transform var(--duration) var(--ease);
}

/* ── SEARCH OVERLAY ───────────────────────────────────────── */
.search-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px; opacity: 0; visibility: hidden;
    transition: opacity var(--duration) var(--ease);
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-inner {
    position: relative; width: 100%; max-width: 640px; margin: 0 16px;
    background: var(--white); border-radius: var(--radius-xl);
    overflow: hidden; box-shadow: var(--shadow-lg);
    display: flex;
}
.search-inner input {
    flex: 1; border: none; outline: none;
    padding: 18px 20px; font-size: 18px; color: var(--gray-900);
    background: transparent;
}
.search-inner button[type=submit] {
    background: var(--teal); color: white; border: none;
    padding: 18px 24px; font-size: 20px;
    transition: background var(--duration);
}
.search-inner button[type=submit]:hover { background: var(--teal-dark); }
.search-close {
    position: absolute; top: -40px; right: 0;
    background: none; border: none; color: white;
    font-size: 28px; padding: 8px;
}

/* ── FLASH MESSAGES ───────────────────────────────────────── */
.flash-message {
    padding: 12px 0; font-size: 14px; font-weight: 500;
}
.flash-message .container { display: flex; align-items: center; justify-content: space-between; }
.flash-success { background: var(--teal-light); color: var(--teal-dark); }
.flash-error { background: var(--red-light); color: var(--red); }
.flash-message button { background: none; border: none; font-size: 18px; opacity: 0.6; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 22px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600; line-height: 1;
    border: 2px solid transparent; transition: all var(--duration) var(--ease);
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: white; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: white; }
.btn-secondary { background: white; color: var(--gray-800); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: white; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* Affiliate button */
.btn-affiliate {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--amber); color: white;
    padding: 10px 18px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 600;
    transition: background var(--duration);
}
.btn-affiliate:hover { background: #9a6012; color: white; }
.affiliate-note { font-size: 11px; color: var(--gray-400); margin-top: 6px; }
.affiliate-link { border-bottom: 1px dashed var(--teal); }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); padding: var(--space-lg);
    transition: border-color var(--duration), box-shadow var(--duration);
}
.card:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.card-featured { border-color: var(--teal); border-width: 2px; }

/* Offer card */
.offer-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); padding: var(--space-lg);
}
.offer-badge {
    display: inline-block; background: var(--teal); color: white;
    font-size: 11px; font-weight: 600; padding: 3px 8px;
    border-radius: var(--radius-sm); margin-bottom: 10px;
}
.offer-card .oc-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.offer-card .oc-brand { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.offer-card .oc-price { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 12px 0; }
.offer-card-compact {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}
.offer-card-compact .oc-right { margin-left: auto; text-align: right; }
.offer-card-compact .oc-price { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

/* ── STAR RATINGS ─────────────────────────────────────────── */
.star-rating { display: inline-flex; align-items: center; gap: 2px; }
.star { font-size: 14px; }
.star.full { color: var(--amber); }
.star.half { color: var(--amber); opacity: 0.6; }
.star.empty { color: var(--gray-200); }
.rating-num { font-size: 13px; font-weight: 600; margin-left: 4px; color: var(--gray-600); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-600); margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    font-size: 14px; color: var(--gray-900); background: var(--white);
    transition: border-color var(--duration);
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(29,158,117,0.1); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--gray-400); }
.breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--teal); }
.bc-sep { color: var(--gray-300); margin: 0 2px; }

/* ── BADGES & TAGS ────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination ul { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: var(--space-xl) 0; }
.pagination a {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-md);
    border: 1px solid var(--gray-200); font-size: 13px; font-weight: 500;
    color: var(--gray-700); transition: all var(--duration);
}
.pagination a:hover, .pagination a.active { background: var(--teal); color: white; border-color: var(--teal); }

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); padding: 10px 12px; border-bottom: 2px solid var(--gray-200); text-align: left; }
td { padding: 12px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-100); }

/* ── SCORE BARS ───────────────────────────────────────────── */
.score-bar { height: 5px; background: var(--gray-200); border-radius: 3px; margin-top: 4px; }
.score-fill { height: 5px; border-radius: 3px; }
.score-fill.high { background: var(--teal); }
.score-fill.mid { background: var(--amber); }
.score-fill.low { background: var(--red); }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: var(--gray-900); color: var(--gray-200); margin-top: var(--space-3xl); }

.footer-newsletter {
    background: var(--gray-800); padding: var(--space-xl) 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl); flex-wrap: wrap; }
.newsletter-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: white; margin-bottom: 4px; }
.newsletter-sub { font-size: 14px; color: var(--gray-400); }
.newsletter-form { display: flex; gap: 8px; flex-shrink: 0; }
.newsletter-form input {
    padding: 10px 16px; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08); color: white; font-size: 14px; min-width: 240px;
}
.newsletter-form input::placeholder { color: var(--gray-400); }
.newsletter-form button {
    background: var(--teal); color: white; border: none;
    padding: 10px 20px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600; transition: background var(--duration);
}
.newsletter-form button:hover { background: var(--teal-dark); }

.footer-main { padding: var(--space-2xl) 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-2xl); }
.footer-tagline { font-size: 13px; color: var(--gray-400); margin: 12px 0; line-height: 1.5; }
.footer-trust { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.trust-badge { font-size: 12px; color: var(--teal-mid); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: var(--gray-400); transition: color var(--duration); }
.footer-social a:hover { color: white; }

.footer-col-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: white; margin-bottom: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: var(--gray-400); transition: color var(--duration); }
.footer-links a:hover { color: white; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: var(--space-lg) 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.copyright { font-size: 12px; color: var(--gray-500); }
.affiliate-disclosure-note { font-size: 12px; color: var(--gray-500); max-width: 540px; text-align: right; }
.affiliate-disclosure-note a { color: var(--gray-400); text-decoration: underline; }

/* ── TOOL PAGES ───────────────────────────────────────────── */
.tool-header {
    background: var(--gray-100); border-bottom: 1px solid var(--gray-200);
    padding: var(--space-xl) 0;
}
.tool-header h1 { margin-bottom: 8px; }
.tool-header p { font-size: 16px; color: var(--gray-600); max-width: 580px; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    background: var(--white);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: center; }
.hero-eyebrow { margin-bottom: 12px; }
.hero-title { margin-bottom: 16px; }
.hero-title em { font-style: normal; color: var(--teal); }
.hero-desc { font-size: 17px; color: var(--gray-600); line-height: 1.65; margin-bottom: 28px; max-width: 480px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
    .hero-inner { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }

    .primary-nav { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: var(--white); padding: var(--space-lg); overflow-y: auto; z-index: 99; border-top: 1px solid var(--gray-200); }
    .primary-nav.open { display: block; }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
    .nav-link { width: 100%; padding: 14px 0; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--gray-100); }
    .mega-menu { position: static; transform: none; opacity: 1; visibility: visible; min-width: auto; box-shadow: none; border: none; padding: 0 0 0 16px; border-radius: 0; display: none; }
    .has-dropdown.open .mega-menu { display: block; }
    .mega-inner { grid-template-columns: 1fr; gap: var(--space-md); }
    .mega-cta-col { border-left: none; padding-left: 0; }
    .btn-mobile-menu { display: flex; }
    .header-cta { display: none; }
    .mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 98; display: none; }
    .mobile-overlay.open { display: block; }

    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .newsletter-inner { flex-direction: column; }
    .newsletter-form { width: 100%; flex-direction: column; }
    .newsletter-form input { min-width: auto; width: 100%; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .affiliate-disclosure-note { text-align: center; }
    .hero-desc { font-size: 15px; }
}

@media (max-width: 480px) {
    .container { padding: 0 var(--space-md); }
    .grid-4 { grid-template-columns: 1fr; }
}

/* ── PRINT ────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .breadcrumb, .btn, .newsletter-form { display: none; }
    a[href]::after { content: ' (' attr(href) ')'; font-size: 11px; }
}
