.hero-band {
  --hero: #102f25;
  --champagne: #f3d68e;
  --hero-rule: #627565;
  background: var(--hero);
  color: var(--white-paper);
}

.hero h1 span { color: var(--champagne); }
.hero-copy p { color: #d7e4d8; }
.hero-actions .button-primary { color: #192f24; background: var(--champagne); }
.hero-actions .button-primary:hover { background: #ffe6a8; }
.hero-band :focus-visible { outline-color: var(--champagne); }

[hidden] { display: none !important; }

.desk {
  position: relative;
  min-width: 0;
  border: 1px solid var(--hero-rule);
  background: #183d30;
}

.desk-index {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hero-rule);
  color: #dae6d9;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.desk-view {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: clamp(360px, 33vw, 466px);
  overflow: hidden;
  background: radial-gradient(ellipse at 56% 37%, #32614a 0, #214636 58%, #183a2e 100%);
}

.desk-sun, .desk-shadow { position: absolute; pointer-events: none; }
.desk-sun { inset: 0; }
.desk-sun i {
  position: absolute;
  width: 67%;
  aspect-ratio: 1;
  left: 24%;
  top: 10%;
  border: 1px solid #af9c60;
  border-radius: 50%;
  opacity: .54;
}
.desk-sun i:nth-child(2) { width: 82%; left: 16%; top: 0; opacity: .37; }
.desk-sun i:nth-child(3) { width: 97%; left: 9%; top: -10%; opacity: .24; }
.desk-shadow {
  width: 78%;
  height: 31%;
  bottom: 11%;
  background: radial-gradient(ellipse, #061c14bf 0, transparent 69%);
  transform: rotate(-8deg);
}

.desk-projector { position: relative; width: min(76%, 476px); perspective: 1080px; }
.desk-tilt, .desk-object { transform-style: preserve-3d; }
.desk-object {
  --book-pitch: 17deg;
  --book-yaw: -15deg;
  --book-roll: -8deg;
  --book-depth: 14px;
  position: relative;
  transform: rotateX(var(--book-pitch)) rotateY(var(--book-yaw)) rotateZ(var(--book-roll));
}

.book-back, .book-fore-edge, .book-bottom { position: absolute; }
.book-back {
  inset: -3px -4px -5px;
  background: #867044;
  box-shadow: 1px 18px 34px #0006;
  transform: translateZ(calc(-1 * var(--book-depth)));
}
.book-fore-edge, .book-bottom {
  background: repeating-linear-gradient(#d3bd8f 0 2px, #eddfbe 2px 4px);
}
.book-fore-edge {
  width: var(--book-depth);
  height: 100%;
  left: 100%;
  transform-origin: left center;
  transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, #bda36f 0 2px, #e6d2ab 2px 4px);
}
.book-bottom {
  width: 100%;
  height: var(--book-depth);
  top: 100%;
  transform-origin: center top;
  transform: rotateX(-90deg);
}

.register {
  position: relative;
  padding: clamp(20px, 2.8vw, 37px);
  color: var(--ink);
  background: #fbf6e8;
  transform: translateZ(.1px);
}
.register-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid #637a65;
}
.register-head span, .register-foot {
  display: block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--muted);
}
.register-head strong { display: block; font: 400 clamp(1.55rem, 3.2vw, 2.85rem)/1.13 var(--display); letter-spacing: -.035em; }
.register-head img { height: auto; mix-blend-mode: multiply; }
.register-lines > div {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.13fr) auto;
  align-items: center;
  gap: 4px 8px;
  min-height: 46px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(.6875rem, .95vw, .88rem);
  line-height: 1.32;
}
.register-lines dt { font-weight: 700; }
.register-lines dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.register-status { color: var(--green); font-weight: 700; text-align: right; }
.register-status.needs-action { color: var(--gold-ink); }
.desk[data-record="admissions"] [data-row="admissions"],
.desk[data-record="fees"] [data-row="fees"],
.desk[data-record="attendance"] [data-row="attendance"] { background: #e9e3cd; }
.register-foot { padding-top: 13px; }

.record-slip {
  position: absolute;
  z-index: 1;
  right: -5%;
  bottom: -7%;
  width: clamp(120px, 40%, 175px);
  pointer-events: none;
  transform: translateZ(34px) rotateZ(8deg);
}
.sample-slip {
  display: grid;
  gap: 2px;
  padding: 12px 15px;
  background: #ecce89;
  box-shadow: 2px 9px 18px #0005;
  color: #46381b;
}
.sample-slip[data-slip="admissions"] { background: #efe3c9; }
.sample-slip[data-slip="attendance"] { background: #dae5c8; }
.sample-slip span { font-size: .6875rem; line-height: 1.25; font-weight: 700; }
.sample-slip strong { font: 400 clamp(1.06rem, 1.7vw, 1.43rem)/1.2 var(--display); }
.slip-rule { border-top: 1px dashed #746447; margin-block: 4px; }

.scene-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-top: 1px solid var(--hero-rule);
  background: #163629;
}
.scene-controls button {
  min-height: 44px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #ecf2e7;
  font: 700 clamp(.75rem, 1.1vw, .9rem)/1.2 var(--body);
  cursor: pointer;
}
.scene-controls button:focus-visible { outline-offset: -3px; }
.scene-controls button[aria-pressed="true"] { border-color: #d9bd76; background: #edcf8b; color: #21362a; }
@media (hover: hover) and (pointer: fine) {
  .scene-controls button[aria-pressed="false"]:hover { background: #254c3b; }
}

.brand-intro {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #183d30;
  color: #fdf6e4;
}
.intro-content { display: grid; gap: 18px; justify-items: center; text-align: center; }
.intro-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 152px;
  aspect-ratio: 1;
  perspective: 550px;
}
.intro-seal i {
  position: absolute;
  inset: 0;
  border: 1px solid #b39d63;
  border-radius: 50%;
}
.intro-mark {
  display: grid;
  place-items: center;
  width: 106px;
  aspect-ratio: 1;
  border: 1px solid #d9b569;
  background: #fff9ed;
}
.intro-mark img { mix-blend-mode: multiply; height: auto; }
.intro-name { font: 400 2rem/1 var(--display); }
.intro-name small { display: block; margin-top: 6px; color: #efd18d; font: 600 .87rem/1 var(--body); }
.intro-rule { width: 65px; height: 1px; background: #d9b569; }

@media (prefers-reduced-motion: no-preference) {
  .brand-intro { animation: open-curtain 820ms var(--ease-out) both; }
  .intro-mark { animation: set-seal 530ms var(--ease-out) both; }
  .intro-rule { animation: draw-rule 450ms var(--ease-out) both; }
  .desk-opening .desk-object { animation: open-register 720ms var(--ease-out) both; }
  .desk-opening-after-intro .desk-object { animation-delay: 350ms; }

  @keyframes open-curtain {
    0%, 57% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
  }
  @keyframes set-seal {
    from { transform: translateZ(-45px) rotateY(-54deg) rotateZ(-12deg); opacity: .5; }
    to { transform: none; opacity: 1; }
  }
  @keyframes draw-rule {
    from { transform: scaleX(.18); opacity: .35; }
    to { transform: none; opacity: 1; }
  }
  @keyframes open-register {
    from { transform: translate3d(0, 16px, -34px) rotateX(32deg) rotateY(-28deg) rotateZ(-12deg); }
    to { transform: rotateX(var(--book-pitch)) rotateY(var(--book-yaw)) rotateZ(var(--book-roll)); }
  }
}

@media (max-width: 1020px) {
  .desk-projector { width: 81%; }
  .register { padding: 18px; }
  .register-lines > div { min-height: 40px; padding-inline: 4px; }
}
@media (max-width: 760px) {
  .desk-view { min-height: clamp(315px, 77vw, 400px); }
  .desk-index { padding: 12px; letter-spacing: .055em; }
  .desk-projector { width: min(82%, 402px); }
  .desk-object { --book-pitch: 11deg; --book-yaw: -9deg; --book-roll: -7deg; --book-depth: 9px; }
  .register { padding: 13px; }
  .register-head { padding-bottom: 8px; }
  .register-head img { width: 39px; }
  .register-lines > div { gap: 4px; min-height: 35px; padding-block: 5px; }
  .record-slip { right: -3%; bottom: -13%; transform: translateZ(24px) rotateZ(8deg); }
  .sample-slip { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-intro { display: none; }
  .desk-tilt { transform: none !important; }
}
