/* ==========================================================
   Constant Creeations — site styles
   Colors and sizes you might want to tweak live in :root.
   ========================================================== */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #6b6b6b;
  --line: #bdbdbd;
  --header-h: 86px;
  --gutter: 56px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;   /* stop phones in dark mode from recolouring buttons and fields */
}

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

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; border: 0 !important; margin: -1px !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 var(--gutter);
  background: var(--paper);
}

.wordmark {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 35px; }
.main-nav a { font-size: 14px; }
.main-nav a:hover,
.main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.icon-link { display: inline-flex; padding: 4px; font-size: 14px; }

.share { position: relative; }

.share-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
}
.share-toggle i { font-size: 13px; }

.share-menu {
  position: absolute;
  right: -40px;
  top: calc(100% + 14px);
  margin: 0;
  padding: 4px 10px;
  list-style: none;
  min-width: 190px;
  background: var(--paper);
  border: 1px solid #eee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
/* little pointer under the Share button */
.share-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 52px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border-left: 1px solid #eee;
  border-top: 1px solid #eee;
  transform: rotate(45deg);
}
.share-menu li + li { border-top: 1px solid #eee; }
.share-menu a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.share-menu a i {
  width: 16px;
  text-align: center;
  font-size: 16px;
}
.share-menu a:hover { text-decoration: underline; }

/* ---------- Galleries (Home, BC, Manitoba, Hawaii): horizontal photo strip ---------- */

.page-gallery { overflow: hidden; }

.strip {
  display: flex;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.strip::-webkit-scrollbar { display: none; }

.strip img {
  height: 100%;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: cover;
}

/* Short galleries (e.g. BC's two photos) sit centred instead of hugging the left */
.strip img:first-child { margin-left: auto; }
.strip img:last-child { margin-right: auto; }

/* ---------- Contact ---------- */

.contact {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 24px 80px;
}

.contact h1 {
  margin: 0 0 60px;
  text-align: center;
  font-weight: 400;
  font-size: 46px;
  letter-spacing: 0.01em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-photo { width: 100%; height: auto; }

.contact-form { display: flex; flex-direction: column; }

.contact-form input,
.contact-form textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0 0 -1px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.contact-form textarea { resize: vertical; min-height: 240px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--ink); position: relative; }
.contact-form ::placeholder { color: var(--muted); opacity: 1; }

.contact-form button {
  align-self: flex-start;
  margin-top: 10px;
  padding: 15px 26px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);   /* iPhone Safari otherwise draws this text white */
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.contact-form button:hover { border-color: var(--ink); }
.contact-form button:disabled { opacity: 0.5; cursor: default; }

.form-status { min-height: 1.5em; margin: 12px 0 0; font-size: 13px; }

.strip-counter { display: none; }

.site-footer {
  padding: 0 24px 40px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 404 ---------- */

.not-found { text-align: center; padding: 120px 24px; }
.not-found h1 { font-weight: 400; font-size: 40px; margin: 0 0 12px; }
.not-found a { text-decoration: underline; }

/* ---------- Narrower screens: menu moves to its own row ---------- */

@media (max-width: 1000px) {
  :root { --header-h: 104px; }

  .site-header {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 10px;
  }
  .main-nav {
    order: 3;
    flex: 1 0 100%;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .main-nav::-webkit-scrollbar { display: none; }
}

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  :root { --header-h: 92px; --gutter: 18px; }

  .wordmark { font-size: 17px; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 13px; }
  .share-menu { right: 0; }
  .share-menu::before { right: 14px; }

  /* Photos scroll sideways on phones too: one photo per swipe, each fitted to the screen */
  .strip {
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .strip img {
    width: 100vw;
    height: 100%;
    margin: 0;
    object-fit: contain;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* "1 / 8" counter so visitors know to swipe */
  .strip-counter {
    display: block;
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    letter-spacing: 0.08em;
    pointer-events: none;
  }

  .contact h1 { font-size: 34px; margin-bottom: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .main-nav { gap: 13px; }
  .main-nav a { font-size: 12.5px; }
  .header-tools { gap: 2px; }
  .header-tools .share-toggle { font-size: 0; gap: 0; }   /* icon only on phones */
  .header-tools .share-toggle i { font-size: 15px; }
}
