/* Lapisan tampilan untuk portal publik dan login. Ukuran halaman mengikuti konten. */
.portal-page {
  --deep: #0a203e;
  --ink: #152b47;
  --muted: #485a6d;
  --gold: #f3ce88;
  --paper: #fbfaf6;
  --line: #d8dfe8;
  --gutter: clamp(1.1rem, 5vw, 5rem);
  --display: "Iowan Old Style", Baskerville, "Palatino Linotype", Georgia, serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
}
.portal-page .skip { z-index: 20; }
.portal-page :focus-visible { outline: 3px solid #cd8820; outline-offset: 3px; }
.portal-page main:focus:not(:focus-visible) { outline: none; }
.portal-wrap, .portal-page .headinner {
  width: min(100%, 90rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.portal-header, .portal-auth-header {
  position: relative;
  z-index: 5;
  flex: none;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}
.portal-auth-header .portal-wrap {
  min-height: 4.875rem;
  padding-block: .55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.portal-page .brandmark { border-radius: .72rem; }
.portal-page .brand b { color: var(--ink); }
.portal-page .brand small { color: var(--muted); }
.portal-header .loginbtn { margin-left: auto; color: white; }
.portal-header .publicnav + .loginbtn { margin-left: 0; }
.portal-header .loginbtn, .portal-form-panel .form .btn {
  background: var(--navy);
  border-radius: 3rem;
  box-shadow: 0 5px 13px #102a531c;
}
.portal-header .loginbtn:hover, .portal-form-panel .form .btn:hover { background: var(--blue); }
.portal-header .publicnav a { color: var(--muted); border-radius: .5rem; }
.portal-header .publicnav [aria-current] { color: var(--navy); }
.portal-header .publicnav a:hover { background: #edf2f8; }
.portal-header .publicnav [aria-current]::after { background: #a87a37; }
.portal-main, .portal-auth-main { flex: 1 0 auto; min-width: 0; }
/* Tinggi navbar menentukan ruang isi dan posisi tujuan saat tautan diklik. */
.portal-header { position: sticky; top: 0; }
html:has(.portal-main) { scroll-padding-top: var(--public-header-height); }
.portal-main > section {
  min-width: 0;
  min-height: calc(100vh - var(--public-header-height));
  min-height: calc(100dvh - var(--public-header-height));
}
.portal-reader-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.portal-page .prose { font-size: 1.02rem; line-height: 1.75; }
.portal-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #6c592f;
  font: 700 .71rem/1.4 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.portal-kicker::before { content: ""; width: 2rem; height: 2px; flex: none; background: currentColor; }
.portal-page h1, .portal-page .portal-title {
  margin: .65rem 0 0;
  font: 400 clamp(2.75rem, 5.6vw, 5.5rem)/1.03 var(--display);
  letter-spacing: -.052em;
  text-wrap: balance;
}
.portal-home, .portal-profile-cover, .portal-auth-art {
  color: #fff9eb;
  background-color: var(--deep);
  background-image:
    repeating-radial-gradient(ellipse at 100% 120%, transparent 0 22px, #c2d4f00e 23px 24px, transparent 25px 36px),
    radial-gradient(ellipse at 100% 25%, #1d4270, transparent 65%);
}
.portal-home { display: grid; align-items: center; border-bottom: 3px solid #ae8953; }
.portal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(2rem, 5.2vw, 5.2rem);
  padding-block: clamp(2rem, 6vh, 5.5rem);
}
.portal-hero-copy { min-width: 0; }
.portal-home .portal-kicker, .portal-profile-cover .portal-kicker { color: var(--gold); }
.portal-home h1 { font-size: clamp(3.6rem, 6.5vw, 6.65rem); }
.portal-home h1 em {
  display: block;
  margin-top: .08em;
  font-weight: 400;
  font-size: .76em;
  color: var(--gold);
  letter-spacing: -.045em;
}
.portal-home .prose { color: #e2e9f1; max-width: 48ch; margin: 1.25rem 0 0; }
.portal-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.portal-actions:not(:empty) { margin-top: 1.6rem; }
.portal-primary, .portal-secondary, .portal-back, .portal-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 44px;
  max-width: 100%;
  color: inherit;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.portal-primary, .portal-secondary { border: 1px solid; padding: .72rem 1.25rem; border-radius: 99px; }
.portal-primary { color: #152b47; background: var(--gold); border-color: var(--gold); }
.portal-primary:hover { background: #ffe3ab; }
.portal-secondary { color: #f8f6ec; border-color: #a8bad088; background: #173760; }
.portal-secondary:hover { background: #264c77; }
.portal-primary:hover, .portal-secondary:hover, .portal-text-link:hover, .portal-back:hover { text-decoration: none; }
.portal-primary .icon, .portal-secondary .icon, .portal-text-link .icon, .portal-back .icon { width: 17px; height: 17px; }
.portal-print { width: 100%; max-width: 43rem; justify-self: center; min-width: 0; }
.portal-illustration {
  position: relative;
  padding: clamp(.35rem, .7vw, .7rem);
  border: 1px solid #c2ac7880;
  border-radius: 1rem;
  background: #ffffff08;
  box-shadow: 0 22px 60px -27px #051126bb;
}
.portal-illustration img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .62rem;
}
.portal-caption, .portal-auth-art .portal-location {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #e1e8f2;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .035em;
}
.portal-caption { margin-top: .8rem; }
.portal-caption .icon, .portal-location .icon { color: var(--gold); width: 15px; height: 15px; }
.portal-caption::after, .portal-location::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #c2ac7880, #c2ac781a);
}
.portal-foot { flex: none; background: var(--deep); border-top: 1px solid #28476e; }
.portal-foot .portal-wrap {
  min-height: 3.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  padding-block: .25rem;
  color: #cfdae9;
  font-size: .78rem;
}
.portal-foot a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: #fffdf8; text-decoration: none; }
.portal-foot a:hover { text-decoration: underline; }

.portal-interior { display: grid; align-items: center; padding-block: clamp(2rem, 6vh, 5rem); }
.portal-profile-grid, .portal-contact-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 6vw, 6.6rem);
}
.portal-profile-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(17rem, 44vh, 28rem);
  padding: clamp(1.5rem, 3.1vw, 3rem);
  border-radius: .8rem 3.75rem .8rem .8rem;
  border-bottom: .25rem solid #c5a061;
}
.portal-seal, .portal-empty-icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  color: var(--gold);
  background: #ffffff07;
  border: 1px solid #d8bb7e80;
}
.portal-seal { margin-bottom: auto; }
.portal-seal + .portal-kicker { margin-top: 1.75rem; }
.portal-seal .icon, .portal-empty-icon .icon { width: 1.65rem; height: 1.65rem; }
.portal-profile-copy .prose { font: 400 clamp(1.28rem, 2.05vw, 2.1rem)/1.5 var(--display); max-width: 43ch; }
.portal-text-link { gap: 1.1rem; color: var(--blue); min-height: 44px; border-bottom: 1px solid #b7a076; }
.portal-profile-copy .portal-text-link { margin-top: 1.3rem; }
.portal-collection { background: linear-gradient(135deg, #fbfaf6 30%, #edf2f8); }
.portal-collection-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  border-bottom: 1px solid #c5d0df;
  padding-bottom: clamp(1.2rem, 3vw, 2.1rem);
  margin-bottom: clamp(1rem, 2.4vw, 2.1rem);
}
.portal-collection-head > div, .portal-collection-head .prose { min-width: 0; }
.portal-collection-head .prose { max-width: 35ch; color: var(--muted); }
.portal-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.portal-card, .portal-empty, .portal-contact-list {
  min-width: 0;
  border-radius: 1rem;
  border: 1px solid #d4dde9;
  background: #fffdf8;
  box-shadow: 0 14px 34px -25px #102a5345;
}
.portal-photo-link { display: block; padding: .45rem; }
.portal-photo-link img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #e6ecf4; border-radius: .7rem; }
.portal-card-copy { padding: clamp(1rem, 2vw, 1.5rem); }
.portal-card-copy small { color: #745c30; font-weight: 650; }
.portal-card-copy h3 { font: 500 1.65rem/1.15 var(--display); margin: .4rem 0; }
.portal-card-copy .prose { color: var(--muted); font-size: .94rem; }
.portal-collection .actions { margin-top: 1.25rem; }
.portal-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  min-height: clamp(10rem, 24vh, 15rem);
  padding: 1.6rem;
  text-align: center;
  color: var(--muted);
  background: radial-gradient(ellipse at center, #fcfcfd 20%, #edf2f9);
}
.portal-empty-icon { color: var(--blue); border-color: #c6d4e5; background: #e3ebf6; box-shadow: 0 0 0 .35rem #e3ebf665; }
.portal-contact { background: radial-gradient(ellipse at 100% 85%, #e6ecf6, transparent 65%), var(--paper); }
.portal-contact-grid { grid-template-columns: minmax(0,1fr) minmax(0,.92fr); }
.portal-contact header .prose { max-width: 44ch; margin-top: 1.1rem; color: var(--muted); }
.portal-contact .portal-empty, .portal-contact-list { border-top: 3px solid #aa8751; }
.portal-contact-list { padding: .4rem clamp(1rem, 2.8vw, 2.4rem); }
.portal-contact-list > div { padding-block: .95rem; }
.portal-contact-list > div + div { border-top: 1px solid var(--line); }
.portal-contact-list dt { font-size: .8rem; font-weight: 700; color: var(--muted); }
.portal-contact-list dd { margin: .22rem 0 0; }
.portal-contact-list a { color: var(--blue); }

.portal-back { color: var(--navy); }
.portal-back .icon { transform: rotate(180deg); }
.portal-auth-main {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vh, 3rem) var(--gutter);
  background: radial-gradient(ellipse at 10% 30%, #dfe8f5, transparent 65%), var(--paper);
}
.portal-auth-shell {
  display: grid;
  grid-template-columns: minmax(0,1.06fr) minmax(0,1fr);
  width: min(100%, 72rem);
  border: 1px solid #cdd7e5;
  border-radius: 1.35rem;
  background: #fffdf8;
  box-shadow: 0 22px 65px -34px #102a534f;
}
.portal-auth-art {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.1rem, 2.8vw, 2.8rem);
  border-radius: 1.25rem 0 0 1.25rem;
}
.portal-auth-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .7rem;
  outline: 1px solid #d4b77a75;
  outline-offset: .32rem;
}
.portal-form-panel { min-width: 0; align-self: center; padding: clamp(1.6rem, 4vw, 4rem); }
.portal-form-panel h1 { font-size: clamp(2.5rem, 4.4vw, 4.1rem); }
.portal-intro { margin-top: .7rem; color: var(--muted); line-height: 1.55; }
.portal-form-panel .form { margin-top: 1.35rem; gap: 1rem; }
.portal-form-panel .form label { color: var(--ink); gap: .4rem; font-size: .9rem; }
.portal-form-panel .form input:not([type=hidden]) {
  min-width: 0;
  min-height: 3rem;
  background: #fcfcfd;
  border: 1px solid #acb9c8;
  border-radius: .6rem;
  font-size: 1rem;
}
.portal-form-panel .form input:focus { border-color: var(--blue); }
.portal-form-panel .form .btn { width: 100%; min-height: 3rem; color: white; }
.portal-password { position: relative; }
.portal-form-panel .form .portal-password:has(button:not([hidden])) input { padding-right: 6.5rem; }
.portal-password button {
  position: absolute;
  right: .2rem;
  bottom: .15rem;
  min-height: 2.7rem;
  padding-inline: .65rem;
  border: none;
  border-radius: .4rem;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  font-size: .81rem;
  cursor: pointer;
}
.portal-password button:hover { text-decoration: underline; }
.portal-error { margin-top: .85rem; padding: .7rem 1rem; border-left: 3px solid #b45647; background: #fff1e9; color: #812d25; }

@media (max-width: 47.99rem) {
  .portal-hero-grid, .portal-profile-grid, .portal-contact-grid { grid-template-columns: minmax(0,1fr); }
  .portal-hero-grid { gap: clamp(1rem, 3vh, 2rem); padding-block: clamp(1.2rem, 3.5vh, 2.5rem); }
  .portal-home h1 { font-size: clamp(2.75rem, 9vw, 4rem); }
  .portal-home h1 em { display: inline; }
  .portal-home .prose { margin-top: .8rem; font-size: 1rem; line-height: 1.55; }
  .portal-actions:not(:empty) { margin-top: .95rem; }
  .portal-print { max-width: min(100%, 31rem, 48vh); max-width: min(100%, 31rem, 48svh); }
  .portal-caption { margin-top: .45rem; }
  .portal-profile-cover { min-height: 13rem; padding: 1.5rem; }
  .portal-seal { width: 3rem; height: 3rem; }
  .portal-seal + .portal-kicker { margin-top: 1rem; }
  .portal-collection-head { align-items: start; flex-direction: column; }
  .portal-contact-grid { gap: 1.5rem; }
  .portal-auth-header .portal-wrap { min-height: 4rem; }
  .portal-auth-header .brand small { display: none; }
  .portal-auth-shell { max-width: 32rem; grid-template-columns: minmax(0,1fr); }
  .portal-auth-art { padding: .85rem 1.15rem; flex-direction: row; justify-content: flex-start; align-items: center; border-radius: 1.25rem 1.25rem 0 0; }
  .portal-auth-art img { width: clamp(5rem, 12vh, 7.5rem); outline-offset: .14rem; border-radius: .25rem; }
  .portal-auth-art .portal-location { flex: 1; min-width: 0; }
  .portal-form-panel { padding: clamp(1.15rem, 5vw, 2.2rem); }
  .portal-form-panel h1 { font-size: clamp(2.45rem, 8vw, 3.5rem); }
}
@media (max-width: 30rem) {
  .portal-header .headinner, .portal-auth-header .portal-wrap { padding-inline: .8rem; }
  .portal-header .headinner { gap: .3rem; }
  .portal-header .brand b, .portal-auth-header .brand b { font-size: .95rem; }
  .portal-auth-header .portal-back { gap: .3rem; font-size: .8rem; }
  .portal-foot .portal-wrap { font-size: .72rem; min-height: 2.75rem; }
  .portal-foot .portal-wrap a { min-height: 40px; }
}
@media (max-height: 40rem) {
  .portal-hero-grid, .portal-interior { padding-block: 1.2rem; }
  .portal-auth-main { padding-block: .8rem; }
  .portal-form-panel { padding-block: 1.25rem; }
  .portal-form-panel .form { margin-top: 1rem; gap: .75rem; }
}
@media (max-width: 47.99rem) and (max-height: 40rem) {
  .portal-auth-art { padding-block: .55rem; }
  .portal-auth-art img { width: 4rem; }
}

/* Pada ponsel pendek, sisakan ruang untuk isi dan kedua tombol utama. */
@media (max-width: 47.99rem) and (max-height: 43rem) {
  .portal-hero-grid { padding-block: 1rem; gap: .85rem; }
  .portal-home h1 { margin-top: .4rem; font-size: clamp(2rem, 8.8vw, 2.8rem); }
  .portal-actions { gap: .45rem; }
  .portal-primary, .portal-secondary { padding: .55rem .82rem; font-size: .87rem; gap: .45rem; }
  .portal-print { max-width: min(100%, 31.5svh); }
}
@media (max-width: 47.99rem) and (max-height: 48rem) {
  .portal-profile-grid { gap: 1rem; }
  .portal-profile-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
    padding: 1.1rem;
    border-top-right-radius: 2rem;
  }
  .portal-profile-cover .portal-seal { grid-column: 2; grid-row: 1/3; margin: 0; width: 2.4rem; height: 2.4rem; }
  .portal-profile-cover .portal-kicker { grid-row: 1; grid-column: 1; margin: 0; }
  .portal-profile-cover .portal-title { grid-row: 2; grid-column: 1; font-size: 2.15rem; margin-top: .25rem; }
  .portal-profile-copy .prose { font-size: 1.08rem; line-height: 1.5; }
  .portal-profile-copy .portal-text-link { margin-top: .5rem; }
}
/* Tata letak mendatar untuk ponsel yang diputar dan jendela yang pendek. */
@media (min-width: 38rem) and (max-height: 29rem) {
  .portal-page { --gutter: clamp(.9rem, 3vw, 2.5rem); }
  .portal-page .headinner, .portal-auth-header .portal-wrap { min-height: 3.35rem; padding-block: .2rem; gap: .6rem; }
  .portal-page .brand small { display: none; }
  .portal-page .brand b { font-size: 1rem; }
  .portal-page .brandmark { width: 34px; height: 34px; }
  .portal-header .publicnav a { padding-inline: .55rem; }
  .portal-foot .portal-wrap { min-height: 2rem; padding-block: 0; }
  .portal-foot a { min-height: 2.1rem; }
  .portal-home h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); margin-top: .3rem; }
  .portal-home h1 em { display: inline; }
  .portal-hero-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); padding-block: .7rem; gap: 1.25rem; }
  .portal-home .prose { margin-top: .55rem; line-height: 1.45; font-size: .97rem; }
  .portal-actions:not(:empty) { margin-top: .65rem; }
  .portal-print { max-width: min(100%, 78svh); }
  .portal-caption { margin-top: .4rem; }
  .portal-profile-grid, .portal-contact-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; }
  .portal-profile-cover { min-height: 11rem; padding: 1rem 1.35rem; }
  .portal-profile-copy .prose { font-size: 1.1rem; line-height: 1.43; }
  .portal-profile-copy .portal-text-link { margin-top: .4rem; }
  .portal-interior { padding-block: .8rem; }
  .portal-empty { min-height: 6.6rem; gap: .65rem; padding: .7rem; }
  .portal-empty-icon { width: 2.75rem; height: 2.75rem; }
  .portal-collection-head { margin-bottom: .65rem; padding-bottom: .65rem; flex-direction: row; }
  .portal-collection-head .prose { max-width: 29ch; font-size: .94rem; }
  .portal-auth-main { padding-block: .65rem; }
  .portal-auth-shell { max-width: 65rem; grid-template-columns: minmax(0,.55fr) minmax(0,1.45fr); }
  .portal-auth-art { flex-direction: column; justify-content: center; gap: .55rem; padding: 1rem; border-radius: 1.25rem 0 0 1.25rem; }
  .portal-auth-art img { width: 100%; }
  .portal-auth-art .portal-location { flex: none; }
  .portal-form-panel { padding: .9rem 1.2rem; }
  .portal-form-panel h1 { margin-top: .2rem; font-size: 2.25rem; }
  .portal-intro { margin-top: .3rem; }
  .portal-form-panel .form:has(.portal-password) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .8rem; }
  .portal-form-panel .form:has(.portal-password) .btn { grid-column: 1 / -1; }
}

@keyframes portal-arrive {
  from { opacity: .2; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes portal-unfold {
  from { opacity: .4; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .portal-entered :is(.portal-hero-copy, .portal-profile-cover, .portal-collection-head), .portal-contact.portal-entered header,
  .portal-form-panel { animation: portal-arrive .42s ease-out both; }
  .portal-entered :is(.portal-print, .portal-profile-copy, .portal-cards, .portal-contact-list, .portal-empty),
  .portal-auth-art { animation: portal-unfold .52s .045s ease-out both; }
  .portal-header .menu-toggle:not([hidden]) + .publicnav:not([hidden]) { animation: portal-arrive .2s ease-out; }
  .portal-page :is(.portal-primary, .portal-secondary, .loginbtn, .portal-card, .portal-form-panel .btn) {
    transition: transform .2s ease-out, box-shadow .2s ease-out, background-color .2s;
  }
  .portal-page :is(.portal-primary, .portal-text-link, .portal-login, .portal-form-panel .btn) .icon { transition: transform .2s; }
  @media (hover: hover) {
    .portal-page :is(.portal-primary, .portal-secondary, .loginbtn, .portal-card:has(a), .portal-form-panel .btn):hover { transform: translateY(-2px); }
    .portal-page :is(.portal-primary, .portal-text-link, .portal-login, .portal-form-panel .btn):hover .icon { transform: translateX(3px); }
  }
}
