/* meltpet.com — Melting Hearts, One Pet at a Time */

:root {
    --accent: #e07b5a;            /* Warm terracotta */
    --accent-hover: #c96a4b;
    --accent-soft: rgba(224, 123, 90, 0.08);
    --accent-glow: rgba(224, 123, 90, 0.18);
    --gold: #f59e0b;
    --gold-soft: rgba(245, 158, 11, 0.08);
    --bg-body: #fffdfb;
    --bg-card: #ffffff;
    --bg-input: #f9f7f5;
    --bg-footer: #2c2416;
    --bg-footer-bottom: #1f1a10;
    --text-heading: #1a130e;
    --text-body: #3d322a;
    --text-secondary: #6b5d51;
    --text-muted: #9c8e82;
    --border: #e8e0d6;
    --border-light: #f5efe8;
    --success: #4d8c5e;
    --success-bg: #ecf6ef;
    --error: #d9534f;
    --error-bg: #fdf5f4;
    --radius: 10px;
    --radius-sm: 6px;
    --nav-height: 54px;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

[data-theme="dark"] {
    --accent: #f08b6c;
    --accent-hover: #f5a58b;
    --accent-soft: rgba(240, 139, 108, 0.12);
    --accent-glow: rgba(240, 139, 108, 0.22);
    --bg-body: #1a1410;
    --bg-card: #221c17;
    --bg-input: #1a1410;
    --bg-footer: #14100d;
    --bg-footer-bottom: #0c0a08;
    --text-heading: #f0e8e0;
    --text-body: #d6cec6;
    --text-secondary: #9e9186;
    --text-muted: #7a6f65;
    --border: #3a3028;
    --border-light: #2c2420;
    --success: #5dae72;
    --success-bg: rgba(77, 140, 94, 0.12);
    --error: #f27770;
    --error-bg: rgba(217, 83, 79, 0.12);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ── */
.site-nav {
    position: sticky; top: 0; z-index: 1000;
    min-height: var(--nav-height);
    background: rgba(255, 253, 251, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 6px 24px;
    display: flex; align-items: center; gap: 0 12px;
}
[data-theme="dark"] .site-nav {
    background: rgba(26, 20, 16, 0.94);
}
.nav-brand {
    display: flex; align-items: center; gap: 6px;
    text-decoration: none; color: var(--text-heading);
    font-weight: 800; font-size: 1rem; letter-spacing: -0.4px; white-space: nowrap;
}
.nav-brand span { color: var(--accent); }
.nav-logo { font-size: 1.3rem; }
.nav-breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.nav-breadcrumb a:hover { color: var(--accent); }
.nav-breadcrumb .sep { color: var(--border); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.btn-tools {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border: 1.5px solid var(--accent);
    border-radius: var(--radius-sm); background: var(--accent-soft);
    color: var(--accent); cursor: pointer; font-size: 0.8rem; font-weight: 700;
    text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.btn-tools:hover { background: var(--accent); color: #fff; }

/* ── Nav Links ── */
.nav-links {
    display: flex; align-items: center; gap: 2px;
    flex-shrink: 0; flex-wrap: wrap;
}
.nav-links > a,
.nav-dropdown > span {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 0.8rem; font-weight: 600; color: var(--text-body);
    text-decoration: none; cursor: pointer;
    transition: all 0.15s; white-space: nowrap;
}
.nav-links > a:hover,
.nav-dropdown > span:hover,
.nav-dropdown:hover > span {
    background: var(--accent-soft); color: var(--accent);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 175px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 1100; padding: 6px 0; margin-top: 2px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 8px 14px; font-size: 0.82rem; font-weight: 500;
    color: var(--text-body); text-decoration: none;
    transition: all 0.12s;
}
.nav-dropdown-menu a:hover {
    background: var(--accent-soft); color: var(--accent);
}

/* ── Nav Search ── */
.nav-search {
    width: 140px; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: 18px; font-size: 0.8rem; color: var(--text-heading);
    background: var(--bg-input); font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s, width 0.2s;
    outline: none;
}
.nav-search:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
    width: 190px;
}
.nav-search::placeholder { color: var(--text-muted); }

/* ── Mobile Nav ── */
@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-search { width: 100px; }
    .nav-search:focus { width: 140px; }
}
@media (max-width: 480px) {
    .nav-search { display: none; }
    .nav-inner { padding: 0 12px; }
}
.btn-theme {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-card);
    color: var(--text-body); cursor: pointer; font-size: 1rem;
    transition: all 0.15s; padding: 0;
}
.btn-theme:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── Hero ── */
.hero {
    text-align: center; padding: 64px 24px 48px;
    background: linear-gradient(160deg, #fdf0e8 0%, #fffdfb 40%, #f8f2ec 100%);
    margin-bottom: 0; border-radius: 0 0 var(--radius) var(--radius);
}
[data-theme="dark"] .hero {
    background: linear-gradient(160deg, #2a1f16 0%, #1a1410 40%, #241c14 100%);
}
.hero h1 {
    color: var(--text-heading); font-size: 2.6rem; font-weight: 800;
    letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 14px;
}
.hero h1 span { color: var(--accent); }
.hero p {
    color: var(--text-secondary); font-size: 1.08rem; max-width: 620px;
    margin: 0 auto 20px; line-height: 1.65;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff; padding: 14px 30px;
    border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 700;
    text-decoration: none; transition: background 0.2s, box-shadow 0.2s;
}
.hero-cta:hover { background: var(--accent-hover); box-shadow: 0 6px 22px rgba(224, 123, 90, 0.35); }

/* ── Section headings ── */
.section-heading {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; margin-bottom: 22px; color: var(--text-muted);
    display: flex; align-items: center; gap: 10px;
}
.section-heading::after { content: ''; flex: 1; height: 1px; background: var(--border); opacity: 0.6; }

/* ── Cards ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px; margin-bottom: 40px;
}
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 30px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none; color: var(--text-body); display: flex; flex-direction: column;
}
.card:hover {
    border-color: var(--accent); box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.card h3 { color: var(--text-heading); font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.card h3::before { content: ''; display: inline-block; width: 3px; height: 20px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.card-desc { font-size: 0.88rem; color: var(--text-secondary); flex-grow: 1; line-height: 1.55; margin-bottom: 16px; }
.card-tag {
    display: inline-block; padding: 4px 12px; background: var(--accent-soft);
    color: var(--accent); border-radius: 20px; font-size: 0.72rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    align-self: flex-start;
}

/* ── Article card ── */
.article-card {
    border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 22px;
}
.article-card:last-child { border-bottom: none; margin-bottom: 0; }
.article-date { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.article-card h3 { font-size: 1.1rem; margin: 6px 0 6px; line-height: 1.4; }
.article-card h3 a { color: var(--text-heading); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }
.article-readmore { font-size: 0.82rem; font-weight: 700; color: var(--accent); text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; margin-top: 6px; }

/* ── Calculator / tool layout ── */
.tool-hero {
    text-align: center; padding: 48px 24px 36px;
    background: linear-gradient(160deg, #fdf0e8 0%, #fffdfb 40%, #f8f2ec 100%);
    margin-bottom: 32px; border-radius: 0 0 var(--radius) var(--radius);
}
[data-theme="dark"] .tool-hero {
    background: linear-gradient(160deg, #2a1f16 0%, #1a1410 40%, #241c14 100%);
}
.tool-hero h1 { color: var(--text-heading); font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.tool-hero h1 span { color: var(--accent); }
.tool-hero p { color: var(--text-secondary); font-size: 1rem; max-width: 580px; margin: 0 auto; }

.tool-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px 36px; margin-bottom: 32px;
}
.tool-box h2 { color: var(--text-heading); font-size: 1.15rem; margin-bottom: 18px; font-weight: 700; }
.tool-box label {
    display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px;
}
.tool-box select, .tool-box input {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem; color: var(--text-heading);
    background: var(--bg-input); font-family: var(--font-mono);
    margin-bottom: 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-box select:focus, .tool-box input:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.btn-primary {
    width: 100%; background: var(--accent); color: #fff; border: none;
    padding: 13px; font-size: 0.88rem; font-weight: 700; border-radius: var(--radius-sm);
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.6px;
    transition: background 0.2s, box-shadow 0.2s; margin-top: 4px;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(224, 123, 90, 0.35); }

.result-card {
    margin-top: 18px; padding: 18px 22px;
    background: var(--success-bg); border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; line-height: 1.8;
}
.result-card h4 { color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.result-card p { color: var(--text-body); font-size: 0.93rem; }
.result-card .big { font-size: 1.6rem; font-weight: 800; color: var(--accent); }

/* ── Quiz / Breed Finder ── */
.quiz-step { margin-bottom: 28px; }
.quiz-step h3 { color: var(--text-heading); font-size: 1.05rem; margin-bottom: 12px; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.quiz-option {
    padding: 14px 16px; background: var(--bg-card); border: 2px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; text-align: center;
    font-weight: 600; font-size: 0.88rem; color: var(--text-body);
    transition: all 0.15s;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.quiz-option.selected { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ── Article page ── */
.article-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 36px 40px; margin-bottom: 24px;
}
.article-section h2 { color: var(--text-heading); font-size: 1.2rem; margin-bottom: 14px; font-weight: 700; }
.article-section h3 { color: var(--text-heading); font-size: 1.05rem; margin: 20px 0 8px; }
.article-section p { margin-bottom: 14px; color: var(--text-body); font-size: 0.93rem; line-height: 1.7; }
.article-section ul, .article-section ol { margin-left: 22px; margin-bottom: 14px; line-height: 1.8; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.83rem; margin-bottom: 16px; }
table thead tr { border-bottom: 2px solid var(--accent); }
table thead th { color: var(--accent); text-align: left; padding: 10px 8px; font-weight: 600; text-transform: uppercase; font-size: 0.73rem; letter-spacing: 0.5px; }
table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
table tbody tr:hover { background: var(--bg-input); }
table tbody td { padding: 10px 8px; color: var(--text-body); }

/* ── Social share ── */
.social-share-bar {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 24px; margin: 28px 0;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.share-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px;
    border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
    text-decoration: none; border: 1px solid var(--border); color: var(--text-body);
    background: var(--bg-card); transition: all 0.15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── Newsletter CTA ── */
.newsletter-cta {
    background: linear-gradient(135deg, #fdf0e8 0%, #fef9f5 100%);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 36px 40px; text-align: center; margin: 32px 0;
}
[data-theme="dark"] .newsletter-cta { background: linear-gradient(135deg, #2a2018 0%, #221c16 100%); }
.newsletter-cta h2 { color: var(--text-heading); font-size: 1.3rem; margin-bottom: 8px; }
.newsletter-cta p { color: var(--text-secondary); font-size: 0.93rem; margin-bottom: 18px; }
.newsletter-input {
    display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center;
}
.newsletter-input input {
    flex: 1; min-width: 220px; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem; color: var(--text-heading);
    background: var(--bg-card); font-family: var(--font-sans);
}
.newsletter-input button {
    padding: 12px 24px; background: var(--accent); color: #fff; border: none;
    border-radius: var(--radius-sm); font-weight: 700; font-size: 0.88rem;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    transition: background 0.2s; white-space: nowrap;
}
.newsletter-input button:hover { background: var(--accent-hover); }

/* ── Footer ── */
.site-footer {
    margin-top: 8px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
    background: linear-gradient(135deg, #2c2416 0%, #1f1a10 100%); color: #e8dcc8;
}
.footer-main { padding: 48px 24px 40px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-col { min-width: 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo { font-size: 1.5rem; }
.footer-name { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -0.4px; }
.footer-desc { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.65; max-width: 320px; }
.footer-heading { font-size: 0.78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { background: rgba(0,0,0,0.3); text-align: center; padding: 16px 20px; font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero h1, .tool-hero h1 { font-size: 1.7rem; }
    .card-grid { grid-template-columns: 1fr; }
    .article-section, .tool-box { padding: 24px 22px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .nav-breadcrumb { display: none; }
    .quiz-options { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .hero { padding: 48px 16px 36px; }
    .hero h1 { font-size: 1.4rem; }
    .btn-tools { display: none; }
    .newsletter-input { flex-direction: column; }
    .newsletter-input input, .newsletter-input button { width: 100%; }
}

/* ── Skip link ── */
.skip-link {
    position: absolute; top: -100px; left: 12px; z-index: 10000;
    padding: 10px 18px; background: var(--accent); color: #fff;
    font-weight: 700; font-size: 0.85rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: 3px solid var(--gold); outline-offset: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
