/* ======================================================================
   Athegili
   Palette sampled from the logo: hot magenta wordmark, ivory letterforms,
   gold trim, near-black outline.
   ====================================================================== */

:root {
  --pink:        #e8197f;
  --pink-dark:   #b81263;
  --pink-light:  #ff5fa8;
  --pink-wash:   #fdeaf3;
  --gold:        #c9992f;
  --gold-light:  #e5c56a;
  --cream:       #fbf3df;
  --cream-deep:  #f5e8ca;
  --ink:         #1f1620;
  --ink-soft:    #574a58;
  --ink-faint:   #8c7f8d;
  --white:       #ffffff;
  --line:        #ecdfe6;
  --ok:          #197a4b;
  --ok-wash:     #e6f4ec;
  --warn:        #a8341c;
  --warn-wash:   #fdecE8;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(31, 22, 32, .06), 0 8px 24px rgba(31, 22, 32, .07);
  --shadow-lg: 0 2px 6px rgba(31, 22, 32, .08), 0 18px 46px rgba(31, 22, 32, .12);
  --wrap:      1140px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", "Noto Sans Sinhala", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

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

a { color: var(--pink-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 600;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: .4rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--pink-light);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------------
   Header
   -------------------------------------------------------------------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 10px; padding-bottom: 10px;
}

.brand img { width: 210px; height: auto; }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--ink); font-weight: 500; font-size: .95rem;
  padding: 6px 0; position: relative;
}
.site-nav a:hover { color: var(--pink-dark); text-decoration: none; }
.site-nav a.active { color: var(--pink-dark); }
.site-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--pink);
}
.site-nav a.btn.active::after { display: none; }

.badge {
  display: inline-block; min-width: 20px; padding: 1px 6px;
  background: var(--pink); color: var(--white);
  border-radius: 999px; font-size: .74rem; font-weight: 700;
  text-align: center; vertical-align: 2px;
}

.inline-form { display: inline; }

/* Checkbox-driven mobile menu, so no JS is needed for navigation. */
.nav-toggle-label { display: none; }

/* ----------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 22px; border: 1px solid transparent;
  border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-align: center; transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--pink); color: var(--white); box-shadow: 0 2px 10px rgba(232, 25, 127, .28); }
.btn-primary:hover { background: var(--pink-dark); }

.btn-gold { background: var(--gold); color: #2a2008; }
.btn-gold:hover { background: var(--gold-light); }

.btn-outline { background: transparent; border-color: var(--pink); color: var(--pink-dark); }
.btn-outline:hover { background: var(--pink-wash); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--cream-deep); color: var(--ink); }

.btn-sm { padding: 7px 15px; font-size: .87rem; }
.btn-lg { padding: 14px 30px; font-size: 1.03rem; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------- */

.alert {
  padding: 13px 18px; border-radius: var(--radius-sm);
  margin: 18px 0; border: 1px solid; font-size: .95rem;
}
.alert-success { background: var(--ok-wash);   border-color: #b9e0c9; color: var(--ok); }
.alert-error   { background: var(--warn-wash); border-color: #f2c4b8; color: var(--warn); }
.alert-info    { background: var(--pink-wash); border-color: #f6cfe1; color: var(--pink-dark); }

/* ----------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(1100px 460px at 12% -8%, rgba(232, 25, 127, .13), transparent 62%),
    radial-gradient(900px 420px at 88% 0%, rgba(201, 153, 47, .16), transparent 60%),
    linear-gradient(180deg, var(--white), var(--cream));
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 56px 20px 64px; }
.hero-copy { max-width: 720px; }
.hero-logo { width: min(440px, 88%); margin-bottom: 22px; }
.hero h1 { font-size: clamp(1.95rem, 4.6vw, 3.1rem); margin-bottom: .45em; }

.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.hero-note { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.hero-note strong { color: var(--pink-dark); font-size: 1.05rem; }

/* ----------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------- */

.section-title { text-align: center; margin-bottom: 32px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.section-head .section-title, .section-head h1, .section-head h2 {
  text-align: left; margin-bottom: 0;
}
.link-more { font-weight: 600; font-size: .93rem; white-space: nowrap; }

.steps {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.step {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--pink-wash); color: var(--pink-dark);
  font-weight: 700; font-family: var(--serif); font-size: 1.15rem;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: .35em; }
.step p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

/* ----------------------------------------------------------------------
   Profile cards
   -------------------------------------------------------------------- */

.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-photo {
  display: block; aspect-ratio: 4 / 3; background: var(--cream-deep);
  overflow: hidden; position: relative;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }

.avatar-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 2.6rem; font-weight: 600;
  color: var(--pink); background: var(--pink-wash);
}
.avatar-fallback.lg { font-size: 4.5rem; }
.avatar-fallback.sm { font-size: 1.3rem; position: static; width: 100%; height: 100%; }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-title { margin-bottom: .2em; font-size: 1.15rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--pink-dark); }
.card-meta { color: var(--ink-faint); font-size: .88rem; margin-bottom: .6rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 .7rem; }
.chip {
  background: var(--cream-deep); color: var(--ink-soft);
  border-radius: 999px; padding: 3px 11px; font-size: .78rem; font-weight: 500;
}

.card-line { font-size: .89rem; margin: 0 0 .3rem; color: var(--ink-soft); }
.card-line .label { color: var(--ink-faint); }
.card-cta { margin-top: auto; align-self: flex-start; }

/* ----------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------- */

.filters {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin: 22px 0 30px;
  box-shadow: var(--shadow);
}
.filters-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  align-items: end;
}
.filters .field { margin: 0; }
.filters-actions { display: flex; gap: 8px; }

/* ----------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------- */

.form-page {
  max-width: 480px; margin: 0 auto;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.form-page-wide { max-width: 780px; }

fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  padding: 0 0 10px; margin-bottom: 6px; width: 100%;
  border-bottom: 1px solid var(--line);
}

.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.req { color: var(--pink); }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], input[type="tel"], input[type="search"], input[type="file"],
select, textarea {
  width: 100%; padding: 10px 13px; font: inherit; font-size: .95rem;
  color: var(--ink); background: var(--white);
  border: 1px solid #dcd0d7; border-radius: var(--radius-sm);
}
textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--pink); outline: none;
  box-shadow: 0 0 0 3px rgba(232, 25, 127, .14);
}

.has-error { border-color: var(--warn) !important; }
.field-error { color: var(--warn); font-size: .85rem; margin: 5px 0 0; font-weight: 500; }
.hint { color: var(--ink-faint); font-size: .82rem; margin: 5px 0 0; }

.checkbox-field label { font-weight: 400; font-size: .92rem; display: flex; gap: 9px; align-items: flex-start; }
.checkbox-field input { width: auto; margin-top: 3px; flex-shrink: 0; }

.photo-field { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.photo-preview {
  width: 130px; height: 130px; border-radius: var(--radius-sm);
  overflow: hidden; position: relative; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--cream-deep);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-field .field { flex: 1; min-width: 220px; margin: 0; }

/* ----------------------------------------------------------------------
   Profile detail
   -------------------------------------------------------------------- */

.back-link { display: inline-block; margin-bottom: 18px; font-size: .93rem; font-weight: 500; }

.profile-detail { display: grid; gap: 30px; grid-template-columns: 300px 1fr; align-items: start; }

.profile-side {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  position: sticky; top: 90px;
}
.profile-photo {
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  position: relative; margin-bottom: 16px; background: var(--cream-deep);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-main {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.profile-summary { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.6rem; }

.profile-block { margin-bottom: 30px; }
.profile-block:last-child { margin-bottom: 0; }
.profile-block h2 {
  font-size: 1.15rem; padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.prose { white-space: pre-wrap; color: var(--ink-soft); }

.detail-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0; }
.detail-row { display: flex; gap: 10px; font-size: .94rem; }
.detail-row dt { color: var(--ink-faint); min-width: 108px; flex-shrink: 0; }
.detail-row dd { margin: 0; font-weight: 500; }

.locked {
  background: var(--cream-deep); border: 1px dashed var(--gold);
  border-radius: var(--radius-sm); padding: 15px;
  color: var(--ink-soft); font-size: .92rem; margin: 0;
}

.interest-form textarea { margin-bottom: 11px; }
.interest-form label { font-size: .86rem; }

.interest-state {
  padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; text-align: center;
}
.interest-pending  { background: var(--cream-deep); color: var(--ink-soft); }
.interest-accepted { background: var(--ok-wash);   color: var(--ok); }
.interest-declined { background: var(--warn-wash); color: var(--warn); }

.notice {
  margin: 14px 0 0; padding: 11px 14px; background: var(--pink-wash);
  border-radius: var(--radius-sm); font-size: .87rem; color: var(--pink-dark);
}

/* ----------------------------------------------------------------------
   Interests list
   -------------------------------------------------------------------- */

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 22px 0 26px; }
.tab {
  padding: 11px 20px; font-weight: 600; font-size: .94rem;
  color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--pink-dark); text-decoration: none; }
.tab.active { color: var(--pink-dark); border-bottom-color: var(--pink); }

.interest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.interest-item {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.interest-avatar {
  width: 74px; height: 74px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--cream-deep);
}
.interest-avatar img { width: 100%; height: 100%; object-fit: cover; }
.interest-body { flex: 1; min-width: 190px; }
.interest-body h3 { margin-bottom: .1em; font-size: 1.06rem; }
.interest-body h3 a { color: var(--ink); }
.interest-message {
  margin: 9px 0 0; padding: 9px 13px; background: var(--cream);
  border-left: 3px solid var(--gold-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem; color: var(--ink-soft);
}
.interest-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.status {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; text-transform: capitalize;
}
.status-pending  { background: var(--cream-deep); color: #7a6522; }
.status-accepted { background: var(--ok-wash);   color: var(--ok); }
.status-declined { background: var(--warn-wash); color: var(--warn); }

/* ----------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------- */

.stat-row {
  display: grid; gap: 16px; margin: 24px 0 28px;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}
.stat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-num {
  display: block; font-family: var(--serif); font-size: 2.1rem;
  font-weight: 600; color: var(--pink-dark); line-height: 1.1;
}
.stat-label { font-size: .85rem; color: var(--ink-faint); }

.dash-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.1rem; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem;
}
.mini-list li:last-child { border-bottom: 0; }
.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ----------------------------------------------------------------------
   Empty states, pagination, CTA band
   -------------------------------------------------------------------- */

.empty {
  text-align: center; padding: 54px 24px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 1.4rem; }
.empty .hero-actions { justify-content: center; }

.error-page .error-code {
  font-family: var(--serif); font-size: 4rem; font-weight: 600;
  color: var(--pink-light); line-height: 1; margin: 0 0 .2em;
}

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 34px; }
.page-info { color: var(--ink-faint); font-size: .9rem; }

.cta-band {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink));
  color: var(--white); margin-top: 20px;
}
.cta-inner { padding: 52px 20px; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 48ch; margin: 0 auto 1.6rem; }

.prose-page { max-width: 720px; margin: 0 auto; }
.prose-page h2 { margin-top: 1.8em; }
.prose-page ul { color: var(--ink-soft); padding-left: 1.2em; }
.prose-page li { margin-bottom: .5rem; }

/* ----------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */

.site-footer { background: var(--white); border-top: 1px solid var(--line); margin-top: 0; }
.footer-grid {
  display: grid; gap: 32px; padding: 46px 20px 26px;
  grid-template-columns: 1.5fr 1fr 1.2fr;
}
.footer-logo { width: 180px; margin-bottom: 14px; }
.site-footer h3 { font-size: .95rem; margin-bottom: .8em; }
.site-footer p, .site-footer li { font-size: .89rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 18px 20px; border-top: 1px solid var(--line);
}
.footer-bottom p { margin: 0; font-size: .85rem; }

/* ----------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------- */

@media (max-width: 900px) {
  .profile-detail { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 42px; height: 42px; padding: 9px; cursor: pointer;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px; box-shadow: var(--shadow-lg);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.active::after { display: none; }
  .site-nav .btn { margin-top: 12px; border-bottom: 0; }
  .inline-form { display: block; margin-top: 10px; }

  .brand img { width: 165px; }
  .field-row { grid-template-columns: 1fr; }
  .form-page { padding: 22px; }
  .profile-main { padding: 22px; }
  .section { padding: 34px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-inner { padding: 38px 20px 46px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
