html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Red Hat Display", sans-serif;
  color: #fff;
  background-color: #000;
  background: repeating-linear-gradient(
    90deg,
    #1b202c,
    #1b202c 40px,
    #262d3c 40px,
    #262d3c 80px
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background-image 1s ease-in-out;
}

#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
}

a, a:visited, a:hover, a:active { color: #fff; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }

#painting-info strong,
#overlay strong {
  font-family: "Faculty Glyphic", sans-serif;
  font-weight: 400;
  font-size: 1.2em;
}

#painting-info .painting-artist {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.95em;
  opacity: 0.85;
}

.container {
  padding: 50px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.title-box {
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 12px;
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 90vw;
  width: 300px;
  z-index: 200;
  font-size: 0.95em;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

body.about-in-view .title-box {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
}

.title-box h1 { margin: 0 0 10px; font-size: 1.4em; }
.title-box h1 .visually-hidden,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.title-box p { margin: 0 0 10px; }

.info { margin-top: 1rem; font-size: 0.8em; }

.credit { margin-top: 10px; font-size: 0.9em; color: #ccc; }
.credit a { color: #ccc; }
.credit a:hover { color: #fff; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  border-radius: 0 0 0 12px;
}

.nav a, .nav button {
  display: inline-block;
  height: 2.5em;
  line-height: 2.5em;
  padding: 0 1em;
  border: none;
  background: none;
  color: #fff;
  font-size: 1em;
  text-align: center;
  cursor: pointer;
}

.intro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.title-box-h1,
#weather-emoji {
  flex: 1 1 0;
  min-width: 0;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1;
}

#weather-emoji {
  position: relative;
  font-size: 64px;
  text-align: center;
}

.emoji-glyph { line-height: 1; }

.temp-badge {
  position: absolute;
  top: -6px;
  right: 4px;
  font-family: "Red Hat Display", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  z-index: 2;
  white-space: nowrap;
}

#fairweathersociety-icon {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.intro-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 1em 0;
}

/* ---------------- Hero scroll cue ---------------- */
.scroll-cue {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.6em;
  height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  text-decoration: none;
  font-size: 1.1em;
  z-index: 150;
  animation: bob 2.2s ease-in-out infinite;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-cue:hover { background: rgba(0,0,0,0.75); }

body.about-in-view .scroll-cue {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* ---------------- Share button ---------------- */
.share-row {
  margin: 0 0 0.6em !important;
  display: flex;
  gap: 0.5em;
  align-items: stretch;
}

.share-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 14px;
  font-size: 0.85em;
  font-family: inherit;
  text-align: center;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}

.share-btn:hover { background: rgba(255,255,255,0.2); text-decoration: none; }
.share-btn:active { transform: scale(0.97); }
.share-btn:disabled { opacity: 0.6; cursor: progress; }

.share-btn-arrow {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.15s ease;
}

.share-btn:hover .share-btn-arrow { transform: translate(2px, -1px); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.75em 1.2em;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- Share preview modal ---------------- */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.share-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.share-modal-inner {
  position: relative;
  background: #1b202c;
  color: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.25rem 1.25rem;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.22s ease;
}

.share-modal.visible .share-modal-inner {
  transform: none;
}

.share-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 2.2em;
  height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.share-modal-close:hover { background: rgba(255, 255, 255, 0.18); }

.share-modal-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
}

.share-track-window {
  position: relative;
  overflow: hidden;
  width: 100%;
  /* Fixed window height = the tallest slide (portrait). Shorter slides
     (landscape) center inside this window. */
  height: 64vh;
  border-radius: 10px;
  touch-action: pan-y;            /* allow vertical page scroll, capture horizontal */
  cursor: grab;
}

.share-track-window.dragging { cursor: grabbing; }

.share-track {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
}

.share-track-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;          /* taps belong to the track, not the img */
}

.share-modal-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.04);
  -webkit-user-drag: none;
  user-select: none;
}

.share-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease, opacity 0.2s ease;
}

.share-nav-btn:hover { background: rgba(0, 0, 0, 0.8); }
.share-nav-btn:disabled { opacity: 0.3; cursor: default; }

.share-nav-prev { left: -10px; }
.share-nav-next { right: -10px; }

@media (max-width: 480px) {
  .share-nav-prev { left: 4px; }
  .share-nav-next { right: 4px; }
}

.share-format-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.share-format-label {
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.share-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.share-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.share-dot:hover { background: rgba(255, 255, 255, 0.45); }
.share-dot.active {
  background: #ffd86b;
  transform: scale(1.2);
}

.share-modal-hint {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.share-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-modal-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65em 1.4em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.share-modal-btn:hover { background: rgba(255, 255, 255, 0.18); }
.share-modal-btn:active { transform: scale(0.97); }

.share-modal-btn-primary {
  background: #ffd86b;
  color: #1b202c;
  border-color: transparent;
}

.share-modal-btn-primary:hover { background: #ffe59a; }

.share-modal-btn svg {
  vertical-align: middle;
  margin-right: 0.4em;
}

.share-divider {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 1.2rem 0 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.share-divider::before,
.share-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.share-social {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 0.9rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.social-btn:hover { background: rgba(255, 255, 255, 0.18); }
.social-btn:active { transform: scale(0.94); }

.social-x:hover        { background: #000; border-color: #000; }
.social-facebook:hover { background: #1877F2; border-color: #1877F2; }
.social-threads:hover  { background: #000; border-color: #000; }
.social-pinterest:hover { background: #BD081C; border-color: #BD081C; }
.social-email:hover    { background: #555; border-color: #555; }
.social-copy:hover     { background: #555; border-color: #555; }

/* ---------------- About section ---------------- */
.about-section {
  position: relative;
  z-index: 10;
  background: rgba(15, 18, 28, 0.92);
  color: #fff;
  padding: clamp(3rem, 7vw, 5rem) 1.25rem;
}

.about-inner {
  max-width: 980px;
  margin: 0 auto;
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-header h2 {
  font-family: "Faculty Glyphic", sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

.about-header .lede {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 1.4rem;
  opacity: 0.92;
}

.about-section .rating {
  margin: 0.6rem 0 1.4rem;
  font-size: 1rem;
}

.about-section .stars {
  color: #ffd86b;
  letter-spacing: 0.1em;
  margin-right: 0.4em;
}

.about-section .cta {
  margin: 0 0 0.4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0 0 3rem;
}

.about-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.75rem 1.6rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.about-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 216, 107, 0.3);
}

.about-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-family: "Red Hat Display", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.7em;
  color: #fff;
}

.about-card p {
  margin: 0;
  line-height: 1.55;
  opacity: 0.85;
}

.pill {
  display: inline-block;
  font-family: "Red Hat Display", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.2;
  vertical-align: middle;
}

.pill-magic { background: #8b5cf6; }
.pill-new   { background: #2f7eff; }

.section-heading {
  font-family: "Faculty Glyphic", sans-serif;
  font-weight: 400;
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}

.reviews { margin-bottom: 3rem; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.review {
  margin: 0;
  padding: 1.2rem 1.2rem;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid #ffd86b;
  border-radius: 6px;
}

.review p {
  margin: 0 0 0.6em;
  font-style: italic;
  line-height: 1.5;
}

.review cite {
  font-style: normal;
  opacity: 0.7;
  font-size: 0.9em;
}

.project-note {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.92;
}

.project-note a { color: #ffd86b; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.about-footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.app-icon-link {
  display: inline-block;
  line-height: 0;
  border-radius: 28px;
  transition: transform 0.2s ease;
}

.app-icon-link:hover { transform: translateY(-2px); }

.app-icon {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  display: block;
}

.footer-wordmark {
  margin: 0;
}

.footer-wordmark img {
  width: clamp(220px, 50vw, 360px);
  height: auto;
  display: block;
}

.about-footer .cta { margin: 0; }

.footer-honeywired {
  margin: 2rem 0 0;
}

.footer-honeywired img {
  height: 36px;
  width: auto;
  display: block;
}

.footer-tagline {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-legal {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.55;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0.3em;
}

.footer-legal a:hover { color: #fff; }

/* Legacy class kept for any stray references */
.honeywired-logo { height: 32px; width: auto; vertical-align: middle; }

@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
}

#error { color: red; font-size: 0.9em; }

.geo-hint {
  display: inline-block;
  margin-top: 0.5em;
  font-size: 0.8em;
  color: #ccc;
}

.geo-hint button {
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

@keyframes panZoomVertical {
  0%   { background-position: center center; background-size: cover; }
  50%  { background-position: top center;    background-size: 105%; }
  100% { background-position: center center; background-size: cover; }
}

@keyframes panZoomHorizontal {
  0%   { background-position: center center; background-size: cover; }
  50%  { background-position: center right;  background-size: 105%; }
  100% { background-position: center center; background-size: cover; }
}

@media (orientation: landscape) {
  body { animation: panZoomHorizontal 60s ease-in-out infinite; }
}

@media (orientation: portrait) {
  body { animation: panZoomVertical 60s ease-in-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none !important; }
  #background-container img { transform: translate(-50%, -50%) !important; }
}

#background-container {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

#background-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  transform: translate(-50%, -50%);
  will-change: transform;
}

@media (max-width: 600px) {
  .title-box {
    left: 12px;
    bottom: 12px;
    width: auto;
    max-width: calc(100vw - 100px);
  }

  /* Collapsed: tight panel, small logo+emoji+temp */
  .title-box.collapsed {
    padding: 8px 12px 6px;
    cursor: pointer;
    animation: titleBoxPulse 2.6s ease-out infinite;
  }

  /* Left-pointing chevron sitting just outside the right edge of the
     collapsed module, nudging toward it to draw the eye. */
  .title-box.collapsed::after {
    content: '\2039';                /* ‹ single left-pointing angle */
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 14px;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: chevronNudgeLeft 1.6s ease-in-out infinite;
  }

  /* Stop the pulse + chevron animation after the user has tapped the module */
  body.has-interacted .title-box.collapsed {
    animation: none;
  }
  body.has-interacted .title-box.collapsed::after {
    animation: none;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .title-box.collapsed .title-box-h1,
  .title-box.collapsed #weather-emoji {
    height: 48px;
  }

  .title-box.collapsed #weather-emoji {
    font-size: 36px;
  }

  .title-box.collapsed #fairweathersociety-icon {
    max-height: 48px;
  }

  .title-box.collapsed .temp-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    top: -4px;
    right: 2px;
  }

  /* Expanded: bigger logo + emoji */
  .title-box:not(.collapsed) {
    padding: 22px 16px 14px;                       /* +6 above the logo row */
    max-width: calc(100vw - 120px);                /* 20px narrower than collapsed */
  }

  .title-box:not(.collapsed) .title-box-h1,
  .title-box:not(.collapsed) #weather-emoji {
    height: 84px;
  }

  .title-box:not(.collapsed) #weather-emoji {
    font-size: 64px;
  }

  .title-box:not(.collapsed) #fairweathersociety-icon {
    max-height: 84px;
  }

  /* Trim the gap between the logo row and the first content line */
  .title-box:not(.collapsed) #introContent .intro-rule:first-child {
    margin-top: 10px;                              /* −6 below the logo row */
  }

  /* Move the scroll cue to the bottom-right so it never collides with the
     title-box at the bottom-left, regardless of how wide the box gets. */
  .scroll-cue {
    left: auto;
    right: 16px;
    transform: none;
    animation-name: bob-vertical;
  }

  body {
    background-size: cover !important;
    background-position: center center !important;
  }
}

@keyframes bob-vertical {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Subtle pulse around the collapsed title-box on mobile to hint it's tappable.
   Stops after the user has interacted (body.has-interacted) and respects
   reduced-motion preferences. */
@keyframes titleBoxPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.32); }
  70%  { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes chevronNudgeLeft {
  0%, 100% { transform: translate(0, -50%); }
  50%      { transform: translate(-8px, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .title-box.collapsed { animation: none !important; }
  .title-box.collapsed::after { animation: none !important; }
}

.noscript-fallback {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  z-index: 5000;
  background: #1b202c;
}
