/*
Theme Name: New England Notebook
Theme URI: https://newenglandnotebook.com
Author: New England Notebook
Description: Custom lightweight theme for New England Notebook: travel, history, culture, events and locally made goods across six states, with a landing page for each state.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: new-england-notebook
*/

:root {
	--navy: #011C2E;
	--orange: #B3470F;
	--green: #376A01;
	--blue: #014373;
	--tan: #F4EFE8;
	--tan-line: #D6CABB;
	--line: #D5DCD9;
	--ink: #1B2422;
	--muted: #3F4A47;
	--serif: 'Libre Caslon Text', Georgia, serif;
	--sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }

a { color: var(--navy); transition: color .15s; }
a:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 780px; }
.section { padding-top: 48px; padding-bottom: 32px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Buttons */
.btn, .newsletter-form button, .newsletter-form input[type="submit"] {
	display: inline-block; font: inherit; font-weight: 700; color: #fff; background: var(--orange);
	border: 0; border-radius: 4px; padding: 12px 20px; min-height: 48px; cursor: pointer; text-decoration: none;
	transition: filter .15s, transform .15s, box-shadow .15s;
}
.btn:hover, .newsletter-form button:hover, .newsletter-form input[type="submit"]:hover {
	color: #fff; text-decoration: none; filter: brightness(.88); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(1, 28, 46, .25);
}
.btn-white { background: #fff; color: var(--green); padding: 14px 24px; }
.btn-white:hover { color: var(--green); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 16px; padding-bottom: 16px; }
/* .site-header prefix keeps WooCommerce's ".woocommerce img { height: auto }" from enlarging the logo on shop pages. */
.site-header .site-logo img, .site-header .custom-logo { height: 76px; width: auto; max-width: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-nav li a { display: block; padding: 12px 0; font-weight: 600; text-decoration: none; }
.site-nav li a:hover { text-decoration: underline; }
.site-nav .current-menu-item > a, .site-nav .current-cat > a { color: var(--orange); }
.menu-toggle { display: none; font: inherit; font-weight: 700; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 4px; padding: 10px 16px; min-height: 48px; cursor: pointer; }

/* Section headings */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 3px solid var(--navy); padding-top: 16px; margin-bottom: 28px; }
.section-head h1, .section-head h2 { font-size: 1.6rem; }
.section-head a { font-weight: 600; padding: 10px 0; }
.plain-head { font-size: 1.6rem; margin-bottom: 24px; }
.kicker { display: inline-block; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); text-decoration: none; }
.kicker.light { color: #D5E0EA; }

/* Homepage hero */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.hero-img { flex: 3 1 420px; min-width: 0; aspect-ratio: 3 / 2; background: #DDE4E1; border-radius: 6px; overflow: hidden; display: block; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero-text h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; }
.hero-text p { margin: 0; font-size: 1.1rem; color: var(--muted); }
.read-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); padding: 10px 0; }
.read-link:hover { text-decoration: none; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; }
.card-grid.products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; gap: 12px; border-radius: 8px; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(1, 28, 46, .16); }
.card-img { display: block; aspect-ratio: 4 / 3; background: #DDE4E1; border-radius: 6px; overflow: hidden; }
.card-img.square { aspect-ratio: 1 / 1; background: #EDE6DB; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-size: 1.3rem; line-height: 1.25; }
.card-title a, .product-title a { text-decoration: none; }
.card-excerpt { margin: 0; color: var(--muted); }
.card > .kicker, .card > h3, .card > p, .card > span { padding: 0 4px; }
.card > :last-child { padding-bottom: 8px; }
.product-title { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; }
.product-maker { color: var(--muted); font-size: .9rem; }
.product-price { font-weight: 700; color: var(--orange); }
.affiliate-note { margin: 24px 0 0; font-size: .85rem; color: var(--muted); }

/* Tan band and tiles */
.tan-band { background: var(--tan); padding: 48px 0; }
.state-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.state-tile { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; border-radius: 6px; padding: 24px 12px; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; text-decoration: none; transition: filter .15s, transform .15s, box-shadow .15s; }
.state-tile:hover { color: #fff; text-decoration: none; filter: brightness(1.2); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(1, 28, 46, .3); }
.place-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.place-tile { background: #fff; border: 1px solid var(--tan-line); border-radius: 6px; padding: 20px; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.place-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(1, 28, 46, .18); }

/* Guide band */
.guide-band { background: var(--green); color: #fff; }
.guide-inner { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; padding-top: 56px; padding-bottom: 56px; }
.guide-inner > div { flex: 1 1 420px; min-width: 0; }
.guide-band h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 10px 0; }
.guide-band p { margin: 0; font-size: 1.1rem; color: #EDF3E6; max-width: 36rem; }

/* Newsletter */
.newsletter { max-width: 720px; margin: 0 auto; padding: 64px 24px; text-align: center; }
.newsletter h2 { font-size: 1.8rem; margin-bottom: 12px; }
.newsletter p { color: var(--muted); }
.newsletter-form form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: flex-end; }
.newsletter-form input[type="email"], .newsletter-form input[type="text"], .search-form input[type="search"] { font: inherit; padding: 12px 14px; border: 1px solid #6B7673; border-radius: 4px; min-height: 48px; flex: 1 1 240px; max-width: 360px; }
.admin-note { font-size: .9rem; background: var(--tan); border-radius: 6px; padding: 12px 16px; }

/* State pages */
.state-hero { color: #fff; }
.state-hero-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 56px; }
.state-hero-text { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.state-hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 3.2rem); line-height: 1.1; }
.state-hero p { margin: 0; font-size: 1.1rem; color: #EEF2F5; max-width: 34rem; }
.state-hero-img { flex: 3 1 420px; min-width: 0; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .14); }
.state-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #E3EAF0; }
.crumbs a { color: #fff; }
.crumbs a:hover { color: #fff; }
.subnav { background: var(--tan); border-bottom: 1px solid var(--tan-line); }
.subnav .wrap { display: flex; flex-wrap: wrap; gap: 4px 32px; padding-top: 4px; padding-bottom: 4px; }
.subnav a { font-weight: 600; text-decoration: none; padding: 12px 0; }
.event-list { display: flex; flex-direction: column; }
.event-row { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 18px 12px; border-bottom: 1px solid var(--line); transition: background-color .15s; }
.event-row:hover { background: var(--tan); }
.event-date { flex: 0 0 140px; font-weight: 700; color: var(--orange); }
.event-name { flex: 1 1 300px; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.event-town { flex: 0 1 220px; color: var(--muted); }

/* Articles and pages */
.article { padding-top: 48px; padding-bottom: 56px; }
.article-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.article-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; }
.article-meta, .event-meta { margin: 0; color: var(--muted); font-size: .95rem; }
.event-meta { font-weight: 700; color: var(--orange); }
.article-img { margin: 0 0 32px; }
.article-img img { width: 100%; border-radius: 6px; }
.article-img figcaption, .wp-caption-text, .wp-element-caption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.entry { font-size: 1.125rem; line-height: 1.7; }
.entry h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.entry h3 { font-size: 1.35rem; margin: 1.4em 0 .4em; }
.entry a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry a:hover { color: var(--orange); }
.entry img { border-radius: 6px; }
.entry blockquote { margin: 1.5em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--orange); font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--navy); }
.entry table { display: block; overflow-x: auto; border-collapse: collapse; }
.entry th, .entry td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.archive-intro { color: var(--muted); max-width: 46rem; margin-bottom: 24px; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.search-form { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.search-form .search-submit { font: inherit; font-weight: 700; color: #fff; background: var(--orange); border: 0; border-radius: 4px; padding: 12px 20px; min-height: 48px; cursor: pointer; }

/* WooCommerce touch-ups */
.woocommerce a.button, .woocommerce button.button, .woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--orange); color: #fff; border-radius: 4px; font-weight: 700; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: #8F380B; color: #fff; text-decoration: none; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: var(--orange); font-weight: 700; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--sans); color: var(--navy); }
.woocommerce ul.products li.product .product-maker { display: block; margin: -4px 0 10px; color: var(--muted); font-size: .9rem; }
.woocommerce-products-header__title.page-title { font-size: clamp(2rem, 5vw, 2.6rem); }

/* Footer */
.site-footer { background: var(--navy); color: #fff; margin-top: 0; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-top: 48px; padding-bottom: 24px; }
.footer-brand { flex: 2 1 260px; }
.footer-name { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; }
.footer-brand p { margin: 10px 0 0; color: #C9D6E2; max-width: 22rem; }
.site-footer nav { flex: 1 1 150px; display: flex; flex-direction: column; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #C9D6E2; margin-bottom: 4px; }
.site-footer nav a { color: #fff; padding: 8px 0; text-decoration: none; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
.footer-legal { border-top: 1px solid #2B4257; padding-top: 16px; padding-bottom: 28px; font-size: .85rem; color: #C9D6E2; }

/* Phones and small tablets */
@media (max-width: 860px) {
	.site-header .site-logo img, .site-header .custom-logo { height: 56px; }
	.menu-toggle { display: inline-block; }
	.site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
	.site-nav.is-open { display: flex; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav li a { padding: 14px 0; border-top: 1px solid var(--line); }
	.site-nav .btn { margin-top: 12px; text-align: center; }
	.hero { padding-top: 28px; padding-bottom: 32px; gap: 24px; }
	.section { padding-top: 36px; }
	.event-date { flex-basis: 100%; }
	.guide-inner { padding-top: 40px; padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
