/* Minimal theme. Colours and fonts come from :root custom properties set by theme settings. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }

.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--bg); }

.site-header, main, .site-footer { max-width: 1400px; margin: 0 auto; padding-inline: 1rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.5rem 2rem;
}
.site-title { font: 600 1.25rem/1.2 var(--font-heading); text-decoration: none; letter-spacing: .01em; }
.site-header ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--accent); }

main { min-height: 60vh; }
.site-footer { padding-block: 3rem 2rem; color: var(--muted); font-size: .85rem; }

.page-head { margin-bottom: 2rem; max-width: 46rem; }
.page-head h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lede { margin: 0; color: var(--muted); }
.section-title { margin: 3rem 0 1rem; font-size: 1.25rem; }
.empty { color: var(--muted); }

/* --- Photo grids. Column counts must match SIZES in index.ts. */

.photos-uniform { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.photos-uniform .photo { aspect-ratio: 3 / 2; overflow: hidden; }
.photos-uniform img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.photos-uniform .photo:hover img { transform: scale(1.02); }

.photos-masonry { columns: 1; column-gap: 1rem; }
.photos-masonry .photo { display: block; margin-bottom: 1rem; break-inside: avoid; }
.photos-masonry img { width: 100%; height: auto; }

.photos-single { display: grid; gap: 2.5rem; justify-items: center; }
.photos-single .photo { width: 100%; max-width: 1000px; }
.photos-single img { width: 100%; height: auto; }

.hero { margin: 0; }
.hero img { width: 100%; height: auto; max-height: 80vh; object-fit: cover; }

.cards { display: grid; grid-template-columns: 1fr; gap: 2rem 1rem; margin: 0; padding: 0; list-style: none; }
.cards a { display: block; text-decoration: none; }
.cards img, .no-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.no-cover { display: block; background: var(--surface); }
.card-title { display: block; margin-top: .6rem; font: 600 1.1rem/1.3 var(--font-heading); }
.card-count { color: var(--muted); font-size: .85rem; }

@media (min-width: 600px) {
  .site-header, main, .site-footer { padding-inline: 2rem; }
  .photos-uniform, .cards { grid-template-columns: repeat(2, 1fr); }
  .photos-masonry { columns: 2; }
}
@media (min-width: 1000px) {
  .photos-uniform, .cards { grid-template-columns: repeat(3, 1fr); }
  .photos-masonry { columns: 3; }
}

/* --- Single photo page (the no-JavaScript lightbox). */

.photo-page figure { margin: 0; display: grid; justify-items: center; gap: .75rem; }
.photo-full { width: auto; height: auto; max-height: 82vh; }
.photo-page figcaption { color: var(--muted); font-size: .9rem; text-align: center; }
.photo-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; font-size: .9rem; }
.photo-nav a { text-decoration: none; color: var(--muted); }

/* --- Text pages and the contact form. */

.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.15rem; }
.prose a { color: var(--accent); }
.page-hero { margin: 0 0 2rem; }
.page-hero img { width: 100%; height: auto; }

.contact { margin-top: 2rem; display: grid; gap: .25rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.field .error { display: block; color: #c0392b; font-size: .85rem; }
.contact input, .contact textarea {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.contact [aria-invalid="true"] { border-color: #c0392b; }
button {
  padding: .65rem 1.4rem;
  font: 600 .95rem var(--font-body);
  color: var(--bg);
  background: var(--fg);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: var(--accent); }
.notice { padding: 1rem; border-left: 3px solid var(--accent); background: var(--surface); }
.not-found { padding-block: 4rem; }

/* --- Lightbox (lightbox.js). */

.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  color: #eee; background: rgb(10 10 10 / .97);
}
.lb::backdrop { background: rgb(0 0 0 / .6); }
.lb-stage { position: absolute; inset: 3.5rem 0 3rem; display: grid; place-items: center; touch-action: pan-y; }
.lb-stage img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 6.5rem); width: auto; height: auto; object-fit: contain; }
.lb-bar { position: absolute; inset: auto 0 0; display: flex; justify-content: center; align-items: center; height: 3rem; font-size: .85rem; color: #aaa; }
.lb button { position: absolute; padding: .6rem .9rem; color: #eee; background: transparent; font-size: 1.4rem; line-height: 1; }
.lb button:hover { color: #fff; background: rgb(255 255 255 / .08); }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev { left: .5rem; top: 50%; translate: 0 -50%; }
.lb-next { right: .5rem; top: 50%; translate: 0 -50%; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.made-with { margin-top: .5rem; font-size: .75rem; }
.made-with a { color: inherit; }
/* Uploaded logo, in place of the title. Height by the logo setting; never wider than the screen allows. */
.site-title.has-logo { display: inline-block; line-height: 0; }
.site-header:has(.has-logo) { align-items: center; }
.logo { display: block; width: auto; max-width: min(70vw, 28rem); height: var(--logo-height); object-fit: contain; }
.logo-small { --logo-height: 2rem; }
.logo-medium { --logo-height: 3rem; }
.logo-large { --logo-height: 4.5rem; }
@media (max-width: 600px) { .logo { height: calc(var(--logo-height) * .75); } }

/* === shared sections: copied from src/themes/sections.css; edit there === */
/* Packages, contact details and the home page's sections, shared by the built-in themes: copied
   into the end of each theme's site.css (test/themes/sections.test.ts checks they match), so a
   page still loads one stylesheet. Colours
   and fonts come from each theme's own custom properties (--fg, --muted, --line, --surface,
   --accent, --font-heading), so these sit right on any theme and background colour. */

.home-intro, .home-packages, .home-contact { margin: clamp(2.5rem, 6vw, 4.5rem) auto; max-width: 1200px; }
.home-intro { max-width: 42rem; text-align: center; }
.home-intro h2, .home-packages h2, .home-contact h2 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.15; margin: 0 0 1rem; }
.home-packages h2, .home-contact h2 { text-align: center; }
.home-intro .prose p { color: var(--fg); font-size: 1.1rem; }

/* Package cards */
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.package { display: flex; flex-direction: column; padding: 1.5rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.package-name { margin: 0; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; }
.package-price { margin: .4rem 0 0; font-size: 1.5rem; font-weight: 600; color: var(--fg); }
.package-description { margin: .75rem 0 0; color: var(--muted); }
.package-includes { flex: 1; margin: 1rem 0 1.25rem; padding: 0; list-style: none; }
.package-includes li { position: relative; padding: .3rem 0 .3rem 1.3rem; border-top: 1px solid var(--line); font-size: .95rem; }
.package-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
/* :is() adds weight, so a theme's rule for links in page text (".prose a") can't recolour the button. */
:is(.packages, .home-contact) .package-button { align-self: flex-start; display: inline-block; margin-top: auto; padding: .6rem 1.2rem; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
:is(.packages, .home-contact) .package-button:hover { opacity: .9; }
.see-all { text-align: center; }

/* Contact details: on the contact page, in the home page's contact section, and in the footer */
.contact-details { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1rem 0; padding: 0; list-style: none; }
.home-contact { text-align: center; }
.home-contact .contact-details { justify-content: center; font-size: 1.05rem; }
.home-contact .package-button { align-self: center; }
.site-contact .contact-details { margin: 0 0 .75rem; font-size: .9rem; }
.contact-details a { color: inherit; }

/* Home page sections (src/themes/page-sections.ts, drawn by sectionBlocks in shared.ts). A theme can
   set --block-pad for side padding when its main area has none. The fallbacks are for uploaded
   themes, which load this file before their own stylesheet. */
.block { margin: clamp(2.5rem, 6vw, 4.5rem) auto; max-width: 1200px; padding-inline: var(--block-pad, 0); }
.block-cover, .block-photos { max-width: none; padding-inline: 0; }
.block-cover:first-child, h1.sr-only + .block-cover { margin-top: 0; }
.block-heading { margin: 0 0 1.5rem; font-family: var(--font-heading, inherit); font-weight: 600; font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.15; text-align: center; text-wrap: balance; }
.block-photos .block-heading { padding-inline: var(--block-pad, 0); }
.block .block-btn { display: inline-block; padding: .7rem 1.4rem; border-radius: 999px; background: var(--accent, #222); color: var(--bg, #fff); font-weight: 600; text-decoration: none; }
.block .block-btn:hover { opacity: .9; }
.block-button { text-align: center; }
.block-empty { padding: 1.5rem; border: 2px dashed var(--line, #ccc); border-radius: 8px; color: var(--muted, #666); text-align: center; max-width: 40rem; }

/* Cover: a photo with words on it */
.block-cover { position: relative; display: grid; overflow: hidden; background: #222; color: #fff; }
.cover-full { min-height: min(100svh, 60rem); }
.cover-large { min-height: clamp(22rem, 70svh, 44rem); }
.cover-medium { min-height: clamp(16rem, 45svh, 28rem); }
.block-cover .cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.block-cover::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); }
.cover-text { position: relative; z-index: 1; display: grid; gap: 1rem; align-content: center; justify-items: center; width: 100%; max-width: 60rem; margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem); text-align: center; }
.cover-bottom-left .cover-text { align-content: end; justify-items: start; margin: 0; text-align: left; }
.cover-text :is(h1, h2) { margin: 0; font-family: var(--font-heading, inherit); font-weight: 600; font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1.05; color: #fff; text-wrap: balance; }
.cover-text p { margin: 0; max-width: 40rem; font-size: clamp(1rem, 2vw, 1.25rem); }
.block-cover .block-btn { background: #fff; color: #111; }

/* Collections: cards, titles on photos, rows, or a list */
.block-cards, .block-tiles, .block-rows, .block-list { margin: 0; padding: 0; list-style: none; }
.block-cards, .block-tiles { display: grid; gap: 1.25rem; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.cols-1 { --cols: 1; } .cols-2 { --cols: 2; } .cols-3 { --cols: 3; } .cols-4 { --cols: 4; }
@media (max-width: 900px) { .cols-3, .cols-4 { --cols: 2; } }
@media (max-width: 560px) { .block-cards, .block-tiles { --cols: 1; } }
.block-collections a { color: inherit; text-decoration: none; }
.block-collections .no-cover { display: block; background: var(--surface, #eee); }
.block-cards img, .block-cards .no-cover, .block-tiles img, .block-tiles .no-cover { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
:is(.block-cards, .block-tiles).cols-1 :is(img, .no-cover) { aspect-ratio: 16 / 9; }
.card-name { display: block; margin-top: .7rem; font-family: var(--font-heading, inherit); font-size: 1.2rem; font-weight: 600; }
.card-meta { display: block; color: var(--muted, #666); font-size: .9rem; }
.block-tiles a { position: relative; display: grid; overflow: hidden; }
.block-tiles a > * { grid-area: 1 / 1; }
.tile-name { align-self: end; z-index: 1; padding: 4rem 1.25rem 1.25rem; background: linear-gradient(transparent, rgb(0 0 0 / .6)); color: #fff; font-family: var(--font-heading, inherit); font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 600; }
.block-rows { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.block-rows li { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(1.25rem, 4vw, 3rem); align-items: center; }
.block-rows li:nth-child(even) > a:first-child { order: 2; }
.block-rows img, .block-rows .no-cover { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.block-rows h3 { margin: 0 0 .5rem; font-family: var(--font-heading, inherit); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; }
.block-rows p { margin: 0 0 .75rem; color: var(--muted, #666); }
@media (max-width: 700px) { .block-rows li { grid-template-columns: 1fr; } .block-rows li:nth-child(even) > a:first-child { order: 0; } }
.block-list { max-width: 50rem; margin-inline: auto; border-top: 1px solid var(--line, #ddd); }
.block-list a { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line, #ddd); }
.block-list img, .block-list .no-cover { flex: none; width: 4.5rem; height: 4.5rem; object-fit: cover; }
.block-list .card-name { flex: 1; margin: 0; }

/* Photos as a slideshow: swipe or scroll sideways, no script needed */
.slideshow { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--block-pad, 0) .5rem; }
.slideshow .slide { flex: none; scroll-snap-align: center; }
.slideshow img { width: auto; max-width: 85vw; height: clamp(16rem, 60vh, 40rem); object-fit: cover; }

/* Text, text beside a photo, and a quote */
.block-text { max-width: 42rem; }
.block-text .block-heading, .block-split .block-heading { text-align: left; }
.block .prose { max-width: none; }
.block-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.block-split > img { width: 100%; height: auto; }
.block-split.side-right > img { order: 2; }
@media (max-width: 700px) { .block-split { grid-template-columns: 1fr; } .block-split.side-right > img { order: 0; } }
.block-quote { max-width: 46rem; text-align: center; }
.block-quote blockquote { margin: 0; font-family: var(--font-heading, inherit); font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.3; text-wrap: balance; }
.block-quote blockquote p { margin: 0; white-space: pre-line; }
.block-quote figcaption { margin-top: 1rem; color: var(--muted, #666); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
/* === end shared sections === */
