/*
 * Mangala Nakatha v2.1 premium interface refresh.
 * Self-hosted bilingual typography and refined member/profile presentation.
 */

@font-face {
  font-display: swap;
  font-family: "Mangala Manrope";
  font-style: normal;
  font-weight: 200 800;
  src: url("/assets/fonts/manrope-latin-variable.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Cormorant";
  font-style: normal;
  font-weight: 500;
  src: url("/assets/fonts/cormorant-garamond-latin-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Cormorant";
  font-style: normal;
  font-weight: 600;
  src: url("/assets/fonts/cormorant-garamond-latin-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Cormorant";
  font-style: italic;
  font-weight: 500;
  src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/noto-sans-sinhala-400.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Sans";
  font-style: normal;
  font-weight: 500;
  src: url("/assets/fonts/noto-sans-sinhala-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Sans";
  font-style: normal;
  font-weight: 600;
  src: url("/assets/fonts/noto-sans-sinhala-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Sans";
  font-style: normal;
  font-weight: 700;
  src: url("/assets/fonts/noto-sans-sinhala-700.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Serif";
  font-style: normal;
  font-weight: 500;
  src: url("/assets/fonts/noto-serif-sinhala-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Mangala Sinhala Serif";
  font-style: normal;
  font-weight: 600;
  src: url("/assets/fonts/noto-serif-sinhala-600.woff2") format("woff2");
}

:root {
  --ink: #25162b;
  --muted: #746979;
  --purple-950: #1d0b27;
  --purple-900: #32113f;
  --purple-800: #4c1b5d;
  --purple-700: #652679;
  --purple-600: #7c348f;
  --purple-500: #9a51aa;
  --purple-100: #f0e4f3;
  --purple-50: #faf6fb;
  --gold: #c8a05b;
  --gold-light: #f2dfb7;
  --ivory: #fffdf8;
  --line: #e8dfea;
  --shadow-sm: 0 12px 34px rgb(47 18 57 / 8%);
  --shadow-md: 0 24px 64px rgb(47 18 57 / 14%);
  --font-ui:
    "Mangala Manrope",
    "Mangala Sinhala Sans",
    "Noto Sans Sinhala",
    "Iskoola Pota",
    Arial,
    sans-serif;
  --font-display:
    "Mangala Cormorant",
    "Mangala Sinhala Serif",
    "Noto Serif Sinhala",
    Georgia,
    serif;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --header-height: 86px;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

body {
  background:
    radial-gradient(circle at 94% 7%, rgb(151 74 169 / 4%), transparent 22rem),
    var(--ivory);
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

:lang(si) {
  letter-spacing: normal !important;
  line-height: 1.7;
}

h1,
h2,
h3,
.hero h1,
.section-copy h2,
.section-heading h2,
.vip-banner-copy h2,
.final-cta h2,
.page-hero h1,
.auth-card h1,
.registration-card h2,
.dashboard-heading h2,
.status-card strong,
.suggestion-card h3,
.editorial-card h3,
.package-card h2,
.package-card h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.announcement {
  background:
    linear-gradient(90deg, rgb(255 255 255 / 3%), transparent 30% 70%, rgb(255 255 255 / 3%)),
    var(--purple-950);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  min-height: 34px;
}

.announcement i {
  background: var(--gold);
  box-shadow: 0 0 10px rgb(200 160 91 / 55%);
  height: 4px;
  width: 4px;
}

.site-header {
  background: rgb(255 253 248 / 96%);
  border-bottom-color: rgb(80 43 87 / 10%);
  box-shadow: 0 8px 28px rgb(44 18 52 / 4%);
  height: var(--header-height);
}

.header-inner {
  gap: 28px;
  grid-template-columns: 250px minmax(0, 1fr) 200px;
}

.brand {
  border-radius: 15px;
}

.header-brand-logo {
  border-radius: 12px;
  filter: drop-shadow(0 8px 18px rgb(35 10 44 / 16%));
  height: 72px;
  object-fit: contain;
  width: auto;
}

.primary-nav a {
  color: #5d5261;
  font-size: 12px;
  font-weight: 700;
  padding-block: 32px;
}

.primary-nav a::after {
  background: linear-gradient(90deg, var(--gold), var(--purple-600));
  bottom: 23px;
  height: 2px;
  width: 28px;
}

.text-link {
  font-size: 12px;
  font-weight: 750;
}

.button {
  border-radius: 13px;
  box-shadow:
    0 12px 28px rgb(76 27 93 / 17%),
    inset 0 1px rgb(255 255 255 / 16%);
  font-size: 13px;
  font-weight: 750;
  min-height: 48px;
  padding: 12px 22px;
}

.button:hover {
  box-shadow:
    0 18px 38px rgb(76 27 93 / 24%),
    inset 0 1px rgb(255 255 255 / 20%);
}

.button-small {
  border-radius: 11px;
  min-height: 41px;
}

.button-outline {
  background: rgb(255 255 255 / 72%);
  border-color: #d9c8dd;
}

.button-gold {
  background: linear-gradient(135deg, #efd69f, #bf8e42);
}

.hero {
  background:
    linear-gradient(90deg, rgb(25 7 34 / 94%) 0%, rgb(54 15 68 / 78%) 40%, rgb(46 13 57 / 11%) 73%),
    url("/assets/images/home-hero.webp") center 42% / cover no-repeat;
}

.hero-copy {
  max-width: 675px;
}

.hero-sinhala {
  color: var(--gold-light);
  font-family: "Mangala Sinhala Serif", "Noto Serif Sinhala", serif;
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.65;
  margin: -3px 0 15px;
}

.hero h1 {
  font-size: clamp(54px, 6.5vw, 90px);
  font-weight: 500;
  letter-spacing: -0.036em;
  line-height: 0.94;
}

.hero h1 em {
  color: #f0d7f4;
  font-family: var(--font-display);
}

.hero-lead {
  line-height: 1.78;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.section-copy h2,
.section-heading h2,
.vip-banner-copy h2,
.final-cta h2 {
  font-weight: 600;
  letter-spacing: -0.026em;
}

.image-frame,
.vip-banner,
.package-card,
.editorial-card,
.registration-card,
.dashboard-section,
.status-card,
.account-nav {
  border-color: rgb(88 44 97 / 12%);
  box-shadow: var(--shadow-sm);
}

.package-card,
.registration-card,
.dashboard-section,
.status-card {
  position: relative;
}

.package-card::before,
.registration-card::before,
.dashboard-section::before {
  background: linear-gradient(90deg, var(--gold), transparent 62%);
  border-radius: 99px;
  content: "";
  height: 2px;
  left: 24px;
  opacity: 0.68;
  position: absolute;
  top: 0;
  width: 78px;
}

.page-hero {
  background:
    radial-gradient(circle at 84% 20%, rgb(236 198 122 / 14%), transparent 28%),
    linear-gradient(145deg, #220c2d, #52205f);
}

.page-hero h1 {
  font-size: clamp(44px, 5.6vw, 70px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.filter-bar {
  background: rgb(255 255 255 / 96%);
  border-color: rgb(92 51 101 / 13%);
  border-radius: 20px;
  box-shadow: 0 18px 54px rgb(42 15 52 / 11%);
  padding: 18px;
}

.filter-bar input,
.filter-bar select,
.field input,
.field select,
.field textarea,
.inline-proposal-form input {
  background: #fffefd;
  border-color: #ddd1e0;
  border-radius: 12px;
  color: var(--ink);
}

.filter-bar input:focus,
.filter-bar select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-proposal-form input:focus {
  background: white;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 4px rgb(154 81 170 / 11%);
  outline: none;
}

.field label,
.filter-bar > label {
  color: #5f5364;
  font-size: 11px;
  font-weight: 750;
}

/* Premium proposal/profile cards */

.proposal-grid {
  gap: 26px;
}

.proposal-card {
  background: linear-gradient(180deg, #fff, #fffefd);
  border: 1px solid rgb(91 49 100 / 13%);
  border-radius: 25px;
  box-shadow: 0 16px 45px rgb(47 18 57 / 9%);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.proposal-card:hover {
  border-color: rgb(123 52 143 / 28%);
  box-shadow: 0 27px 70px rgb(47 18 57 / 16%);
  transform: translateY(-7px);
}

.vip-card {
  border-color: rgb(200 160 91 / 31%);
}

.vip-card::after {
  background: linear-gradient(90deg, transparent, #dfbd7c, transparent);
  content: "";
  height: 2px;
  left: 12%;
  position: absolute;
  right: 12%;
  top: 0;
  z-index: 3;
}

.proposal-image {
  align-items: flex-start;
  background-position: center 42%;
  min-height: 214px;
  overflow: hidden;
  padding: 17px;
}

.proposal-image::after {
  background:
    linear-gradient(180deg, rgb(26 8 34 / 4%) 35%, rgb(26 8 34 / 78%) 100%),
    radial-gradient(circle at 85% 10%, rgb(255 255 255 / 12%), transparent 25%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.proposal-image > img {
  z-index: 0;
}

.proposal-image .profile-kind,
.proposal-image .profile-tier {
  backdrop-filter: blur(12px);
  background: rgb(255 253 248 / 88%);
  border: 1px solid rgb(255 255 255 / 45%);
  box-shadow: 0 7px 20px rgb(28 8 35 / 15%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 7px 10px;
  z-index: 2;
}

.proposal-image .profile-tier {
  background: linear-gradient(135deg, #f4e3bd, #d6aa61);
  color: #3a1f36;
}

.proposal-image .photo-privacy-note {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgb(28 10 36 / 64%);
  border: 1px solid rgb(255 255 255 / 17%);
  bottom: 16px;
  box-shadow: none;
  color: rgb(255 255 255 / 88%);
  display: inline-flex;
  font-size: 9px;
  font-weight: 650;
  left: 16px;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  position: absolute;
  text-transform: none;
  z-index: 2;
}

.photo-privacy-note::before {
  background: var(--gold);
  border-radius: 50%;
  content: "";
  height: 5px;
  margin-right: 7px;
  width: 5px;
}

.proposal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.profile-card-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.profile-code {
  display: grid;
  gap: 3px;
}

.profile-code > span {
  color: #968a99;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-code > strong {
  color: var(--purple-800);
  font-size: 13px;
  letter-spacing: 0.045em;
}

.verified-chip {
  background: #edf6f1;
  border: 1px solid #d8eade;
  color: #2f6d53;
  font-size: 9px;
  font-weight: 800;
  padding: 7px 9px;
}

.profile-profession,
.proposal-body h2.profile-profession,
.proposal-body h3.profile-profession {
  color: var(--purple-950);
  font-family: var(--font-display);
  font-size: clamp(25px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 18px 0 8px;
}

.profile-subline,
.proposal-body > p.profile-subline {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 650;
  gap: 9px;
  margin: 0 0 18px;
}

.profile-subline i {
  background: var(--gold);
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 17px;
}

.profile-detail-grid > div {
  border-top: 1px solid var(--line);
  min-width: 0;
  padding: 13px 12px 11px 0;
}

.profile-detail-grid > div:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.profile-detail-grid dt {
  color: #998e9c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.profile-detail-grid dd {
  color: #443849;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.proposal-body .verification-row {
  gap: 6px;
  margin: 0 0 17px;
}

.proposal-body .verification-row span {
  background: #f1f8f4;
  border: 1px solid #deeee4;
  color: #347257;
  font-size: 9px;
  font-weight: 750;
  padding: 6px 8px;
}

.profile-card-actions {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 18px;
}

.visitor-reply-link,
.visitor-card-link {
  color: var(--purple-700);
  display: block;
  font-size: 10px;
  font-weight: 750;
  margin-top: 13px;
  text-align: center;
}

.visitor-card-link:hover,
.visitor-reply-link:hover {
  color: var(--purple-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Registration, profile editor and member dashboard */

.auth-page .auth-panel {
  background:
    radial-gradient(circle at 100% 0%, rgb(154 81 170 / 8%), transparent 18rem),
    var(--ivory);
}

.auth-card h1 {
  font-size: clamp(42px, 4.4vw, 58px);
  font-weight: 600;
}

.registration-card {
  background: linear-gradient(180deg, rgb(255 255 255 / 99%), rgb(255 253 248 / 99%));
  border-radius: 24px;
  padding: clamp(25px, 4.5vw, 40px);
}

.registration-card h2 {
  color: var(--purple-950);
  font-size: clamp(29px, 3vw, 37px);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.05;
}

.card-intro,
.registration-card > p:not(.eyebrow, .form-status) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.profile-editor-shell {
  max-width: 1240px;
}

.profile-editor-layout {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.profile-preview-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.profile-preview-card {
  background:
    radial-gradient(circle at 80% 4%, rgb(229 189 235 / 18%), transparent 28%),
    linear-gradient(155deg, #281032, #4a1a58);
  border: 1px solid rgb(230 202 235 / 18%);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  color: white;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.profile-preview-card::after {
  border: 1px solid rgb(232 201 140 / 22%);
  border-radius: 22px;
  content: "";
  inset: 7px;
  pointer-events: none;
  position: absolute;
}

.profile-preview-card .eyebrow {
  color: var(--gold-light);
}

.profile-preview-avatar,
.member-avatar {
  align-items: center;
  background: linear-gradient(145deg, #f9ecfb, #d6acd9);
  border: 3px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  box-shadow: 0 15px 38px rgb(21 6 28 / 28%);
  color: var(--purple-900);
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  height: 78px;
  justify-content: center;
  margin: 8px 0 20px;
  width: 78px;
}

.profile-preview-card h2 {
  color: white;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
}

.profile-preview-profession {
  color: rgb(255 255 255 / 68%);
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 0 16px;
}

.profile-preview-meta,
.member-banner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-preview-meta {
  margin-bottom: 24px;
}

.profile-preview-meta span,
.member-banner-pills span {
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  color: rgb(255 255 255 / 82%);
  font-size: 9px;
  font-weight: 700;
  padding: 7px 10px;
}

.profile-progress > div {
  align-items: center;
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.profile-progress > div span {
  color: rgb(255 255 255 / 67%);
}

.profile-progress > div strong {
  color: var(--gold-light);
  font-size: 11px;
}

.profile-progress-track {
  background: rgb(255 255 255 / 13%);
  border-radius: 999px;
  display: block;
  height: 6px;
  overflow: hidden;
}

.profile-progress-track i {
  background: linear-gradient(90deg, #c99d54, #eed59e);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 4px;
}

.profile-progress-light {
  border-top: 1px solid rgb(255 255 255 / 11%);
  padding-top: 18px;
}

.profile-privacy-note {
  border-top: 1px solid rgb(255 255 255 / 11%);
  margin-top: 21px;
  padding-top: 18px;
}

.profile-privacy-note strong {
  font-size: 11px;
}

.profile-privacy-note p {
  color: rgb(255 255 255 / 62%);
  font-size: 10px;
  line-height: 1.65;
  margin: 5px 0 0;
}

.profile-editor-content {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.profile-editor-content .registration-card {
  margin: 0;
  max-width: none;
}

.upload-row {
  border: 1px solid var(--line);
  border-radius: 15px;
  margin-top: 11px;
  padding: 15px;
}

.member-banner {
  background:
    radial-gradient(circle at 86% 8%, rgb(235 198 240 / 20%), transparent 27%),
    radial-gradient(circle at 12% 120%, rgb(200 160 91 / 14%), transparent 30%),
    linear-gradient(145deg, #240c2f, #521d60);
  padding-block: 56px;
}

.member-identity {
  align-items: center;
  display: flex;
  gap: 24px;
  min-width: 0;
}

.member-avatar {
  flex: 0 0 auto;
  height: 88px;
  margin: 0;
  width: 88px;
}

.member-banner h1 {
  font-size: clamp(41px, 4.6vw, 61px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 4px 0 10px;
}

.member-banner p:not(.eyebrow) {
  font-size: 12px;
  margin: 0;
}

.member-banner-pills {
  margin-top: 15px;
}

.member-banner-actions {
  display: grid;
  gap: 16px;
  min-width: 210px;
}

.status-card {
  border-radius: 20px;
  min-height: 170px;
  overflow: hidden;
  padding: 24px;
}

.status-card::after {
  background: var(--purple-100);
  border-radius: 50%;
  content: "";
  height: 72px;
  opacity: 0.42;
  position: absolute;
  right: -24px;
  top: -28px;
  width: 72px;
}

.status-card-membership::after {
  background: var(--gold-light);
}

.status-card-verification::after {
  background: #cce9d9;
}

.status-card .status-card-label {
  color: #8f8392;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.status-card strong {
  font-size: 23px;
  line-height: 1.05;
}

.dashboard-section {
  border-radius: 22px;
}

.dashboard-heading h2 {
  font-size: 32px;
  font-weight: 600;
}

.suggestion-card,
.visitor-reply-card {
  background: var(--purple-50);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.site-footer {
  background:
    radial-gradient(circle at 8% 10%, rgb(157 85 171 / 13%), transparent 28rem),
    #1b0924;
}

.footer-brand-logo {
  filter: drop-shadow(0 12px 26px rgb(0 0 0 / 24%));
}

.footer-grid h2,
.footer-grid h3 {
  color: white;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 190px minmax(0, 1fr) 175px;
    padding-inline: 22px;
  }

  .header-brand-logo {
    height: 66px;
  }

  .primary-nav {
    gap: 14px;
  }

  .primary-nav a {
    font-size: 11px;
  }
}

@media (max-width: 980px) {
  .profile-editor-layout {
    grid-template-columns: 1fr;
  }

  .profile-preview-panel {
    position: static;
  }

  .member-banner-inner {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 74px;
  }

  .announcement {
    font-size: 8px;
    gap: 9px;
    letter-spacing: 0.07em;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 16px;
  }

  .header-brand-logo {
    height: 62px;
  }

  .header-actions {
    display: none;
  }

  .primary-nav {
    background: rgb(255 253 248 / 99%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 45px rgb(42 15 52 / 13%);
    padding: 12px 18px 22px;
  }

  .primary-nav a {
    border-radius: 10px;
    font-size: 12px;
    padding: 12px;
  }

  .hero h1 {
    font-size: clamp(48px, 14vw, 68px);
  }

  .member-banner-inner,
  .member-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-banner-actions,
  .member-banner-actions .profile-progress {
    width: 100%;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail-grid > div:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 520px) {
  .announcement span:nth-of-type(2),
  .announcement i:nth-of-type(2) {
    display: none;
  }

  .proposal-image {
    min-height: 225px;
  }

  .proposal-body {
    padding: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .proposal-card,
  .button,
  .primary-nav a::after {
    transition: none;
  }
}
