/* =========================================================================
   Blanche Feekes Photography — site styles
   ========================================================================= */

/* ---- Self-hosted logo font (renders consistently across browsers) ------- */
@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/DancingScript-Latin.woff2") format("woff2"),
       url("../fonts/DancingScript-Latin.woff") format("woff");
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --bg: #fafafa;
  --fg: #1c1c1c;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --accent: #1c1c1c;
  --header-h: 72px;
  --rail-w: 168px;          /* right thumbnail rail (~2x reference) */
  --maxw: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Fixed header ------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: var(--fg);
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  font-size: 12pt;                 /* requested 12pt nav */
  text-decoration: none;
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover { background: #ececec; }

.site-nav a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
}

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 18px;
  cursor: pointer;
}

/* ---- Page scaffold ------------------------------------------------------ */
.page {
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ---- Gallery layout ----------------------------------------------------- */
.gallery {
  display: block;
  padding: 28px 0 80px;
}

.gallery-main {
  max-width: var(--maxw);
  /* leave room for the fixed rail on the right */
  margin: 0 auto;
  padding: 0 calc(var(--rail-w) + 48px) 0 24px;
}

.figure {
  margin: 0 0 40px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
  /* download deterrents */
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.figure figcaption {
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
}

/* ---- Right vertical thumbnail rail -------------------------------------- */
.rail {
  position: fixed;
  top: calc(var(--header-h) + 12px);   /* starts high on the page */
  right: 14px;
  bottom: 14px;
  width: var(--rail-w);
  overflow-y: auto;
  z-index: 60;
  padding: 4px;
  scrollbar-width: thin;
}

.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 4px; }

.rail button {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
}

.rail button img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.rail button.active { border-color: var(--accent); }
.rail button:hover { border-color: #9a9a9a; }

/* ---- Bottom-left up/down arrows (~2x reference) ------------------------- */
.pager {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pager button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--fg);
  font-size: 30px;                 /* large arrows */
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  transition: transform 0.12s ease, background 0.12s ease;
}

.pager button:hover { background: #fff; transform: translateY(-2px); }
.pager button:active { transform: translateY(0); }

/* ---- Right-click copyright caption -------------------------------------- */
.copyright-toast {
  position: fixed;
  z-index: 200;
  max-width: 260px;
  padding: 10px 14px;
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.copyright-toast.show { opacity: 1; transform: translateY(0); }

/* ---- Lightbox (double-click large view) --------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.94);
  padding: 3vh 3vw;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox .lb-close {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.lightbox .lb-close:hover { background: rgba(255, 255, 255, 0.28); }

.lightbox .lb-caption {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

/* ---- Content pages (About / Contact) ------------------------------------ */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.content h1 {
  font-size: 30px;
  margin: 0 0 24px;
  font-weight: 600;
}

.content h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.content p { margin: 0 0 18px; font-size: 17px; }

.portrait {
  float: right;
  width: 240px;
  max-width: 40%;
  margin: 0 0 16px 24px;
  border-radius: 3px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.14);
}

/* ---- Contact form ------------------------------------------------------- */
.contact-form { margin-top: 8px; }

.contact-form label {
  display: block;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contact-form textarea { min-height: 150px; resize: vertical; }

.contact-form .honeypot { position: absolute; left: -9999px; }

.contact-form button {
  padding: 12px 26px;
  font-size: 16px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.contact-form button:hover { background: #000; }

.form-status { margin-top: 16px; font-size: 15px; }
.form-status.ok { color: #1a7f37; }
.form-status.err { color: #b42318; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px;
    display: none;
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; border-radius: 0; }
  .site-nav a.active { border-bottom: none; background: #f0f0f0; }

  /* rail becomes a horizontal strip under the header */
  .rail {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 92px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(250, 250, 250, 0.97);
    border-bottom: 1px solid var(--line);
  }

  .rail button { width: auto; height: 100%; margin: 0; flex: 0 0 auto; }
  .rail button img { width: auto; height: 100%; }

  .gallery-main {
    padding: 104px 16px 0;   /* clear the horizontal rail */
  }

  .figure { scroll-margin-top: calc(var(--header-h) + 104px); }

  .pager button { width: 52px; height: 52px; font-size: 24px; }
}
