/* ==========================================================================
   Orchid Island digital brochure - shared styles
   Page layouts live in css/<page>.css
   ========================================================================== */

/* Fonts ------------------------------------------------------------------ */
@font-face {
  font-family: 'Cormorant SemiBold';
  src: url("fonts/cormorant-semibold.31f58c72ca31.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Tokens ----------------------------------------------------------------- */
:root {
  --bar-height: 57px;
  --bar-bg: rgba(0, 0, 0, 0.63);
  --bar-divider: rgba(0, 0, 0, 0.1);
  --control-bg: rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.35, 0, 0.25, 1);
  --ui-font: Arial, Helvetica, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #fff;
  color: rgb(51, 51, 51);
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body.index-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img {
  border: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 73px;
  left: -500px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--bar-bg);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

/* Sections, rows and columns --------------------------------------------- */
.sec {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 50px;
  overflow: hidden;
}

.sec-wrap {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
}

.row {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  column-gap: 24px;
  width: 100%;
  min-height: 50px;
}

.col {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.col > :not(.bg):not(.video-bg) {
  position: relative;
  z-index: 1;
}

/* Text */
:where(.col) > :where(p, h1, h2, h3, h4, h5, h6, blockquote, .text) {
  align-self: stretch;
}

:where(.col) :where(p, h1, h2, h3, h4, h5, h6, blockquote) {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

:where(.col) a {
  color: inherit;
}

/* Images */
.img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.img-link {
  display: block;
  max-width: 100%;
}

.img-link .img {
  width: 100%;
  margin: 0;
}

/* Inline video */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Background layers ------------------------------------------------------ */
.bg,
.video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
  pointer-events: none;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Background video with still-image fallback: the still shows until the
   player reports that it is actually playing. */
.video-bg {
  overflow: hidden;
  container-type: size;
  background-color: #000;
}

.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  border: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.video-bg.playing iframe {
  opacity: 1;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  margin: 0 0 0.55em;
  padding: 12px 20px;
  border-radius: 2px;
  background-color: rgb(64, 64, 64);
  color: #fff;
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.btn:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
}

/* Scroll-in animations (played once) -------------------------------------- */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}

.js .anim:not(.in) {
  opacity: 0;
}

.anim.in {
  animation-duration: 700ms;
  animation-timing-function: var(--ease);
  animation-fill-mode: both;
}

.anim.in.a-fadeIn { animation-name: fadeIn; animation-duration: 1400ms; }
.anim.in.a-fadeInUp { animation-name: fadeInUp; }
.anim.in.a-fadeInDown { animation-name: fadeInDown; }
.anim.in.a-fadeInLeft { animation-name: fadeInLeft; }
.anim.in.a-fadeInRight { animation-name: fadeInRight; }

@media (prefers-reduced-motion: reduce) {
  .js .anim:not(.in) {
    opacity: 1;
  }

  .anim.in {
    animation: none;
  }
}

/* Top bar ---------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: var(--bar-height);
  background: var(--bar-bg);
  color: #fff;
  font-family: var(--ui-font);
  font-size: 1rem;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-menu,
.topbar-volume {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 57px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.topbar-menu svg,
.topbar-volume svg {
  fill: currentColor;
}

.topbar-divider {
  align-self: stretch;
  width: 1px;
  background: var(--bar-divider);
}

.topbar-counter,
.topbar-title {
  padding: 0 10px;
  line-height: 32px;
  white-space: nowrap;
}

.topbar-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-logo {
  position: absolute;
  top: 6px;
  left: 50%;
  display: block;
  width: 131px;
  height: 45px;
  transform: translateX(-50%);
}

.topbar-logo img {
  display: block;
  width: 131px;
  height: 45px;
  object-fit: contain;
}

/* Previous / next -------------------------------------------------------- */
.prevnext {
  position: fixed;
  right: 30px;
  bottom: 60px;
  z-index: 40;
  display: flex;
}

.pn-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  background: var(--control-bg);
  color: #fff;
}

.pn-btn svg {
  fill: currentColor;
}

.pn-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Scroll-down hint (full-screen heroes, desktop only) ---------------------- */
.scroll-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--control-bg);
  color: #fff;
  cursor: pointer;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.scroll-hint svg {
  fill: currentColor;
}

.scroll-hint.is-gone {
  opacity: 0;
  pointer-events: none;
}

/* Page index (menu) ------------------------------------------------------ */
.page-index {
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow-y: auto;
  background: #fff;
  font-family: var(--ui-font);
}

.index-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  height: 57px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

.index-tab {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  border-bottom: 4px solid #000;
  color: #000;
  font-size: 16px;
}

.index-close {
  position: absolute;
  top: 15px;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.54);
  cursor: pointer;
}

.index-close svg {
  fill: currentColor;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.index-tile {
  position: relative;
  display: block;
  height: 0;
  padding-bottom: 67%;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.index-thumb,
.index-shade,
.index-label {
  position: absolute;
  inset: 0;
}

.index-thumb {
  background-position: 50% 0;
  background-size: cover;
  transform: scale(1.05);
}

.index-shade {
  background-image: linear-gradient(rgba(0, 0, 0, 0) 180px, rgba(0, 0, 0, 0.8) 100%);
}

.index-label {
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  transition: background-color 0.3s ease;
}

.index-tile:hover .index-label,
.index-tile:focus-visible .index-label,
.index-tile.is-current .index-label {
  background: transparent;
}

.index-name {
  display: inline-block;
  padding: 5px;
  font-size: 15px;
  font-weight: 700;
  line-height: 23px;
}

.is-current .index-name {
  padding: 7px 10px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  line-height: 18px;
}

.thumb-1 { background-image: url("images/thumbs/page-1.jpg"); }
.thumb-2 { background-image: url("images/thumbs/page-2.jpg"); }
.thumb-3 { background-image: url("images/thumbs/page-3.jpg"); }
.thumb-4 { background-image: url("images/thumbs/page-4.jpg"); }
.thumb-5 { background-image: url("images/thumbs/page-5.jpg"); }
.thumb-6 { background-image: url("images/thumbs/page-6.jpg"); }
.thumb-7 { background-image: url("images/thumbs/page-7.jpg"); }
.thumb-8 { background-image: url("images/thumbs/page-8.jpg"); }

/* Breakpoints ------------------------------------------------------------ */
@media (min-width: 1680px) {
  .index-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 999px) {
  .row {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 749px) {
  .topbar-menu {
    width: 38px;
  }

  .topbar-title,
  .topbar-title + .topbar-divider {
    display: none;
  }

  .topbar-counter + .topbar-divider {
    display: none;
  }

  .topbar-right {
    width: 20px;
  }

  .topbar-volume {
    display: none;
  }

  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
