@import url("./themes.css");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --splash-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-logo-size: 136px;
  --sunset-bg: linear-gradient(
    180deg,
    #1a3a5c 0%,
    #c96b4a 10%,
    #e8a85c 16%,
    #f5d89a 22%,
    #7a9bb3 28%,
    #5a7d96 34%,
    #4a6d84 48%,
    #3a5670 62%,
    #2a455c 76%,
    #1a3a5c 100%
  );
  --site-bg: var(--sunset-bg);
  --sunset-sky: #5a7d96;
  --navy-deep: #1a3a5c;
  --title-drop-shadow: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
  --title-text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(0, 0, 0, 0.25);
  --title-text-shadow-glow:
    0 2px 4px rgba(0, 0, 0, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(255, 255, 255, 0.35);
}

html {
  min-height: 100%;
  background-color: var(--navy-deep);
}

html:has(.register-page) {
  background-color: #0a1a2e;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--site-bg);
  pointer-events: none;
}

body.is-settling .site-header,
body.is-loaded .site-header {
  opacity: 1;
}

body.is-loaded .site-header {
  transition: opacity 0.35s var(--splash-ease);
}

body.is-loaded .site-header.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem 3rem;
  min-height: calc(100vh - 220px);
}

.content-card {
  width: min(92vw, 720px);
  min-height: min(50vh, 480px);
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  clip-path: inset(0 0 100% 0 round 24px);
  color: var(--navy-deep);
}

.home-main {
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 1.5rem 1.25rem 4rem;
  min-height: auto;
}

.home-page .content-card {
  width: min(94vw, 920px);
  min-height: 0;
}

.home-eyebrow {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: #6b8498;
}

.home-credentials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  max-width: 36rem;
  padding: 0;
  margin: 0;
}

.home-credential {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d8e3ec;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.08);
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(0.62rem, 1.8vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a455c;
  line-height: 1.35;
}

.home-bio-inner {
  align-items: stretch;
  text-align: left;
  gap: 2rem;
  padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem) 2.75rem;
}

.home-bio-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e3ecf2;
}

.home-bio-title {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
  color: var(--navy-deep);
}

.home-bio-lead {
  margin: 0;
  max-width: 46rem;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  line-height: 1.65;
  color: #2a455c;
}

.home-bio-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

.home-bio-panel {
  padding: 1.5rem 1.35rem;
  border-radius: 18px;
  border: 1px solid #d8e3ec;
  background: rgba(244, 248, 251, 0.65);
}

.home-bio-panel--highlight {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-color: rgba(47, 158, 90, 0.35);
  background: linear-gradient(
    165deg,
    rgba(47, 158, 90, 0.12) 0%,
    rgba(255, 255, 255, 0.92) 55%,
    rgba(244, 248, 251, 0.95) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.home-bio-panel-title {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.home-bio-panel p {
  margin: 0;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.65;
  color: #2a455c;
}

.home-bio-panel--story {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-bio-highlight-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #2f9e5a;
  color: #fff;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(47, 158, 90, 0.35);
}

.home-bio-values {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
}

.home-bio-value {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #d8e3ec;
  background: #fff;
  box-shadow: 0 4px 16px rgba(26, 58, 92, 0.06);
}

.home-bio-value-label {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2f9e5a;
}

.home-bio-value-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3a5670;
}

@media (max-width: 760px) {
  .home-bio-grid {
    grid-template-columns: 1fr;
  }

  .home-bio-values {
    grid-template-columns: 1fr;
  }

  .home-bio-inner {
    text-align: center;
  }

  .home-bio-header {
    align-items: center;
  }

  .home-bio-panel--highlight {
    align-items: center;
    text-align: center;
  }
}

.card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  padding: 2.75rem 2rem;
}

.card-title {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--navy-deep);
  line-height: 1.3;
}

.card-roles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.card-role {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #2a455c;
  line-height: 1.4;
}

.card-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.card-contact-line {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.5;
  color: #3a5670;
}

.card-contact-line a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-contact-line a:hover {
  color: var(--navy-deep);
  text-decoration: underline;
}

.register-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.85rem 2.25rem;
  border-radius: 999px;
  background: #2f9e5a;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(47, 158, 90, 0.35);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-actions .register-btn {
  margin-top: 0;
}

.register-btn:hover {
  background: #268a4d;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(47, 158, 90, 0.45);
}

.register-btn:active {
  transform: translateY(0);
}

button.register-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
  max-width: 16rem;
  margin-top: 0.75rem;
}

.card-actions .register-btn,
.card-actions .sign-in-btn {
  width: 100%;
  margin-top: 0;
  text-align: center;
  box-sizing: border-box;
}

.sign-in-btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border: none;
  border-radius: 999px;
  background: var(--navy-deep);
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 58, 92, 0.3);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sign-in-btn:hover {
  background: #2a455c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 58, 92, 0.4);
}

.sign-in-btn:active {
  transform: translateY(0);
}

a.sign-in-btn {
  text-decoration: none;
  text-align: center;
}

button.sign-in-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.content-card.is-visible {
  animation: card-reveal-down 1.1s var(--splash-ease) forwards;
}

.content-card--static {
  opacity: 1;
  clip-path: inset(0 0 0 0 round 24px);
}

.register-page::before {
  background: linear-gradient(
    180deg,
    #1a3a5c 0%,
    #c96b4a 8%,
    #e8a85c 14%,
    #f5d89a 20%,
    #7a9bb3 26%,
    #5a7d96 32%,
    #4a6d84 40%,
    #3a5670 50%,
    #2a455c 60%,
    #1a3a5c 70%,
    #122d47 82%,
    #0a1a2e 100%
  );
}

.register-page .main-content {
  min-height: calc(100vh - 180px);
  padding-bottom: 4rem;
}

.register-page .site-header--static {
  opacity: 1;
  transition: opacity 0.35s var(--splash-ease);
}

.register-page .site-header.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.register-page .site-tagline.is-visible .tagline-word {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

.register-intro {
  max-width: 28rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
  color: #3a5670;
}

.login-error {
  max-width: 28rem;
  margin: 0 0 1rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
  color: #c62828;
  font-weight: 500;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a455c;
}

.form-hint {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #5a7388;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #c5d4e0;
  border-radius: 10px;
  background: #fff;
  color: var(--navy-deep);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #2f9e5a;
  box-shadow: 0 0 0 3px rgba(47, 158, 90, 0.15);
}

.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled,
.sign-in-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #e8eef3;
}

.register-form--locked .sign-in-btn:disabled {
  background: #9aabba;
  color: #fff;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.back-link {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #3a5670;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--navy-deep);
  text-decoration: underline;
}

@keyframes card-reveal-down {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0 round 24px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 24px);
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 1.5rem 1.25rem;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.6s var(--splash-ease);
}

.site-header-actions {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-header-btn {
  margin-top: 0;
  padding: 0.62rem 1.15rem;
  font-size: clamp(0.68rem, 1.8vw, 0.82rem);
  white-space: nowrap;
}

.site-header-actions .register-btn,
.site-header-actions .sign-in-btn {
  width: auto;
  min-width: 6.75rem;
  text-align: center;
}

@media (max-width: 520px) {
  .site-header-actions {
    top: 0.75rem;
    right: 0.75rem;
    gap: 0.4rem;
  }

  .site-header-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }

  .site-header-actions .register-btn,
  .site-header-actions .sign-in-btn {
    min-width: 0;
  }
}

.site-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.site-brand-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.site-logo {
  display: block;
  line-height: 0;
  width: var(--header-logo-size);
  height: var(--header-logo-size);
}

.site-logo-wrap {
  width: var(--header-logo-size);
  height: var(--header-logo-size);
}

.site-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.2));
}

.site-title {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(0.65rem, 2.2vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  filter: var(--title-drop-shadow);
}

.site-title .title-char {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
  color: #fff;
  text-shadow: var(--title-text-shadow);
}

.site-tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
  margin-top: 0.15rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(0.55rem, 1.8vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
}

.site-footer {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
}

.site-footer-text {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.tagline-word {
  opacity: 0;
  transform: translateY(0.75rem);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: var(--title-text-shadow);
}

.site-tagline.is-visible .tagline-word {
  animation: tagline-fade-in 0.9s var(--splash-ease) forwards;
}

.site-tagline.is-visible .tagline-word:nth-child(1) { animation-delay: 0.1s; }
.site-tagline.is-visible .tagline-word:nth-child(2) { animation-delay: 0.28s; }
.site-tagline.is-visible .tagline-word:nth-child(3) { animation-delay: 0.46s; }
.site-tagline.is-visible .tagline-word:nth-child(4) { animation-delay: 0.64s; }
.site-tagline.is-visible .tagline-word:nth-child(5) { animation-delay: 0.82s; }

@keyframes tagline-fade-in {
  0% {
    opacity: 0;
    transform: translateY(0.75rem);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Splash intro */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--site-bg);
  overflow: hidden;
  transition: opacity 0.9s var(--splash-ease);
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.splash::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 55%
  );
  animation: splash-glow 3s var(--splash-ease) forwards;
  transition: opacity 0.6s ease;
}

.splash::after {
  content: "";
  position: absolute;
  width: 120vmax;
  height: 120vmax;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: splash-ring 2.4s var(--splash-ease) forwards;
  transition: opacity 0.6s ease;
}

.splash.is-settling {
  opacity: 0;
  pointer-events: none;
}

.splash.is-settling::before,
.splash.is-settling::after {
  opacity: 0;
  animation: none;
}

.splash-logo-wrap {
  position: relative;
  z-index: 1;
  width: min(72vw, 420px);
  aspect-ratio: 1;
  animation: logo-enter 2.2s var(--splash-ease) forwards;
}

.splash-content.is-settling {
  z-index: 101;
}

.splash-content.is-header {
  gap: 0.65rem;
}

.splash-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.15));
  animation: logo-glow 2.4s ease-in-out 0.4s forwards;
}

.splash-logo-wrap.is-settling .splash-logo {
  animation: none;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.12));
}

.splash-content.is-settling .splash-title.is-ready .title-char {
  animation: none;
  opacity: 1;
  transform: none;
  filter: none;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: var(--title-text-shadow);
}

/* Splash title */

.splash-title {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  filter: var(--title-drop-shadow);
}

.title-char {
  display: inline-block;
  color: #fff;
  opacity: 0;
  transform: translateY(1.4em) scale(0.85);
  filter: blur(8px);
  text-shadow: var(--title-text-shadow);
  animation: title-char-in 1s var(--splash-ease) forwards;
}

.title-char.is-space {
  width: 0.35em;
}

.splash-title.is-ready .title-char {
  animation:
    title-char-in 1s var(--splash-ease) forwards,
    title-char-glow 3s ease-in-out 1.8s infinite;
}

@keyframes title-char-in {
  0% {
    opacity: 0;
    transform: translateY(1.4em) scale(0.85);
    filter: blur(8px);
    text-shadow: var(--title-text-shadow);
  }
  60% {
    opacity: 1;
    filter: blur(0);
    text-shadow: var(--title-text-shadow);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    text-shadow: var(--title-text-shadow);
  }
}

@keyframes title-char-glow {
  0%,
  100% {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: var(--title-text-shadow);
  }
  50% {
    color: #fff;
    text-shadow: var(--title-text-shadow-glow);
  }
}

@keyframes logo-enter {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-120deg);
  }
  55% {
    opacity: 1;
    transform: scale(1.04) rotate(8deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes logo-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.1));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.35));
  }
}

@keyframes splash-glow {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

@keyframes splash-ring {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  30% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash::before,
  .splash::after,
  .splash-logo-wrap,
  .splash-logo,
  .splash-title,
  .title-char {
    animation: none !important;
  }

  .splash-logo-wrap {
    opacity: 1;
    transform: none;
  }

  .title-char {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .splash-title {
    color: #fff;
  }

  .site-header {
    opacity: 1;
  }

  .site-tagline.is-visible .tagline-word {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .content-card.is-visible {
    animation: none;
    opacity: 1;
    clip-path: inset(0 0 0 0 round 24px);
  }
}