/*
Theme Name: Line & Roots
Description: Lean custom theme for Line and Roots Photography. No page builder, no plugin dependencies.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: lineandroots
*/

/* ---------- Fonts (self-hosted, latin subset, variable) ---------- */
@font-face { font-family: "Quicksand"; src: url(assets/fonts/quicksand.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(assets/fonts/playfair.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(assets/fonts/playfair-italic.woff2) format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url(assets/fonts/cinzel.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	--ink: #34312e;
	--text: #55514d;
	--muted: #8a857f;
	--sage: #a9a974;          /* logo colour */
	--sage-deep: #6c6e42;     /* accessible on white */
	--sage-tint: #eeeee2;
	--cream: #f8f6f1;
	--line: #e7e3db;
	--white: #fff;

	--serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--sans: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Cinzel", var(--serif);

	--wrap: 1200px;
	--content: 820px;
	--narrow: 680px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(56px, 9vw, 120px);
	--radius: 2px;
	--header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	background: var(--white);
	color: var(--text);
	font: 400 17px/1.75 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--sage-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
p, ul, ol, figure, blockquote, table { margin: 0 0 1.25em; }
em { font-style: italic; }
strong, b { font-weight: 600; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--content { max-width: calc(var(--content) + var(--gutter) * 2); }
.wrap--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }

.eyebrow {
	display: block;
	font: 600 .74rem/1.4 var(--sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--sage-deep);
	margin: 0 0 .9rem;
}
.eyebrow--light { color: rgba(255,255,255,.9); }

/* ---------- Buttons ---------- */
.btn, .entry a[class*="button"] {
	display: inline-block;
	padding: 15px 30px;
	background: var(--sage-deep);
	color: #fff;
	border: 1px solid var(--sage-deep);
	border-radius: var(--radius);
	font: 600 .78rem/1 var(--sans);
	letter-spacing: .18em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .2s, color .2s, border-color .2s;
	cursor: pointer;
}
.btn:hover, .entry a[class*="button"]:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--small { padding: 11px 20px; font-size: .72rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--sage-tint); border-color: var(--sage-tint); color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn--ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.link-arrow {
	font: 600 .76rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
	color: var(--sage-deep); text-decoration: none;
}
.link-arrow::after { content: " →"; transition: margin .2s; }
a:hover .link-arrow::after, .link-arrow:hover::after { margin-left: 4px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: #fff;
	border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; color: var(--sage); }
.brand__name { font: 400 1.55rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.brand__tag { font: 600 .56rem/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; margin-top: 7px; padding-left: .5em; }
.brand:hover { color: var(--sage-deep); }

.nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav__item { position: relative; }
.nav__item > a, .nav__toggle {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 14px;
	font: 600 .76rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
	color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav__item > a:hover, .nav__toggle:hover, .nav__item.is-active > a, .nav__item.is-active > .nav__toggle { color: var(--sage-deep); }
.nav__item--cta { margin-left: 10px; }
.nav__item--cta > a.btn { color: #fff; background: var(--sage-deep); padding: 12px 20px; }
.nav__item--cta > a.btn:hover { background: var(--ink); }
.nav__sub {
	list-style: none; margin: 0; padding: 10px 0;
	position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px);
	min-width: 260px; background: #fff; border: 1px solid var(--line);
	box-shadow: 0 18px 40px -20px rgba(52,49,46,.35);
	opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__sub a { display: block; padding: 9px 22px; font-size: .92rem; color: var(--text); text-decoration: none; }
.nav__sub a:hover, .nav__sub a[aria-current] { color: var(--sage-deep); background: var(--cream); }
@media (hover: hover) and (min-width: 1001px) {
	.has-sub:hover .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.has-sub.is-open .nav__sub, .has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
	position: absolute; left: 11px; width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .2s; content: "";
}
.menu-btn__bars { top: 21px; }
.menu-btn__bars::before { top: -7px; left: 0; }
.menu-btn__bars::after { top: 7px; left: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
	:root { --header-h: 66px; }
	.brand__name { font-size: 1.3rem; }
	.menu-btn { display: block; }
	.nav {
		position: fixed; inset: var(--header-h) 0 0 0; background: #fff;
		overflow-y: auto; padding: 12px var(--gutter) 40px;
		opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
	}
	.nav.is-open { opacity: 1; visibility: visible; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__item { border-bottom: 1px solid var(--line); }
	.nav__item > a, .nav__toggle { width: 100%; justify-content: space-between; padding: 18px 4px; font-size: .85rem; }
	.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.nav__sub { position: static; transform: none; min-width: 0; border: 0; box-shadow: none; padding: 0 0 12px; display: none; opacity: 1; visibility: visible; }
	.has-sub.is-open .nav__sub { display: block; transform: none; }
	.has-sub:focus-within .nav__sub { transform: none; }
	.nav__sub a { padding: 10px 12px; }
	.nav__item--cta { border: 0; margin: 24px 0 0; }
	.nav__item--cta > a.btn { width: 100%; text-align: center; padding: 16px; justify-content: center; }
	body.nav-open { overflow: hidden; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; color: #fff; background: var(--ink); overflow: hidden; }
.hero__slides { position: absolute; inset: 0; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; opacity: 0; transition: opacity 1.4s ease; }
.hero__img.is-active { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,28,26,0) 35%, rgba(30,28,26,.55) 100%); }
.hero__content { position: relative; z-index: 1; padding-block: 64px clamp(48px, 9vh, 96px); }
.hero__title { color: #fff; max-width: 15ch; font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: 1.08; margin-bottom: 28px; text-shadow: 0 1px 24px rgba(0,0,0,.18); }
.hero__title em { font-style: italic; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--tint { background: var(--cream); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section__head h2 { margin: 0; }
.section__more { text-align: center; margin: 40px 0 0; }

.intro .entry h2 { margin-bottom: .8em; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.service { text-decoration: none; color: var(--text); display: block; }
.service__media { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 22px; background: var(--line); }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.service:hover .service__media img { transform: scale(1.03); }
.service__title { margin-bottom: .4em; }
.service p { margin-bottom: 1em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.cta-band { background: var(--sage-tint); text-align: center; padding-block: clamp(56px, 8vw, 104px); }
.cta-band h2 { margin-bottom: .4em; }
.cta-band p { margin-bottom: 1.8em; }

@media (max-width: 860px) {
	.services { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
	.split { grid-template-columns: 1fr; }
}

/* ---------- Cards / blog ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.card__link { display: block; text-decoration: none; color: inherit; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); margin-bottom: 18px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card__link:hover .card__media img { transform: scale(1.03); }
.card .eyebrow { margin-bottom: .5rem; }
.card__title { font-size: 1.22rem; line-height: 1.35; margin: 0; }
.card__link:hover .card__title { color: var(--sage-deep); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 48px; }
.chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; font-size: .85rem; text-decoration: none; color: var(--text); }
.chip:hover { border-color: var(--sage-deep); color: var(--sage-deep); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 56px 0 var(--section); }
.pagination .page-numbers { min-width: 42px; padding: 10px 14px; text-align: center; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .9rem; }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination a:hover { border-color: var(--sage-deep); color: var(--sage-deep); }
.empty { text-align: center; margin-bottom: var(--section); }

/* ---------- Page header ---------- */
.page-head { text-align: center; padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 56px); }
.page-head--tall { padding-block: clamp(80px, 14vw, 180px); }
.page-head__title { margin-bottom: .35em; }
.page-head__intro { margin-top: 1em; }
.page-head__intro p:last-child { margin-bottom: 0; }
.crumbs { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.2rem; display: flex; justify-content: center; gap: 10px; color: var(--muted); }
.crumbs a { color: var(--sage-deep); text-decoration: none; font-weight: 600; }

/* ---------- Content (WordPress post/page body) ---------- */
.entry { padding-bottom: var(--section); }
.entry--top { padding-top: clamp(48px, 7vw, 96px); }
.entry--center { text-align: center; padding-bottom: 0; }
.entry > :last-child { margin-bottom: 0; }
.entry h1 { text-align: center; }
.entry h2, .entry h3 { margin-top: 1.6em; }
.entry > h2:first-child, .entry > h3:first-child { margin-top: 0; }
.entry img { margin: 2em auto; }
.entry a img { margin: 2em auto; }
.entry p > img:only-child { margin-block: 1em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .4em; }
.entry blockquote { margin: 2em 0; padding: 0 0 0 1.4em; border-left: 2px solid var(--sage); font: italic 1.2rem/1.6 var(--serif); color: var(--ink); }
.entry iframe { display: block; margin: 2em auto; border: 0; }
.entry iframe[src*="vimeo"], .entry iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.entry center { display: block; }
.entry table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry th, .entry td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry th { font-weight: 600; color: var(--ink); background: var(--cream); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.entry tbody tr:hover { background: var(--cream); }
@media (max-width: 600px) { .entry table { display: block; overflow-x: auto; } }
.lr-gallery > p { display: contents; }
.alignleft { float: left; margin: .4em 1.6em 1em 0 !important; max-width: 50%; }
.alignright { float: right; margin: .4em 0 1em 1.6em !important; max-width: 50%; }
.aligncenter { margin-inline: auto; }
/* Old posts float full-size photos left; show those full width instead. */
.entry img:is(.alignleft, .alignright):is(.size-full, .size-large, .size-medium_large) { float: none; max-width: 100%; margin: 1.2em auto !important; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: -1.2em; }
.entry::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; max-width: 100%; margin: 1.5em auto !important; } }

.lr-cta-inline { text-align: center; margin: 2.5em 0; }

/* Galleries ([modula] and migrated page blocks) */
.lr-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 2em 0; }
.lr-gallery img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; aspect-ratio: 3 / 2; }
.lr-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.lr-gallery--4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .lr-gallery--3, .lr-gallery--4 { grid-template-columns: repeat(2, 1fr); } }

/* Layout helpers used in migrated page content (About, Mini Sessions) */
.lr-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin: 4em 0; text-align: left; }
.lr-split img { margin: 0 !important; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.lr-split > div > :last-child { margin-bottom: 0; }
.lr-split--wide { width: min(100vw - var(--gutter) * 2, var(--wrap)); margin-left: 50%; transform: translateX(-50%); }
.lr-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 3em 0; text-align: center; }
.lr-features > div { padding: 28px 16px; background: var(--cream); }
.lr-features strong { display: block; font: 400 1.6rem/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }
.lr-features span { font-size: .9rem; color: var(--muted); }
.lr-box { background: var(--cream); padding: clamp(24px, 4vw, 48px); margin: 3em 0; }
.lr-box > :last-child { margin-bottom: 0; }
.lr-faq h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.lr-center { text-align: center; }
.lr-links { list-style: none; padding: 0 !important; text-align: center; }
.lr-links li { margin: 0 0 .6em; }
@media (max-width: 760px) {
	.lr-split, .lr-split--wide { grid-template-columns: 1fr; width: auto; margin-left: 0; transform: none; }
	.lr-features { grid-template-columns: 1fr; }
}

/* Contact page */
#TaveContactForm { display: block; margin: 2em 0; border: 0; width: 1px; min-width: 100%; }
.flo-contact__subtitle { text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); font-size: .95rem; padding-top: clamp(56px, 7vw, 88px); }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 56px; }
.site-footer__h { font: 600 .74rem/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #fff; margin: 0 0 1.2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.site-footer address { margin-bottom: 1.4em; line-height: 1.8; }
.site-footer .muted { color: rgba(255,255,255,.5); }
.brand--footer { color: var(--sage); align-items: flex-start; margin-bottom: 1.4rem; }
.brand--footer .brand__tag { padding-left: 0; }
.brand--footer:hover { text-decoration: none !important; color: #fff; }
.site-footer__about p { max-width: 38ch; }
.social { display: flex; gap: 18px; flex-wrap: wrap; }
.social a { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.site-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: rgba(255,255,255,.5); }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr; gap: 36px; } }

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