/* 8WEST Anime Ward - Childhood Archive Banner */

#awc-outer,
#awc-outer * {
  box-sizing: border-box;
}

#awc-outer {
  --awc-bg: #1c1c1c;
  --awc-cream: #e0d2b7;
  --awc-green: #586645;
  --awc-red: #7B2020;

  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-right: -50vw;
  margin-left: -50vw;
  background: #1c1c1c;
  overflow: hidden;
}

#awc-banner {
  position: relative;
  display: grid;
  width: 100%;
  min-height: clamp(390px, 39vw, 580px);
  overflow: hidden;
  color: #e0d2b7;
  background: #1c1c1c;
  isolation: isolate;
}

#awc-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
}

#awc-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(224, 210, 183, 0.012) 3px,
      rgba(224, 210, 183, 0.012) 4px
    );
}

.awc-depth {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 90% at 20% 50%, rgba(88, 102, 69, 0.14), transparent 62%),
    radial-gradient(ellipse 52% 80% at 82% 47%, rgba(123, 32, 32, 0.15), transparent 68%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), transparent 38%, rgba(0, 0, 0, 0.68));
}

.awc-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.95), transparent 22%, transparent 76%, rgba(28, 28, 28, 0.95)),
    radial-gradient(ellipse at center, transparent 18%, rgba(28, 28, 28, 0.66) 100%);
}

.awc-flicker {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: rgba(123, 32, 32, 0);
  animation: awcSlowFlicker 16s ease-in-out infinite;
}

@keyframes awcSlowFlicker {
  0%,
  100% {
    opacity: 1;
    background: rgba(123, 32, 32, 0);
  }
  28% {
    opacity: 0.92;
    background: rgba(123, 32, 32, 0.018);
  }
  52% {
    opacity: 1;
    background: rgba(88, 102, 69, 0.012);
  }
  76% {
    opacity: 0.95;
    background: rgba(123, 32, 32, 0.012);
  }
}

.awc-memory-wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.awc-memory {
  position: absolute;
  display: block;
  width: auto;
  max-width: none;
  object-fit: contain;
  opacity: 0;
  filter: grayscale(1) sepia(0.25) brightness(0.58) contrast(1.15);
  mix-blend-mode: luminosity;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.awc-memory.is-loaded {
  opacity: 0.18;
}

.awc-memory-left {
  left: -3%;
  bottom: -10%;
  height: 105%;
}

.awc-memory-mid {
  left: 50%;
  bottom: -13%;
  height: 110%;
  transform: translateX(-50%);
}

.awc-memory-mid.is-loaded {
  opacity: 0.12;
}

.awc-memory-right {
  right: -2%;
  bottom: -10%;
  height: 105%;
  transform: scaleX(-1);
}

.awc-frame-line {
  position: absolute;
  left: 4vw;
  right: 4vw;
  z-index: 7;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(224, 210, 183, 0.24), transparent);
}

.awc-frame-top {
  top: 8%;
}

.awc-frame-bottom {
  bottom: 8%;
}

.awc-frame-accent {
  position: absolute;
  top: 10%;
  left: 12vw;
  right: 12vw;
  z-index: 7;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(88, 102, 69, 0.44), transparent);
}

.awc-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  width: min(1220px, calc(100vw - 48px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 76px) 0;
}

.awc-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.awc-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: clamp(12px, 1.7vw, 18px);
  color: rgba(224, 210, 183, 0.58);
  font-family: "Courier New", monospace;
  font-size: clamp(0.68rem, 0.9vw, 0.82rem);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.awc-kicker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #586645;
  opacity: 0.85;
}

.awc-title {
  margin: 0;
  color: #e0d2b7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
  font-weight: 400;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow:
    0 0 36px rgba(224, 210, 183, 0.07),
    0 0 90px rgba(123, 32, 32, 0.06);
}

.awc-title span {
  display: block;
}

.awc-title-soft {
  color: rgba(224, 210, 183, 0.7);
  font-size: 0.42em;
  line-height: 1.28;
}

.awc-message {
  max-width: 790px;
  margin: clamp(18px, 2vw, 28px) 0 0;
  color: #e0d2b7;
  font-size: clamp(1.35rem, 2.7vw, 2.55rem);
  font-weight: 700;
  line-height: 1.32;
  direction: rtl;
  text-align: right;
  text-wrap: balance;
}

.awc-message-rule {
  display: block;
  width: min(360px, 64vw);
  height: 1px;
  margin-top: clamp(16px, 2vw, 24px);
  background: linear-gradient(90deg, rgba(88, 102, 69, 0.72), transparent);
}

.awc-memory-line {
  position: relative;
  height: 1.45em;
  margin-top: clamp(14px, 1.8vw, 20px);
  color: rgba(224, 210, 183, 0.56);
  font-family: "Courier New", monospace;
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  line-height: 1.45;
  direction: rtl;
  text-align: right;
  overflow: hidden;
}

.awc-memory-line span {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 1s ease;
}

.awc-memory-line span.is-active {
  opacity: 1;
}

.awc-archive {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 20px);
  padding: clamp(20px, 2.4vw, 30px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(224, 210, 183, 0.045), rgba(224, 210, 183, 0.012)),
    rgba(28, 28, 28, 0.72);
  border: 1px solid rgba(224, 210, 183, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(88, 102, 69, 0.12),
    0 0 55px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(7px);
}

.awc-archive::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(88, 102, 69, 0.18);
}

.awc-archive-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(224, 210, 183, 0.58);
  font-family: "Courier New", monospace;
  font-size: clamp(0.68rem, 0.9vw, 0.82rem);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

.awc-archive-seal {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(123, 32, 32, 0.46);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(123, 32, 32, 0.11);
}

.awc-subject-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.awc-subject-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(224, 210, 183, 0.12);
}

.awc-subject-code {
  color: rgba(224, 210, 183, 0.42);
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.awc-subject-name {
  min-width: 0;
  color: #e0d2b7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.42rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.awc-subject-state {
  color: rgba(88, 102, 69, 0.92);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0;
}

.awc-archive-note {
  color: rgba(224, 210, 183, 0.54);
  font-family: "Courier New", monospace;
  font-size: clamp(0.72rem, 0.95vw, 0.86rem);
  line-height: 1.55;
  direction: rtl;
  text-align: right;
}

.awc-dust {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}

.awc-dust i {
  position: absolute;
  display: block;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(224, 210, 183, 0.38);
  opacity: 0;
  animation: awcDust 12s linear infinite;
}

.awc-dust i:nth-child(1) { left: 12%; top: 78%; animation-delay: 0s; }
.awc-dust i:nth-child(2) { left: 28%; top: 84%; animation-delay: 2s; }
.awc-dust i:nth-child(3) { left: 43%; top: 76%; animation-delay: 4s; }
.awc-dust i:nth-child(4) { left: 62%; top: 86%; animation-delay: 1s; }
.awc-dust i:nth-child(5) { left: 78%; top: 80%; animation-delay: 5s; }
.awc-dust i:nth-child(6) { left: 90%; top: 74%; animation-delay: 3s; }

@keyframes awcDust {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  18% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
    transform: translate3d(12px, -110px, 0);
  }
}

@media (max-width: 980px) {
  #awc-banner {
    min-height: clamp(330px, 48vw, 460px);
  }

  .awc-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: end;
    width: min(100%, calc(100vw - 32px));
    padding: 34px 0;
  }

  .awc-copy {
    max-width: 780px;
  }

  .awc-archive {
    max-width: 760px;
    padding: 18px;
  }

  .awc-subject-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .awc-subject-card {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(224, 210, 183, 0.12);
  }

  .awc-subject-state {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  #awc-banner {
    height: clamp(220px, 56.25vw, 280px);
    min-height: 0;
    aspect-ratio: auto;
  }

  .awc-memory-left {
    display: block;
    left: -5%;
    bottom: -8%;
    height: 100%;
  }

  .awc-memory-right {
    display: block;
    right: -5%;
    bottom: -8%;
    height: 100%;
  }

  .awc-memory-mid {
    left: 50%;
    right: auto;
    bottom: -10%;
    height: 105%;
    transform: translateX(-50%);
  }

  .awc-memory-mid.is-loaded {
    opacity: 0.12;
  }

  .awc-frame-top {
    top: 8px;
  }

  .awc-frame-bottom {
    bottom: 8px;
  }

  .awc-frame-accent,
  .awc-memory-line,
  .awc-archive-note,
  .awc-archive-seal {
    display: none;
  }

  .awc-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: min(100%, calc(100vw - 20px));
    height: 100%;
    padding: 14px 0;
  }

  .awc-copy {
    justify-content: center;
  }

  .awc-kicker {
    gap: 6px;
    margin-bottom: 5px;
    font-size: clamp(0.52rem, 2vw, 0.7rem);
  }

  .awc-kicker span:nth-of-type(2),
  .awc-kicker span:nth-of-type(3),
  .awc-kicker-dot:nth-of-type(2) {
    display: none;
  }

  .awc-title {
    font-size: clamp(1.65rem, 9vw, 2.55rem);
    line-height: 0.94;
  }

  .awc-title-soft {
    font-size: 0.48em;
    line-height: 1.1;
  }

  .awc-message {
    max-width: 92%;
    margin-top: 8px;
    font-size: clamp(0.86rem, 4.3vw, 1.18rem);
    line-height: 1.32;
  }

  .awc-message-rule {
    width: 54%;
    margin-top: 8px;
  }

  .awc-archive {
    gap: 7px;
    padding: 8px 10px;
    background: rgba(28, 28, 28, 0.58);
    border-color: rgba(224, 210, 183, 0.18);
    backdrop-filter: blur(5px);
  }

  .awc-archive::before {
    inset: 6px;
  }

  .awc-archive-top {
    font-size: 0.52rem;
  }

  .awc-subject-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .awc-subject-card {
    gap: 3px;
    padding: 5px;
  }

  .awc-subject-code,
  .awc-subject-state {
    font-size: 0.45rem;
  }

  .awc-subject-name {
    font-size: clamp(0.72rem, 3.4vw, 0.95rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .awc-flicker,
  .awc-dust i {
    animation: none;
  }

  .awc-memory,
  .awc-memory-line span {
    transition: none;
  }
}

/* Stability patch for EasyOrders containers.
   Keeps the banner cinematic without pushing content outside the viewport. */
#awc-outer {
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}

#awc-banner {
  width: 100% !important;
  max-width: 100% !important;
}

.awc-content {
  width: min(1220px, calc(100% - 48px)) !important;
  max-width: 100% !important;
}

.awc-copy,
.awc-archive,
.awc-title,
.awc-message {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (min-width: 981px) {
  #awc-banner {
    min-height: clamp(360px, 34vw, 520px) !important;
  }

  .awc-title {
    font-size: clamp(3rem, 6.4vw, 6.6rem) !important;
  }

  .awc-message {
    font-size: clamp(1.2rem, 2.1vw, 2.05rem) !important;
  }
}

@media (max-width: 640px) {
  #awc-banner {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9.8 !important;
  }

  .awc-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    gap: 6px !important;
    width: calc(100% - 18px) !important;
    height: 100% !important;
    padding: 10px 0 !important;
  }

  .awc-copy {
    display: flex !important;
    min-width: 0 !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .awc-kicker {
    margin-bottom: 4px !important;
    font-size: clamp(0.42rem, 1.7vw, 0.58rem) !important;
    line-height: 1.15 !important;
  }

  .awc-title {
    font-size: clamp(1.18rem, 6.7vw, 1.95rem) !important;
    line-height: 0.94 !important;
    overflow-wrap: normal !important;
  }

  .awc-title-soft {
    font-size: 0.42em !important;
    line-height: 1.05 !important;
  }

  .awc-message {
    max-width: 100% !important;
    margin-top: 6px !important;
    font-size: clamp(0.7rem, 3.25vw, 0.96rem) !important;
    line-height: 1.25 !important;
    text-align: right !important;
  }

  .awc-message-rule {
    width: 46% !important;
    margin-top: 6px !important;
  }

  .awc-archive {
    width: 100% !important;
    gap: 5px !important;
    padding: 6px 8px !important;
  }

  .awc-archive-top {
    font-size: 0.44rem !important;
    line-height: 1.1 !important;
  }

  .awc-subject-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .awc-subject-card {
    min-width: 0 !important;
    gap: 2px !important;
    padding: 4px !important;
  }

  .awc-subject-code,
  .awc-subject-state {
    font-size: 0.34rem !important;
    line-height: 1.05 !important;
  }

  .awc-subject-name {
    font-size: clamp(0.58rem, 2.9vw, 0.78rem) !important;
    line-height: 1 !important;
  }
}

@media (max-width: 380px) {
  #awc-banner {
    aspect-ratio: 16 / 10.4 !important;
  }

  .awc-content {
    width: calc(100% - 14px) !important;
    gap: 5px !important;
    padding: 8px 0 !important;
  }

  .awc-title {
    font-size: clamp(1.04rem, 6.4vw, 1.55rem) !important;
  }

  .awc-message {
    font-size: clamp(0.62rem, 3vw, 0.82rem) !important;
  }

  .awc-archive {
    padding: 5px 6px !important;
  }

  .awc-subject-code,
  .awc-subject-state {
    font-size: 0.3rem !important;
  }

  .awc-subject-name {
    font-size: clamp(0.5rem, 2.65vw, 0.66rem) !important;
  }
}
