/* True North Guide — A guide to Canada's provinces, territories and cities */
/* Refreshed Canadian theme: maple red, balsam green, lake blue, gold on warm paper */

*,*::before,*::after { box-sizing: border-box; }
html,body,h1,h2,h3,h4,h5,h6,p,ul,ol,figure,blockquote,dl,dd { margin: 0; padding: 0; }

:root {
    /* Core palette */
    --maple-red: #d52b1e;
    --maple-deep: #a71d13;
    --balsam: #1d4d36;
    --balsam-deep: #133224;
    --lake-blue: #15467d;
    --lake-deep: #0d3057;
    --gold: #c9a25b;
    --gold-soft: #e8d6a8;
    --snow: #ffffff;
    --paper: #f7f4ee;
    --paper-warm: #efe9dc;
    --ink: #1b1d1c;
    --ink-soft: #4a4f4d;
    --rule: #e3ddd0;
    --rule-soft: #ede7d8;

    /* Typography */
    --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-serif: 'Source Serif 4', 'Source Serif Pro', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* Layout */
    --content-max: 1180px;
    --reading-max: 760px;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(20,30,30,0.06);
    --shadow-md: 0 6px 18px rgba(20,30,30,0.08);
    --shadow-lg: 0 14px 36px rgba(20,30,30,0.12);
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* Flag accent strip — sits at the very top of every page */
.flag-bar {
    height: 6px;
    width: 100%;
    background: linear-gradient(to right,
        var(--maple-red) 0 25%,
        var(--snow) 25% 75%,
        var(--maple-red) 75% 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Header */
.site-header {
    background: var(--snow);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.55rem;
    color: var(--maple-deep);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-logo:hover { color: var(--maple-red); }

.logo-leaf {
    color: var(--maple-red);
    font-size: 1.75rem;
    line-height: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.1rem;
    border-bottom: 2px solid transparent;
    transition: color 0.18s, border-color 0.18s;
}

.main-nav a:hover { color: var(--maple-red); }
.main-nav a.active {
    color: var(--maple-deep);
    border-bottom-color: var(--maple-red);
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--paper-warm);
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    color: var(--ink-soft);
    border-bottom: 1px solid var(--rule);
}

.breadcrumbs-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

.breadcrumbs a {
    color: var(--lake-blue);
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

/* Hero — text-only (homepage uses .page-hero photographic) */
.hero {
    background: linear-gradient(135deg, var(--balsam) 0%, var(--lake-deep) 100%);
    color: var(--snow);
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.07), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(201,162,91,0.16), transparent 40%);
    pointer-events: none;
}

.hero h1 {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: var(--snow);
}

.hero p {
    position: relative;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 720px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.94);
}

.hero-cta {
    position: relative;
    display: inline-block;
    background: var(--maple-red);
    color: var(--snow);
    padding: 0.85rem 1.9rem;
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(213,43,30,0.35);
}

.hero-cta:hover {
    background: var(--maple-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(167,29,19,0.4);
}

/* Page hero — photographic, used at top of province / city / topic pages */
.page-hero {
    position: relative;
    height: clamp(280px, 42vw, 460px);
    overflow: hidden;
    color: var(--snow);
    background: var(--balsam-deep);
}

.page-hero .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,15,15,0.20) 0%, rgba(10,15,15,0.55) 70%, rgba(10,15,15,0.78) 100%);
    z-index: 2;
}

.page-hero .hero-content {
    position: relative;
    z-index: 3;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2rem;
}

.page-hero .kicker {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 0.5rem;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--snow);
    text-shadow: 0 2px 14px rgba(0,0,0,0.35);
    max-width: 900px;
}

.page-hero .hero-tagline {
    margin-top: 0.6rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.92);
    max-width: 700px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* Main content frame */
main {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) 1.5rem;
}

article {
    max-width: var(--reading-max);
    margin: 0 auto;
}

article.wide { max-width: 100%; }

.intro-section {
    background: var(--snow);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--maple-red);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.005em;
}

article h1 {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    margin-bottom: 1rem;
}

article h2 {
    font-size: clamp(1.55rem, 3vw, 2rem);
    margin: 2.6rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--maple-red);
    display: inline-block;
    color: var(--balsam-deep);
}

article h3 {
    font-size: 1.4rem;
    margin: 1.8rem 0 0.75rem;
    color: var(--lake-blue);
}

article h4 {
    font-size: 1.12rem;
    margin: 1.3rem 0 0.4rem;
    color: var(--balsam);
    font-family: var(--font-sans);
}

p {
    margin-bottom: 1.05rem;
}

article p { font-family: var(--font-serif); }

article p > strong { color: var(--ink); }

/* Lead paragraph — first paragraph after page hero */
.lead {
    font-size: 1.18rem;
    line-height: 1.65;
    color: var(--ink-soft);
    border-left: 3px solid var(--gold);
    padding-left: 1rem;
    margin-bottom: 1.6rem;
    font-style: italic;
    font-family: var(--font-serif);
}

/* Province / city directory grid */
.province-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
    margin: 2rem 0;
}

.province-card {
    background: var(--snow);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.6rem 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s, box-shadow 0.22s;
    border-top: 4px solid var(--maple-red);
    display: flex;
    flex-direction: column;
}

.province-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.province-card h3 {
    margin: 0 0 0.4rem;
    color: var(--balsam-deep);
    font-size: 1.25rem;
}

.province-card .capital {
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.7rem;
}

.province-card p {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

.province-card a {
    color: var(--lake-blue);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    font-family: var(--font-sans);
    font-size: 0.92rem;
}

.province-card a:hover {
    color: var(--maple-red);
    text-decoration: underline;
}

/* City quickfacts (definition list) */
.city-quickfacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem 1.5rem;
    background: var(--paper-warm);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--gold);
    margin: 1.5rem 0;
    font-family: var(--font-sans);
}

.city-quickfacts dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    font-weight: 600;
}

.city-quickfacts dd {
    font-size: 1rem;
    color: var(--ink);
    font-weight: 500;
    margin-top: 0.15rem;
}

/* Photo and figure styles */
figure.photo {
    margin: 1.8rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--snow);
}

figure.photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

figure.photo figcaption {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--ink-soft);
    padding: 0.7rem 1rem 0.85rem;
    background: var(--snow);
    border-top: 1px solid var(--rule);
}

.photo-hero {
    margin: 0 0 2rem;
    border-radius: 0;
    box-shadow: none;
}

.photo-hero img {
    width: 100%;
    height: clamp(240px, 35vw, 420px);
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.8rem 0;
}

.photo-grid figure.photo { margin: 0; }

.photo-grid figure.photo img {
    height: 220px;
    object-fit: cover;
}

/* FAQ */
.faq-item {
    background: var(--snow);
    border-left: 4px solid var(--maple-red);
    padding: 1.4rem 1.7rem;
    margin-bottom: 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.18rem;
    color: var(--balsam-deep);
    font-family: var(--font-display);
}

.faq-item p:last-child { margin-bottom: 0; }

/* City section — used inside province pages */
.city-section {
    background: var(--snow);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: var(--radius-lg);
    margin: 2.5rem 0;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--lake-blue);
    scroll-margin-top: 90px;
}

.city-section > h2 {
    margin-top: 0;
    color: var(--maple-deep);
    border-color: var(--gold);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.city-section h3 {
    color: var(--balsam);
    margin-top: 1.7rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--rule);
}

.city-section h3:first-of-type {
    border-top: none;
    padding-top: 0;
}

/* Fact box */
.fact-box {
    background: var(--paper-warm);
    border-left: 4px solid var(--gold);
    padding: 1.2rem 1.4rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-sans);
    font-size: 0.97rem;
}

.fact-box strong { color: var(--balsam-deep); }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--snow);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-sans);
    font-size: 0.96rem;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--rule);
}

th {
    background: var(--balsam-deep);
    color: var(--snow);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--paper); }

/* TOC */
.toc {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.8rem 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.toc h4 {
    margin-bottom: 0.6rem;
    color: var(--balsam-deep);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.toc ul {
    list-style: none;
    margin: 0;
    columns: 2;
    column-gap: 1.5rem;
}

.toc li {
    margin: 0 0 0.35rem;
    break-inside: avoid;
}

.toc a {
    color: var(--lake-blue);
    text-decoration: none;
}

.toc a:hover { color: var(--maple-red); text-decoration: underline; }

/* Lists */
main ul, main ol { margin: 0 0 1.2rem 1.4rem; }
main li { margin-bottom: 0.45rem; }

/* Inline links inside main */
main a {
    color: var(--lake-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

main a:hover { color: var(--maple-red); }

/* Divider with maple leaf */
.divider-leaf {
    text-align: center;
    margin: 2.5rem 0;
    color: var(--maple-red);
    font-size: 1.4rem;
    letter-spacing: 1rem;
    user-select: none;
}

/* Contact form */
.contact-form {
    background: var(--snow);
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--maple-red);
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
}

.contact-form label {
    display: block;
    margin: 0.85rem 0 0.3rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--ink);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 1rem;
    background: var(--paper);
    color: var(--ink);
}

.contact-form button {
    margin-top: 1rem;
    background: var(--maple-red);
    color: var(--snow);
    border: 0;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.18s;
}

.contact-form button:hover { background: var(--maple-deep); }

/* Footer */
.site-footer {
    background: var(--balsam-deep);
    color: var(--snow);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
    border-top: 4px solid var(--maple-red);
}

.footer-container {
    max-width: var(--content-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: var(--snow);
    margin-bottom: 0.85rem;
    font-size: 1.05rem;
    font-family: var(--font-display);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
    color: #c9d1d9;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: var(--font-sans);
}

.footer-col a:hover {
    color: var(--gold-soft);
    text-decoration: underline;
}

.footer-bottom {
    max-width: var(--content-max);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    font-size: 0.88rem;
    color: #9aa4ad;
    font-family: var(--font-sans);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }
    .main-nav ul { gap: 0.9rem; }
    .toc ul { columns: 1; }
    .city-quickfacts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .city-quickfacts { grid-template-columns: 1fr; }
    article h1 { font-size: 1.7rem; }
    article h2 { font-size: 1.35rem; }
}

/* Print */
@media print {
    .site-header, .site-footer, .hero-cta, .flag-bar, .breadcrumbs { display: none; }
    body { background: white; color: black; }
    article { max-width: 100%; }
    a { color: black; text-decoration: underline; }
}
