:root {
  color-scheme: light;
  --bg: #f2ede3;
  --bg-soft: #f9f6ef;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: #ffffff;
  --ink: #152033;
  --muted: #5e6878;
  --line: rgba(21, 32, 51, 0.12);
  --line-strong: rgba(21, 32, 51, 0.2);
  --accent: #0d766c;
  --accent-strong: #0a5c54;
  --accent-ink: #f9fffd;
  --warm: #c26938;
  --shadow: 0 24px 60px rgba(19, 31, 47, 0.12);
  --shadow-soft: 0 16px 38px rgba(19, 31, 47, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(194, 105, 56, 0.18), transparent 22rem),
    radial-gradient(circle at top right, rgba(13, 118, 108, 0.16), transparent 28rem),
    linear-gradient(180deg, #fbf7ef 0%, #f3ecdf 42%, #efe8dc 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(
      90deg,
      rgba(21, 32, 51, 0.015) 0,
      rgba(21, 32, 51, 0.015) 1px,
      transparent 1px,
      transparent 96px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(21, 32, 51, 0.015) 0,
      rgba(21, 32, 51, 0.015) 1px,
      transparent 1px,
      transparent 96px
    );
  opacity: 0.7;
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
.brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.site-head,
main {
  width: min(1760px, calc(100% - 1rem));
  margin: 0 auto;
}

.site-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0 0.7rem;
}

.brand {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
}

.head-actions,
.cta-row,
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

main {
  padding: 0 0 3rem;
}

.section,
.marketing-stack,
.split-section,
.portal-columns,
.showcase-grid,
.pillar-grid,
.hero-stats {
  display: grid;
  gap: 1rem;
}

.hero-shell {
  position: relative;
  width: 100vw;
  min-height: 840px;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
  padding-top: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 18, 30, 0.92) 0%, rgba(8, 18, 30, 0.84) 24%, rgba(8, 18, 30, 0.56) 44%, rgba(8, 18, 30, 0.2) 64%, rgba(8, 18, 30, 0) 100%),
    url("/media/calendar-two-months.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 12rem;
  background: linear-gradient(180deg, rgba(239, 232, 220, 0) 0%, #efe8dc 100%);
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  width: min(1760px, calc(100% - 1rem));
  min-height: 840px;
  margin: 0 auto;
  padding: 7.8rem 0 6.2rem;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
}

.hero-copy {
  padding: 0.8rem 0.6rem 0.8rem 0.2rem;
  color: #ffffff;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
}

.hero-copy .eyebrow {
  color: #f3c8aa;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm);
}

h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.7rem, 4vw, 5rem);
  line-height: 0.95;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.8rem, 2vw, 3rem);
  line-height: 1.02;
}

h3 {
  font-size: clamp(1.2rem, 1.1vw, 1.7rem);
  line-height: 1.08;
}

.lede,
.meta,
.status-msg,
.pillar-card p,
.showcase-copy p,
.choice-item span,
.review-card span {
  color: var(--muted);
}

.lede {
  margin-top: 0.95rem;
  max-width: 60ch;
  line-height: 1.65;
  font-size: 1.03rem;
  color: var(--muted);
}

.hero-copy .lede {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.hero-badges {
  margin-top: 1.1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(13, 118, 108, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(21, 32, 51, 0.16);
}

.cta-row {
  margin-top: 1.25rem;
}

.hero-stats {
  margin-top: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stat {
  min-height: 100%;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 36px rgba(9, 15, 24, 0.22);
  backdrop-filter: blur(10px);
}

.hero-stat strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.38rem;
  color: #ffffff;
}

.pillar-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.38rem;
  color: var(--ink);
}

.hero-stat span,
.pillar-card p {
  font-size: 0.93rem;
  line-height: 1.55;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.8);
}

.hero-stage {
  display: none;
}

.hero-shot {
  position: absolute;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.2);
}

.hero-shot img,
.showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-shot-main {
  inset: 1.2rem 0.3rem 4.4rem 1.6rem;
  z-index: 1;
}

.hero-shot-top {
  top: 0;
  right: 1.6rem;
  width: 43%;
  height: 31%;
  z-index: 2;
}

.hero-shot-bottom {
  left: 0;
  bottom: 0;
  width: 48%;
  height: 34%;
  z-index: 2;
}

.hero-ribbon {
  position: absolute;
  right: 1rem;
  bottom: 0.8rem;
  z-index: 3;
  max-width: 20rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(13, 118, 108, 0.18);
  border-radius: 18px;
  background: rgba(13, 118, 108, 0.92);
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(13, 118, 108, 0.28);
}

.section {
  margin-top: 1.45rem;
}

.marketing-stack {
  margin-top: 1.45rem;
  gap: 1.35rem;
}

.section-intro {
  gap: 1.1rem;
}

.section-copy {
  max-width: 66rem;
}

.pillar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.pillar-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.84));
}

.showcase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-card {
  display: grid;
  gap: 1rem;
  align-content: start;
  overflow: hidden;
}

.showcase-card-wide {
  grid-column: span 2;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
}

.showcase-card-roles .showcase-media {
  min-height: 360px;
}

.showcase-copy {
  display: grid;
  gap: 0.7rem;
}

.showcase-copy p {
  line-height: 1.6;
  font-size: 0.98rem;
}

.showcase-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-strong);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.showcase-card:not(.showcase-card-wide) .showcase-media {
  min-height: 260px;
}

.feature-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  background:
    linear-gradient(140deg, rgba(13, 118, 108, 0.14), rgba(255, 255, 255, 0.92) 42%),
    linear-gradient(320deg, rgba(194, 105, 56, 0.14), transparent 48%);
}

.cta-banner .cta-row {
  margin-top: 0;
  justify-content: flex-end;
}

.split-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card {
  min-height: 100%;
}

.portal-dashboard {
  grid-column: 1 / -1;
}

.portal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.portal-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.portal-entry h3 {
  margin: 0;
  font-size: 1.05rem;
}

.portal-entry p {
  margin-top: 0.35rem;
}

.portal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.portal-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.portal-columns section {
  min-width: 0;
}

.portal-columns h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
}

.stack {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.32rem;
  font-weight: 700;
}

label span {
  font-size: 0.92rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

button {
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.accent-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-ink);
  box-shadow: 0 12px 28px rgba(13, 118, 108, 0.22);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line-strong);
  color: var(--ink);
}

.status-msg {
  min-height: 1.3rem;
  margin: 0;
}

.choice-list {
  display: grid;
  gap: 0.65rem;
}

.choice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
}

.choice-item strong {
  display: block;
}

.choice-item span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.choice-item.empty-state {
  justify-content: flex-start;
}

.choice-item.empty-state span {
  margin-top: 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.create-progress {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid rgba(13, 118, 108, 0.22);
  border-radius: 18px;
  background: rgba(13, 118, 108, 0.06);
  display: grid;
  gap: 0.7rem;
}

.create-progress h3 {
  font-size: 1rem;
}

.progress-bar {
  width: 100%;
  height: 0.7rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 118, 108, 0.16);
}

.progress-bar > span {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #115e59);
  animation: realmProgressSlide 1.4s ease-in-out infinite;
}

@keyframes realmProgressSlide {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(95%); }
  100% { transform: translateX(-120%); }
}

.hidden {
  display: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1000;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.26);
}

.auth-modal-card {
  width: min(540px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.auth-switch-btn {
  margin-top: 0.75rem;
  width: 100%;
}

.site-head .head-actions .ghost-btn,
.site-head .head-actions .accent-btn {
  min-height: 2.55rem;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 32px rgba(12, 20, 32, 0.2);
}

.site-head .head-actions {
  padding: 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 18, 30, 0.46);
  backdrop-filter: blur(12px);
}

.site-head .head-actions .ghost-btn {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.site-head .head-actions .accent-btn {
  background: linear-gradient(135deg, rgba(13, 118, 108, 0.96), rgba(10, 92, 84, 0.94));
}

body.portal-active .site-head {
  position: static;
  left: auto;
  transform: none;
  padding: 1rem 0 0.7rem;
}

body.portal-active .brand {
  color: var(--ink);
  text-shadow: none;
}

body.portal-active .site-head .head-actions .ghost-btn,
body.portal-active .site-head .head-actions .accent-btn {
  border-color: var(--line-strong);
  box-shadow: none;
}

body.portal-active .site-head .head-actions {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

body.portal-active .site-head .head-actions .ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

@media (max-width: 1180px) {
  .hero-grid,
  .showcase-card-wide {
    grid-template-columns: 1fr;
  }

  .hero-shell,
  .hero {
    min-height: 760px;
  }

  .hero-stats,
  .pillar-grid,
  .showcase-grid,
  .split-section,
  .portal-columns {
    grid-template-columns: 1fr;
  }

  .showcase-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .site-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-shell,
  .hero {
    min-height: 700px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.3rem, 10vw, 3.6rem);
  }

  .portal-entry {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-entry-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .cta-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-banner .cta-row {
    justify-content: flex-start;
  }

  body.portal-active .site-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
