/* Collection page template (/collections/<slug>/) —
   from design/Collection-SacredBluePortals.dc.html and Collection-UnderwaterForests.dc.html */

/* ---------- Hero ---------- */
.c-hero {
  position: relative; min-height: clamp(460px, 42vw, 620px); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; background: var(--cobalt-2);
}
.c-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 58, 0.25) 0%, rgba(6, 20, 58, 0.1) 35%, rgba(6, 20, 58, 0.9) 100%); }
.c-hero__inner {
  position: relative; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 5vw, 72px);
  display: flex; flex-direction: column; gap: 14px;
}
.crumbs { font-size: 13px; letter-spacing: 0.08em; color: var(--blue-soft); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-soft); transition: color .25s ease-out; }
.crumbs a:hover { color: var(--gold); }
.c-hero__eyebrow { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 26px; }
.c-hero__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(50px, 6.6vw, 96px); line-height: 0.98; text-wrap: balance; }
.c-hero__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.c-hero__desc { margin: 0; max-width: 600px; font-size: 18px; color: #E4EBF7; }
.c-hero__count { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* Cover crops from the catalog (`cover.position`) */
.obj-68-50 { object-position: 68% 50%; }
.obj-60-50 { object-position: 60% 50%; }

/* ---------- Ways to bring it home ---------- */
.ways { padding: clamp(32px, 4vw, 56px) var(--gutter) 0; }
.ways__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  border: 1px solid rgba(212, 178, 106, 0.3); border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, 0.03);
}
.way { display: flex; flex-direction: column; gap: 6px; padding: 26px 30px; border-right: 1px solid rgba(212, 178, 106, 0.2); }
.way:last-child { border-right: 0; }
@media (max-width: 960px) {
  .way { border-right: 0; border-bottom: 1px solid rgba(212, 178, 106, 0.2); }
  .way:last-child { border-bottom: 0; }
}
.way__title { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.way__text { font-size: 15px; color: var(--blue-soft); }
.way__price { font-size: 14px; color: var(--gold); }
.way__price.link-gold { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; margin: -10px 0; }
.ways__more { max-width: var(--max); margin: 14px auto 0; font-size: 14px; }
.ways__more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-soft); transition: color .25s ease-out; }
.ways__more a:hover { color: var(--gold); }

/* ---------- The works ---------- */
.works { padding: clamp(44px, 5vw, 72px) var(--gutter) clamp(80px, 9vw, 130px); }
.works__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.works__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.works__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; }
.price-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.price-mode[hidden] { display: none; }
.price-mode__label { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-muted); }
.works__note { margin: -10px 0 0; font-size: 15px; color: var(--blue-soft); }
.works__note[hidden] { display: none; }

.works__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 44px clamp(20px, 2.4vw, 30px); }
.works__grid > .empty { grid-column: 1 / -1; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 8px; }
.empty__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; }

.work { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.work__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-card); background: #050B1C; }
.work__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work__img img.is-contain { object-fit: contain; }
.work__img:focus-visible { outline-offset: 4px; }

.work__fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: -4px; }
.work__fmt-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #9FB0CC; }
.work__fmt .seg { padding: 3px; border-color: rgba(212, 178, 106, 0.4); background: transparent; }
.work__fmt .seg button { position: relative; min-height: 32px; padding: 0 14px; border-radius: 15px; font-size: 12px; letter-spacing: 0.06em; }
/* Extend the tap area to 44px without changing the look. */
.work__fmt .seg button::after { content: ""; position: absolute; inset: -6px 0; }

.work__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.work__title {
  align-self: flex-start; font-family: var(--serif); font-size: 25px; line-height: 1.15;
  color: var(--cream); text-decoration: none; transition: color .25s ease-out;
}
.work__title:hover { color: var(--gold); }
.work__price { font-size: 14px; color: var(--blue-muted); }
.work__action { flex: none; }
.work__action[hidden] { display: none; }

.add-license {
  min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid rgba(227, 192, 137, 0.8); background: transparent; color: var(--cream);
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; cursor: pointer;
  transition: background-color .25s ease-out, border-color .25s ease-out;
}
.add-license:hover { background: rgba(227, 192, 137, 0.14); border-color: var(--gold); }

.stepper {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px;
  border-radius: 22px; background: var(--cream); color: var(--navy);
}
.stepper button {
  position: relative; width: 36px; height: 36px; padding: 0; border-radius: 18px; border: 0;
  background: transparent; color: var(--navy); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease-out;
}
.stepper button::after { content: ""; position: absolute; inset: -4px; }
.stepper button:hover { background: rgba(6, 20, 58, 0.1); }
.stepper button:focus-visible { outline-color: var(--navy); outline-offset: 1px; }
.stepper__n { min-width: 22px; text-align: center; font-size: 15px; font-weight: 500; }

/* ---------- More collections ---------- */
.more-cols { padding: clamp(72px, 8vw, 120px) var(--gutter); background: var(--navy-deep); }
.more-cols__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.more-cols__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.more-cols__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.mini-col { display: flex; flex-direction: column; gap: 12px; color: var(--cream); text-decoration: none; }
.mini-col__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-card); background: var(--cobalt-2); }
.mini-col__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini-col__name { font-family: var(--serif); font-size: 25px; line-height: 1.2; transition: color .25s ease-out; }
.mini-col:hover .mini-col__name { color: var(--gold); }
.mini-col:focus-visible { outline-offset: 6px; border-radius: var(--radius-card); }

.rr-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 30px;
  margin-top: 12px; padding: 24px 30px; border-radius: 16px;
  border: 1px solid rgba(212, 178, 106, 0.4); background: rgba(255, 255, 255, 0.04);
  color: var(--cream); text-decoration: none; transition: border-color .3s ease-out, background-color .3s ease-out;
}
.rr-banner[hidden] { display: none; }
.rr-banner:hover { border-color: var(--gold); background: rgba(227, 192, 137, 0.08); }
.rr-banner__text { display: flex; flex-direction: column; gap: 2px; }
.rr-banner__kicker { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.rr-banner__title { font-family: var(--serif); font-size: 30px; }
.rr-banner__cta { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Sticky license tray ---------- */
.tray {
  position: sticky; bottom: 0; z-index: 10;
  padding: 14px clamp(16px, 4vw, 56px);
  background: var(--navy-glass); border-top: 1px solid rgba(212, 178, 106, 0.5);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
  animation: trayIn .25s ease-out;
}
.tray[hidden] { display: none; }
@keyframes trayIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tray__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.tray__summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.tray__count { font-family: var(--serif); font-size: 26px; }
.tray__rate { font-size: 15px; color: var(--blue-soft); }
.tray__total { font-size: 15px; color: var(--gold); }
.tray__total:empty { display: none; }
.tray__total a { color: var(--gold); transition: color .25s ease-out; }
.tray__total a:hover { color: #F6E2B8; }
.tray__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.tray__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--blue-soft); transition: color .25s ease-out; }
.tray__link:hover { color: var(--gold); }
.tray .btn { min-height: 48px; padding: 0 26px; }
@media (max-width: 560px) {
  .tray { padding: 10px 16px; }
  .tray__inner { gap: 6px 16px; }
  .tray__summary { gap: 0 12px; }
  .tray__count { font-size: 22px; }
  .tray__rate, .tray__total { font-size: 14px; }
  .tray__actions { width: 100%; justify-content: space-between; gap: 4px 12px; }
  .tray .btn { min-height: 44px; padding: 0 20px; }
}

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

/* Guardians: the banner uses the wide white-sand manatee (the tall cover can't fill a wide banner) */
[data-collection="guardians-of-the-springs"] .c-hero__img { object-position: 50% 60%; }
/* The Deep Blue: Ocean Veins hero, centered so the surface, horizon and sand ripples all show */
[data-collection="the-deep-blue"] .c-hero__img { object-position: 50% 45%; }
