/* Shared surfaces for the portal and its editorial pages. */
:root {
  --panel-edge:var(--stone-edge);
  --panel-quiet:var(--stone-panel);
  --selected-gold:var(--stone-highlight);
  --home-route-width:min(3240px,calc(100% - clamp(64px,6vw,240px)));
  --home-footer-bg:#1b1a18;
}
.landing {
  --scene-position: 62% center;
  position:relative;
  isolation:isolate;
  display:grid;
  align-items:center;
  min-height:clamp(490px,calc(94svh - 69px),820px);
  overflow:hidden;
  background:var(--stone-deep);
}
.landing-art,.landing-art img,.landing::before {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.landing-art { z-index:-2; }
.landing-art img {
  object-fit:cover;
  object-position:var(--scene-position);
}
.image-loading .landing-art img[data-image] { transition:none; }
.landing::before {
  z-index:-1;
  background:linear-gradient(90deg,#171615f5 0%,#171615c2 19%,#17161560 39%,transparent 65%),
    linear-gradient(0deg,var(--stone-deep),#17161580 14%,transparent 38%);
  content:"";
}
.landing > .wrap { width:min(clamp(1500px,62vw,2200px),calc(100% - 64px)); }
.landing-content { padding-block:clamp(24px,7svh,72px); }
.landing-content .eyebrow { color:#ffdfad; letter-spacing:.12em; }
.landing h1 {
  margin:9px 0 12px;
  font-size:clamp(64px,7.2vw,118px);
  line-height:1.09;
  letter-spacing:.025em;
  text-shadow:0 4px var(--stone-shadow),0 14px 28px #100f0e99;
  overflow-wrap:anywhere;
}
.landing-intro {
  margin-bottom:23px;
  color:var(--stone-ink);
  font-size:clamp(16px,1.5vw,21px);
  line-height:1.7;
}
.landing .button { min-height:48px; }
.landing .landing-play { min-height:54px; padding-inline:23px; font-size:17px; }
.landing-links { display:flex; flex-wrap:wrap; gap:0 20px; margin-top:8px; }
.landing-links .action-link { min-height:44px; }
@media (min-width:1774px) {
  .landing-art {
    inset-inline:auto max(0px,calc((100% - 2520px) / 2));
    width:min(2050px,78%);
    mask-image:linear-gradient(90deg,transparent,#000 15%,#000 90%,transparent);
  }
  .landing::before {
    background:linear-gradient(90deg,#171615fa,#17161550 49%,transparent 69%),
      linear-gradient(0deg,var(--stone-deep),#17161570 14%,transparent 40%);
  }
}
@media (max-width:760px) and (orientation:portrait) {
  .landing { --hero-art-height:clamp(245px,95vw,520px); --scene-position:center 36%; display:block; min-height:0; }
  .landing-art,.landing::before { height:var(--hero-art-height); }
  .landing::before {
    background:linear-gradient(0deg,var(--stone-deep),#171615c9 19%,#17161528 52%,transparent 65%);
  }
  .landing-content { padding-block:calc(var(--hero-art-height) - 76px) 20px; }
}
@media (max-width:940px) and (orientation:landscape) {
  .landing { min-height:clamp(305px,calc(100svh - 59px),530px); }
}
@media (max-width:760px) {
  :root { --home-route-width:calc(100% - 32px); }
  .landing > .wrap { width:var(--home-route-width); }
  .landing h1 { font-size:clamp(45px,11.5vw,76px); margin-bottom:8px; }
  .landing-intro { margin-bottom:15px; }
}

.world-route {
  padding-block:clamp(22px,4vw,56px) 0;
  background:linear-gradient(var(--stone-deep) 35%,var(--home-footer-bg));
}
.world-route > .wrap { width:var(--home-route-width); }
.world-route,.world-scene { scroll-margin-top:82px; }
.world-route-header {
  display:flex;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px 20px;
  margin-bottom:clamp(12px,1.25vw,28px);
}
.world-route h2 { margin:0; font-size:clamp(27px,3.4vw,52px); line-height:1.18; }
.world-route-header nav { display:flex; flex-wrap:wrap; column-gap:clamp(11px,2vw,26px); }
.world-route-header a {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  color:var(--stone-muted);
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
}
.world-route-header a:hover,.world-down { color:var(--stone-highlight); }
.world-scenes { border-top:1px solid var(--stone-edge); }
.world-scene {
  --scene-surface:#211f1b;
  --scene-art-width:min(58%,1254px);
  --scene-blend:90deg;
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(0,1fr) var(--scene-art-width);
  align-items:center;
  min-width:0;
  background:var(--scene-surface);
}
.world-scene + .world-scene { border-top:1px solid var(--stone-edge); }
.world-scene:nth-child(even) { --scene-surface:#29241f; --scene-blend:270deg; }
.world-scene:last-child { --scene-surface:var(--home-footer-bg); }
.world-scene-copy {
  z-index:1;
  min-width:0;
  padding:clamp(20px,3.8vw,110px);
}
.world-scene h3 { margin:0; font-size:clamp(24px,2.7vw,53px); line-height:1.2; text-wrap:balance; }
.world-scene-details > p { max-width:26em; margin:12px 0 0; color:var(--stone-muted); line-height:1.74; }
.world-scene-label { display:flex; align-items:center; gap:9px; margin:0 0 9px; color:var(--stone-highlight); font-size:13px; font-weight:750; }
.world-scene-label .pixel { width:25px; height:25px; }
.world-scene-copy .action-link { margin-top:8px; min-height:44px; }
.world-scene .media-frame { position:relative; display:block; width:100%; min-width:0; aspect-ratio:2.45; max-height:418px; overflow:hidden; }
.world-scene .media-frame::after {
  position:absolute;
  inset:0;
  background:linear-gradient(var(--scene-blend),var(--scene-surface),transparent 22%);
  pointer-events:none;
  content:"";
}
.world-scene:last-child .media-frame::after {
  background:linear-gradient(0deg,var(--scene-surface),transparent 28%),
    linear-gradient(var(--scene-blend),var(--scene-surface),transparent 22%);
}
.world-scene img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
@media (min-width:761px) {
  .world-scene:nth-child(even) { grid-template-columns:var(--scene-art-width) minmax(0,1fr); }
  .world-scene:nth-child(even) .media-frame { grid-area:1 / 1; }
}
@media (min-width:2200px) {
  .world-scene-copy {
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    align-items:center;
    gap:clamp(35px,4vw,110px);
    min-height:320px;
  }
  .world-scene-details > p { margin:0; font-size:clamp(16px,.52vw,20px); }
}
@media (max-width:760px) {
  .world-route-header { display:block; }
  .world-route-header nav { margin-top:8px; font-size:14px; }
  .world-scene { grid-template-columns:minmax(0,1fr); }
  .world-scene .media-frame { grid-row:1; aspect-ratio:2.25; }
  .world-scene .media-frame::after,.world-scene:last-child .media-frame::after {
    background:linear-gradient(0deg,var(--scene-surface),transparent 26%);
  }
  .world-scene-copy { padding:12px 17px 15px; }
  .world-scene-details > p { margin-top:8px; }
}
@media (prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine) and (min-width:761px) {
  .landing-content { animation:world-arrival .43s ease-out both; }
  .world-scene-entered .world-scene-heading { animation:world-arrival .32s ease-out both; }
  @keyframes world-arrival {
    from { opacity:.65; transform:translateY(8px); }
    to { opacity:1; transform:translateY(0); }
  }
}
@supports (animation-timeline:scroll()) {
  @media (prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine) and (min-width:900px) and (max-width:2559px) {
    .landing-art img {
      height:calc(100% + 24px);
      animation:world-art-depth linear both;
      animation-timeline:scroll(root block);
      animation-range:0px 80vh;
    }
    @keyframes world-art-depth {
      from { transform:translateY(-24px); }
      to { transform:translateY(0); }
    }
  }
}

.mast.join-mast,.mast.editorial-mast {
  background-image:linear-gradient(90deg,#171615fa,#171615db 47%,#17161535),
    url('/assets/art/event-sorting-workshop.webp');
  background-position:center, 73% 55%;
  background-size:cover;
}
.mast.events-mast {
  background-image:linear-gradient(90deg,#1c1b19 9%,#1c1b19e3 49%,#1c1b1957),
    url('/assets/art/event-drift-fishing.webp');
  background-position:center, center 47%;
  background-size:cover;
}
.events-content,.join-content { width:min(1410px,calc(100% - 64px)); }
@media (max-width:760px) {
  .events-content,.join-content { width:calc(100% - 32px); }
}
.join-layout .join-steps {
  background:var(--stone-base);
  border-inline:0;
  border-top:2px solid var(--stone-light);
}
.join-layout .join-install { border-top:2px solid var(--stone-highlight); }
.event-library .media-card:nth-child(3) .media-frame { background:#282821; }

.timeline-top {
  background:linear-gradient(110deg,var(--stone-raised),var(--stone-base) 75%);
  border-color:var(--panel-edge);
  padding-block:clamp(17px,2.6vw,34px) 13px;
}
.timeline-main > .timeline-empty { text-align:center; padding-block:clamp(38px,7vw,80px); }
.timeline-main > .timeline-empty::before {
  display:block;
  width:40px;
  height:40px;
  margin:0 auto 12px;
  background:url('/assets/icons/chest.png') center / contain no-repeat;
  image-rendering:pixelated;
  content:"";
}
.account-heading {
  background:var(--stone-base);
  border-block-end:1px solid var(--panel-edge);
  min-height:74px;
  padding:clamp(12px,2vw,24px) clamp(10px,1.5vw,19px);
}
.account-layout-with-lead .account-heading { margin-bottom:0; }

@media(max-width:680px) {
  .mast.join-mast,.mast.editorial-mast {
    background-image:linear-gradient(90deg,#171615f5,#171615d2 59%,#1716157a),url('/assets/art/event-sorting-workshop.webp');
  }
  .mast.events-mast {
    background-image:linear-gradient(90deg,#171615fa,#171615d0 64%,#17161574),url('/assets/art/event-drift-fishing.webp');
  }
}

.mast:is(.join-mast,.events-mast,.editorial-mast) {
  padding-block:clamp(25px,4vw,55px);
  border-color:var(--panel-edge);
}
.event-library .card-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(16px,2.5vw,32px);
}
.event-library h2 { font-size:clamp(21px,3vw,32px); }
.event-library .media-card {
  border-color:var(--panel-edge);
  background:var(--panel-quiet);
}
.event-library .media-card img { aspect-ratio:2.9; }
.event-library .media-card .media-frame { position:relative; display:block; }
.event-library .media-card .media-frame::after {
  position:absolute;
  inset:0;
  background:linear-gradient(0deg,var(--stone-panel),transparent 22%);
  pointer-events:none;
  content:"";
}
.event-library .media-copy { padding:clamp(15px,2.3vw,27px); }
.event-library .media-copy .meta { margin-bottom:7px; color:#d3b887; }
.event-library .media-copy p { color:var(--stone-muted); }
.event-library .media-card a:is(:hover,:focus-visible) .card-more { color:var(--selected-gold); text-decoration:none; }
@media (min-width:681px) {
  .event-library .media-card:first-child { grid-column:1/-1; }
  .event-library .media-card:first-child > a {
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
    align-items:center;
  }
  .event-library .media-card:first-child .media-frame {
    display:block;
    align-self:stretch;
  }
  .event-library .media-card:first-child .media-frame img { height:100%; }
  .event-library .media-card:first-child .media-frame::after {
    background:linear-gradient(270deg,var(--stone-panel),transparent 25%);
  }
  .event-library .media-card:first-child h3 { font-size:clamp(22px,3.3vw,38px); }
}
@media (max-width:680px) {
  .event-library .card-grid { grid-template-columns:minmax(0,1fr); }
}

.timeline-title { min-height:48px; }
.timeline-main { border-color:var(--panel-edge); }
.rail-nav a[aria-current],.account-rail nav a[aria-current] {
  background:var(--stone-raised);
  color:#ffe3ab;
}
.rail-nav a[aria-current] { border-left-color:var(--selected-gold); }
.account-rail nav a[aria-current] { box-shadow:inset 3px 0 var(--selected-gold); }
.timeline-tabs a[aria-current]::after { background:var(--selected-gold); }
.timeline-search,.discover-section {
  background:var(--panel-quiet);
  border-color:var(--panel-edge);
}
.timeline-search:focus-within { outline:1px solid var(--selected-gold); outline-offset:2px; }
.discover-section { padding:12px 0 4px; border:0; border-top:1px solid var(--panel-edge); background:none; }
.discover-section h2 { color:var(--stone-ink); }
.discover-link:hover strong { color:var(--selected-gold); text-decoration:none; }
.discover-link small { color:var(--stone-muted); }

.account-panel,.account-rail { border-color:var(--panel-edge); }
.account-panel,.account-rail { background:var(--panel-quiet); }
.account-panel h2 { letter-spacing:-.025em; line-height:1.35; }

.site-search-heading {
  padding-block:clamp(12px,3vw,32px) 0;
  border-bottom:1px solid var(--panel-edge);
}
.site-search-heading h1 { font-size:clamp(26px,4vw,39px); line-height:1.24; }
.site-search-tabs { border-bottom:0; }
.site-search-tabs a[aria-current] { border-color:var(--selected-gold); color:#fff1d6; }
.site-search-group { border-color:var(--panel-edge); }
.site-search-group > header { background:var(--panel-quiet); }

@media (max-width:850px) {
  .timeline-top { padding-top:13px; }
  .has-timeline-heading .timeline-rail,.has-timeline-heading .timeline-discovery { border-color:var(--panel-edge); }
  .rail-nav a[aria-current] { border-color:#5a5142; }
}
