﻿/* ==========================================================================
   Shared Fantasy Frames
   ========================================================================== */

#works,
#craft {
  background:
    radial-gradient(circle at 18% 10%, rgba(202,154,71,.12), transparent 26%),
    radial-gradient(circle at 82% 2%, rgba(83,126,142,.1), transparent 28%),
    linear-gradient(135deg, rgba(8,12,15,.98), rgba(17,24,28,.96)),
    url("../generated/world-map-ui-texture.png") center / cover no-repeat;
}

#works .section-inner,
#craft .section-inner {
  position: relative;
  border: 1px solid rgba(191, 143, 57, .28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12,18,22,.92), rgba(9,13,17,.94)),
    url("../generated/document-portal-tiles.png") center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  overflow: hidden;
}

#works .section-inner::after,
#craft .section-inner::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(211, 160, 70, .18);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

.career-overview,
#works .section-inner,
#craft .section-inner,
.project-panels,
.project-visual,
.stage-workbench {
  position: relative;
}

.career-overview::before,
#works .section-inner::before,
#craft .section-inner::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  background-image: var(--frame-corners-large);
  background-repeat: var(--frame-corner-repeat);
  background-position: var(--frame-corner-position);
  background-size: 34px 34px, 34px 34px, 34px 34px, 34px 34px;
  opacity: .56;
}

.career-overview::before {
  inset: -1px;
  opacity: .52;
}

.project-visual::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  background-image: var(--frame-corners-small);
  background-repeat: var(--frame-corner-repeat);
  background-position: var(--frame-corner-position);
  background-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px;
  opacity: .74;
  transition: opacity 160ms ease, filter 160ms ease;
}

.project-panels::before,
.stage-workbench::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(211, 160, 70, .18);
  border-radius: 4px;
  pointer-events: none;
  z-index: 4;
}

.project-visual:hover::before,
.project-visual:focus-visible::before,
.project-visual.is-active::before {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(241, 199, 91, .36));
}

#works .section-head,
#craft .section-head,
#works .work-subnav,
#works .work-panel,
#craft .function-summary-strip,
#craft .stage-workbench {
  position: relative;
  z-index: 2;
}

#works .section-head h2,
#craft .section-head h2 {
  color: #f2d28a;
  text-shadow: 0 0 22px rgba(207, 154, 64, .18);
}

#works .section-head p,
#craft .section-head p {
  color: rgba(232, 223, 201, .78);
}

#works .section-head,
#craft .section-head,
#works .work-subnav,
#works .work-panel,
#craft .function-summary-strip,
#craft .stage-workbench {
  margin-left: 22px;
  margin-right: 22px;
}

/* ==========================================================================
   Section Head And Work Navigation
   ========================================================================== */

.section-head {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 0.55fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 34px;
}


.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.18;
}


.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.2;
}

.work-function-layout {
  padding-top: 52px;
  padding-bottom: 86px;
}

.function-detail-layout {
  padding-top: 38px;
  padding-bottom: 58px;
}

.compact-head {
  margin-bottom: 16px;
}

.function-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.function-summary-strip > div {
  border: 1px solid rgba(199, 148, 63, .22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18,25,29,.9), rgba(10,15,18,.94)),
    url("../generated/world-map-ui-texture.png") center / 210% auto no-repeat;
  padding: 14px;
  min-height: 108px;
  box-shadow: inset 0 0 0 1px rgba(255,241,187,.08), 0 14px 30px rgba(0,0,0,.28);
}

.function-summary-strip b {
  display: block;
  color: #f1c75b;
  font-size: 12px;
  margin-bottom: 7px;
}

.function-summary-strip p {
  margin: 0;
  color: rgba(232, 223, 201, .74);
  font-size: 13px;
  line-height: 1.55;
}

/* ==========================================================================
   Production Flow
   ========================================================================== */

.stage-workbench {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  min-height: 470px;
  border: 1px solid rgba(199,148,63,.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(9,15,19,.74), rgba(6,10,13,.82));
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,230,160,.06);
}

.stage-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-content: start;
  padding-left: 18px;
}

.stage-tabs::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 9px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent) 10%, var(--accent) 90%, transparent);
  opacity: .42;
}

.stage-tab {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid rgba(199,148,63,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  color: rgba(232,223,201,.72);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.stage-tab::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -9px;
  width: 9px;
  height: 1px;
  background: var(--accent);
  opacity: .42;
}

.stage-tab::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 5px;
  pointer-events: none;
  opacity: .56;
  background:
    linear-gradient(#d9a84b, #d9a84b) left top / 12px 1px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) left top / 1px 12px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) right top / 12px 1px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) right top / 1px 12px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) left bottom / 12px 1px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) left bottom / 1px 12px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) right bottom / 12px 1px no-repeat,
    linear-gradient(#d9a84b, #d9a84b) right bottom / 1px 12px no-repeat;
  transition: opacity 160ms ease, filter 160ms ease;
}

.stage-tab:hover::after,
.stage-tab:focus-visible::after,
.stage-tab.is-active::after {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(241, 199, 91, .34));
}

.stage-tab b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(241,199,91,.38);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: #f1c75b;
  font-size: 12px;
}

.stage-tab span {
  color: rgba(255,248,229,.88);
  font-size: 14px;
  font-weight: 800;
}

.stage-tab.is-active {
  border-color: rgba(241,199,91,.58);
  background: rgba(18,25,29,.94);
  box-shadow: 0 14px 28px rgba(0,0,0,.26);
}

.stage-tab.is-active b {
  border-color: #b9893e;
  background: #b9893e;
}

.stage-tab.is-active span,
.stage-tab.is-active b {
  color: #fff;
}

.stage-panels {
  min-width: 0;
  border: 1px solid rgba(199,148,63,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18,25,29,.92), rgba(10,15,18,.94)),
    url("../generated/document-portal-tiles.png") center / cover no-repeat;
  padding: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,241,187,.08);
}

.stage-panel {
  display: none;
}

.stage-panel.is-active {
  display: block;
}

.stage-panel-head {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.stage-panel-head > b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #b9893e;
  color: #fff;
  font-size: 14px;
}

.stage-panel h3 {
  margin: 0 0 5px;
  font-size: 28px;
  line-height: 1.15;
  color: #f2d28a;
}

.stage-panel-head p,
.stage-plain {
  margin: 0;
  color: rgba(232, 223, 201, .76);
  line-height: 1.65;
}

.stage-plain {
  border-top: 1px solid rgba(199,148,63,.2);
  border-bottom: 1px solid rgba(199,148,63,.2);
  padding: 13px 0;
  margin-bottom: 16px;
  color: rgba(255,248,229,.9);
  font-weight: 700;
}

.stage-detail-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 26px;
}

.stage-detail-grid h4 {
  margin: 0 0 8px;
  color: #f1c75b;
  font-size: 13px;
}

.stage-detail-grid p,
.stage-detail-grid li {
  color: rgba(232, 223, 201, .74);
  font-size: 14px;
  line-height: 1.65;
}

.stage-detail-grid p {
  margin: 0 0 14px;
}

.stage-detail-grid ul {
  margin: 0;
  padding-left: 18px;
}

.stage-detail-grid li + li {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .function-summary-strip,
  .stage-workbench,
  .stage-detail-grid {
    grid-template-columns: 1fr;
  }

  .stage-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  .stage-tabs::before,
  .stage-tab::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .stage-tabs {
    grid-template-columns: 1fr;
  }
}

