/* Shoreline and Brush: palette pulled from moss, sea glass, wet bark and wild lavender */
:root {
  --moss: #5b7343;
  --moss-dark: #3f5a2e;
  --forest: #1f2b1d;
  --seafoam: #a9d6c3;
  --seafoam-deep: #3d7a66;
  --seafoam-lit: #74bba1;
  --mahogany: #6e2f22;
  --lavender: #c3aedf;
  --paper: #f5f2e9;
  --ink: #2b2420;

  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--paper);
  background-color: var(--forest);
  /* footer stays at the bottom even on short pages */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#main { flex: 1 0 auto; width: 100%; }
/* Placeholder forest photo (Unsplash), pinned behind everything and tinted toward moss.
   A fixed layer (not background-attachment) so phones show it at the right size too. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(31, 43, 29, .3) 0%, rgba(31, 43, 29, .6) 55%, rgba(31, 43, 29, .85) 100%),
    url("images/forest-bg.jpg") center / cover no-repeat;
}
body:not([data-page="home"])::before {
  background:
    linear-gradient(180deg, rgba(31, 43, 29, .72), rgba(31, 43, 29, .88)),
    url("images/forest-bg.jpg") center / cover no-repeat;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--seafoam); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--paper); color: var(--ink); padding: .4rem .8rem; }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { opacity: .75; font-style: italic; }
.center { text-align: center; }

/* ---------- Header: menu left, name center, login right ---------- */
.site-header { position: relative; z-index: 20; }
body[data-page="home"] .site-header { position: absolute; top: 0; left: 0; right: 0; }

.header-bar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: .75rem 1rem;
}
.brand {
  justify-self: center;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .01em;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.icon-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: rgba(245, 242, 233, .1); }
.login-btn { justify-self: end; opacity: .65; }
.login-btn svg { width: 22px; height: 22px; }
.login-btn:hover { opacity: 1; }

.menu-wrap { position: relative; }
.site-menu {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  min-width: 230px;
  padding: .6rem;
  background: var(--lavender);
  color: var(--forest);
  border-radius: 14px;
  box-shadow: 0 18px 40px -14px rgba(10, 16, 8, .75);
}
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu a {
  display: block;
  padding: .45rem .9rem;
  border-radius: 9px;
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
}
.site-menu a:hover { background: rgba(31, 43, 29, .1); }
.site-menu a[aria-current="page"] { font-style: italic; background: rgba(31, 43, 29, .14); }
.site-menu :focus-visible { outline-color: var(--forest); }


/* ---------- Home hero ---------- */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 3rem;
  text-align: center;
}
h1 { margin: 0; font-weight: 500; line-height: 1.05; }
.hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: .01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}
.hero h1 .amp {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: .42em;
  color: var(--seafoam);
  margin: .15em 0;
}
.subtitle {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-style: italic;
  color: var(--lavender);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}
.ripple {
  width: 180px;
  margin-top: 1.75rem;
  fill: none;
  stroke: var(--seafoam);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: .8;
}

/* ---------- Home: the two seafoam preview boxes ---------- */
.previews {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.preview-box {
  position: relative;
  background: var(--seafoam);
  color: var(--forest);
  border-radius: 22px;
  padding: 1.5rem 1.5rem .75rem;
}
.preview-box h2 {
  margin: 0 0 1.25rem;
  font-size: 2rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.more-arrow {
  display: block;
  width: 110px;
  margin: 1.1rem 0 0 auto;
  padding: .4rem 0;
  color: var(--seafoam-deep);
}
.more-arrow svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.more-arrow:hover { color: var(--seafoam-lit); }
.more-arrow:focus-visible { outline-color: var(--forest); }

/* ---------- Polaroids ---------- */
.polaroids {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.75rem;
  max-width: 900px;
}
.polaroids.mini { gap: 1rem; max-width: none; }

/* The one bold thing: real-feeling instant prints, each laid down at its own angle */
.polaroid {
  position: relative;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 14px 12px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(20, 14, 10, .35), 0 14px 28px -10px rgba(10, 16, 8, .7);
  transform: rotate(var(--tilt, -1.5deg));
  transition: transform .35s ease, box-shadow .35s ease;
}
.polaroid:nth-child(6n+1) { --tilt: -2deg; }
.polaroid:nth-child(6n+2) { --tilt: 1.5deg; }
.polaroid:nth-child(6n+3) { --tilt: -.75deg; }
.polaroid:nth-child(6n+4) { --tilt: 2.25deg; }
.polaroid:nth-child(6n+5) { --tilt: -1.25deg; }
.polaroid:nth-child(6n+6) { --tilt: .9deg; }
.polaroid:not(.is-blank):hover,
.polaroid:focus-within {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 2px 4px rgba(20, 14, 10, .3), 0 24px 40px -12px rgba(10, 16, 8, .8);
}
.mini .polaroid { padding: 8px 8px 6px; box-shadow: 0 1px 2px rgba(20, 30, 25, .3), 0 10px 18px -10px rgba(20, 40, 30, .6); }
@media (prefers-reduced-motion: reduce) { .polaroid { transition: none; } }

.photo-link { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
a.photo-link { cursor: pointer; }
.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #d9dccf;
}
.photo.empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(169, 214, 195, .55), transparent 60%),
    radial-gradient(circle at 75% 80%, rgba(91, 115, 67, .45), transparent 55%),
    #dfe2d6;
  box-shadow: inset 0 0 0 1px rgba(43, 36, 32, .08);
}
body[data-page="watercolor"] .photo.empty,
#previews .preview-box:nth-child(2) .photo.empty {
  background:
    radial-gradient(circle at 70% 30%, rgba(195, 174, 223, .6), transparent 60%),
    radial-gradient(circle at 25% 75%, rgba(169, 214, 195, .5), transparent 55%),
    #e6e1e8;
}
.photo.empty span { font-style: italic; font-size: 1rem; color: rgba(43, 36, 32, .55); text-align: center; padding: 0 .4rem; line-height: 1.2; }

.caption {
  margin: .7rem 0 0;
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}
.mini .caption { font-size: 1.05rem; margin-top: .45rem; }

.polaroid.flash { animation: flash 1.6s ease 1; }
@keyframes flash { 0%, 100% { box-shadow: 0 14px 28px -10px rgba(10, 16, 8, .7); } 30% { box-shadow: 0 0 0 6px var(--lavender), 0 14px 28px -10px rgba(10, 16, 8, .7); } }
@media (prefers-reduced-motion: reduce) { .polaroid.flash { animation: none; } }

/* ---------- Inner pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4.5rem; }
.page-head { text-align: center; margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(2.4rem, 7vw, 3.6rem); }
.section-note { margin: .4rem auto 0; font-style: italic; color: var(--seafoam); max-width: 46ch; }

.card {
  background: rgba(31, 43, 29, .72);
  border: 1px solid rgba(169, 214, 195, .2);
  border-radius: 18px;
  padding: 1.5rem;
}
.card h2 { margin: 0 0 1rem; font-weight: 500; font-size: 1.8rem; }

.about { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 3rem; align-items: start; max-width: 980px; margin: 0 auto; }
.about-photo { --tilt: -2deg; }
.about-text { max-width: 62ch; font-size: 1.3rem; }
.about-text p:first-child { margin-top: 0; }

.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; max-width: 980px; margin: 0 auto; align-items: start; }
.link-list { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: 1.3rem; }
.link-list li + li { margin-top: .4rem; }
.link-list a { text-decoration-color: var(--lavender); text-underline-offset: 5px; }
.sent { font-size: 1.35rem; font-style: italic; color: var(--seafoam); margin: 0; }
.turnstile:not(:empty) { margin: .5rem 0; }

/* ---------- Forms, buttons, dialogs ---------- */
.form { display: flex; flex-direction: column; gap: .35rem; }
.form label, .form .label { font-weight: 600; font-size: 1.05rem; margin: .5rem 0 0; }
.form input, .form textarea {
  font: inherit;
  font-size: 1.1rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(43, 36, 32, .3);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  width: 100%;
}
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus-visible, .form textarea:focus-visible { outline-color: var(--seafoam-deep); }
.form .btn { margin-top: 1rem; align-self: flex-start; }
.form-note { margin: .1rem 0 0; font-size: 1rem; font-style: italic; opacity: .8; }
.form-error { margin: 0; color: #8f2a1a; font-weight: 600; font-size: 1.05rem; }
.form-error:empty { display: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.btn-row .btn { margin-top: 0; }

.btn {
  display: inline-block;
  padding: .5rem 1.2rem;
  border: 1px solid var(--moss-dark);
  border-radius: 999px;
  background: var(--moss-dark);
  color: var(--paper);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--moss); border-color: var(--moss); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.btn:disabled { opacity: .6; cursor: wait; }

.dlg {
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem 1.5rem 1.5rem;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.dlg-wide { width: min(940px, calc(100vw - 2rem)); }
.dlg::backdrop { background: rgba(20, 28, 18, .72); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.dlg-head h2 { margin: 0; font-weight: 500; font-size: 1.8rem; line-height: 1.2; }
.dlg .icon-btn:hover { background: rgba(43, 36, 32, .08); }
.dlg :focus-visible { outline-color: var(--seafoam-deep); }
.lightbox { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; align-items: start; }
.lightbox img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; background: #e9e6dc; }
.lightbox-text p:first-child { margin-top: 0; }
.lightbox-text .btn { margin-top: .5rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 100;
  max-width: calc(100vw - 2rem);
  padding: .65rem 1.2rem;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  transform: translate(-50%, 150%);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast[data-kind="error"] { background: var(--mahogany); color: var(--paper); }

/* ---------- Footer ---------- */
.footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  color: rgba(245, 242, 233, .75);
  background: rgba(110, 47, 34, .55);
}
.footer p { margin: .25rem 0 0; }

/* ---------- Mushrooms (can be switched off in the admin page settings) ---------- */
.shroom { width: 1.5rem; height: 1.5rem; flex: none; vertical-align: middle; }
.shroom-small { width: 1.05rem; height: 1.05rem; }
.shroom-cap { fill: var(--mahogany); }
.shroom-stem { fill: var(--paper); }
.shroom-dot { fill: var(--lavender); }
.preview-box h2 .shroom { width: 1.6rem; height: 1.6rem; }
.preview-box h2 span { display: inline-flex; }
.footer-shrooms { display: inline-flex; align-items: flex-end; gap: .1rem; }
.footer-shrooms .shroom { width: 1.9rem; height: 1.9rem; }
.footer-shrooms .shroom-small { width: 1.25rem; height: 1.25rem; }
.box-shrooms { position: absolute; left: 1.1rem; bottom: .55rem; display: inline-flex; align-items: flex-end; }
.box-shrooms .shroom { width: 2rem; height: 2rem; }
.box-shrooms .shroom-small { width: 1.3rem; height: 1.3rem; margin-right: -.2rem; }
.no-mushrooms .shroom,
.no-mushrooms .box-shrooms,
.no-mushrooms .footer-shrooms,
.no-mushrooms .preview-box h2 span { display: none; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 900px) {
  .previews { grid-template-columns: 1fr; max-width: 620px; }
  .polaroids { grid-template-columns: repeat(2, 1fr); max-width: 560px; gap: 2rem 1.5rem; }
  .polaroids.mini { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { max-width: 300px; margin: 0 auto; }
  .contact { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { min-height: 64vh; }
  .preview-box { padding: 1.2rem 1rem .5rem; border-radius: 18px; }
  .preview-box h2 { font-size: 1.7rem; margin-bottom: 1rem; }
  .polaroids { gap: 1.75rem 1rem; }
  .polaroids.mini { gap: .6rem; }
  .polaroid { padding: 8px; }
  .mini .polaroid { padding: 5px 5px 4px; }
  .caption { font-size: 1.1rem; }
  .mini .caption { font-size: .9rem; }
  .mini .photo.empty span { font-size: .75rem; }
  .card { padding: 1.2rem; }
  .dlg { padding: 1rem 1.1rem 1.25rem; }
}
