@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

/* Shared visual system and structural improvements */
:root {
  --background: 42 35% 98%;
  --secondary: 42 30% 95%;
  --muted: 42 22% 93%;
  --border: 40 24% 86%;
  --radius: 0.875rem;
}

/* Typography matched to lcm.org.au */
:root {
  --font-sans: "Open Sans", Arial, sans-serif;
  --font-serif: "Open Sans", Arial, sans-serif;
}

html, body, button, input, select, textarea {
  font-family: "Open Sans", Arial, sans-serif;
}

body {
  font-size: 16px;
  line-height: 24px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Open Sans", Arial, sans-serif;
  letter-spacing: normal;
}

header nav > div > a:first-child h1 {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: normal;
}

header nav > div > div:nth-child(2) > a,
header nav > div > div:nth-child(2) > div > a {
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: normal;
}

main > section:first-child:not(.page-hero) h1 {
  font-size: clamp(2rem, 4vw, 2.125rem);
  font-weight: 600;
  line-height: 44px;
  letter-spacing: normal;
}

.page-hero h1,
main section:not(:first-child) h2 {
  font-size: clamp(1.75rem, 4vw, 2.1875rem);
  font-weight: 700;
  line-height: 42px;
  letter-spacing: normal;
}

main h3,
.event-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: normal;
}

main p,
footer,
footer p,
footer a {
  font-size: 16px;
  line-height: 24px;
}

button,
a[class*="button"],
a[class*="btn"] {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: normal;
}

html {
  scroll-padding-top: 6rem;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 0 0, hsl(var(--gold) / 0.05), transparent 26rem),
    hsl(var(--background));
}

::selection {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  box-shadow: 0 10px 24px hsl(var(--navy-dark) / 0.25);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation */
header {
  border-color: hsl(var(--border) / 0.7) !important;
  background: hsl(var(--background) / 0.9) !important;
  box-shadow: 0 1px 0 hsl(var(--navy-dark) / 0.03);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}

header.is-scrolled {
  background: hsl(var(--background) / 0.97) !important;
  box-shadow: 0 12px 34px hsl(var(--navy-dark) / 0.1);
}

header nav > div > a:first-child img {
  transition: transform 220ms ease;
}

header nav > div > a:first-child:hover img {
  transform: scale(1.04);
}

header nav > div > a:first-child h1 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

header nav > div > div:nth-child(2) > a,
header nav > div > div:nth-child(2) > div > a {
  position: relative;
  padding: 0.55rem 0.2rem;
  font-size: 0.95rem;
}

header nav > div > div:nth-child(2) > a::after,
header nav > div > div:nth-child(2) > div > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.2rem;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: hsl(var(--gold));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

header nav > div > div:nth-child(2) a:hover::after,
header nav > div > div:nth-child(2) a[aria-current="page"]::after {
  transform: scaleX(1);
}

header nav > div > button {
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--card) / 0.8);
}

/* Page rhythm and typography */
.container-wide {
  width: min(100%, 80rem);
}

.section-padding {
  padding-top: clamp(4.5rem, 7vw, 7rem);
  padding-bottom: clamp(4.5rem, 7vw, 7rem);
}

main h1,
main h2,
main h3 {
  text-wrap: balance;
}

main h2 {
  line-height: 1.12;
}

main p {
  line-height: 1.75;
}

main .text-muted-foreground {
  color: hsl(200 15% 40%);
}

/* Home hero */
main > section:first-child:not(.page-hero) {
  min-height: min(90vh, 54rem);
}

main > section:first-child:not(.page-hero) .hero-overlay {
  background: linear-gradient(
    180deg,
    hsl(var(--navy-dark) / 0.42) 0%,
    hsl(var(--navy-dark) / 0.34) 42%,
    hsl(var(--navy-dark) / 0.82) 100%
  );
}

main > section:first-child:not(.page-hero) h1 {
  max-width: 56rem;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-shadow: 0 5px 24px hsl(var(--navy-dark) / 0.5);
}

main > section:first-child:not(.page-hero) button[aria-label^="Go to slide"] {
  min-width: 0.75rem;
  min-height: 0.75rem;
  outline-offset: 5px;
}

/* Interior page heroes */
.page-hero {
  min-height: clamp(22rem, 46vh, 32rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  background-position: center 42%;
}

.page-hero .hero-overlay {
  background: linear-gradient(
    180deg,
    hsl(var(--navy-dark) / 0.25) 0%,
    hsl(var(--navy-dark) / 0.78) 100%
  );
}

.page-hero h1 {
  max-width: 55rem;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow: 0 4px 22px hsl(var(--navy-dark) / 0.45);
}

.page-hero p {
  max-width: 42rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

/* Cards, timelines and calls to action */
main .bg-card {
  border-radius: 1rem;
  box-shadow: 0 12px 32px hsl(var(--navy-dark) / 0.07);
}

main .card-hover {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

main .card-hover:hover {
  border-color: hsl(var(--gold) / 0.62);
  box-shadow: 0 22px 46px hsl(var(--navy-dark) / 0.13);
}

main a[class*="bg-accent"],
main a[class*="bg-gold"],
main button[class*="bg-accent"],
main button[class*="bg-gold"] {
  min-height: 2.9rem;
  border-radius: 999px;
  padding-right: 1.35rem;
  padding-left: 1.35rem;
  box-shadow: 0 10px 22px hsl(var(--navy-dark) / 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

main a[class*="bg-accent"]:hover,
main a[class*="bg-gold"]:hover,
main button[class*="bg-accent"]:hover,
main button[class*="bg-gold"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px hsl(var(--navy-dark) / 0.17);
}

main > section:last-child.relative.overflow-hidden {
  min-height: 24rem;
  display: flex;
  align-items: center;
}

/* Forms */
form input,
form textarea {
  border-color: hsl(var(--border));
  border-radius: 0.75rem !important;
  background: hsl(var(--card));
  box-shadow: inset 0 1px 2px hsl(var(--navy-dark) / 0.035);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

form input {
  min-height: 3rem;
}

form textarea {
  min-height: 9rem;
}

form input:focus,
form textarea:focus {
  border-color: hsl(var(--accent));
  box-shadow: 0 0 0 4px hsl(var(--accent) / 0.12);
}

form label {
  color: hsl(var(--foreground));
  font-weight: 600;
}

form button[type="submit"] {
  min-height: 3.15rem !important;
}

/* Admin content guidance */
.admin-events-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid hsl(var(--accent) / 0.22);
  border-radius: 0.9rem;
  color: hsl(var(--foreground));
  background: hsl(var(--accent) / 0.07);
}

.admin-events-guide p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.admin-events-guide a {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 600;
}

/* Unified admin workspace */
body.admin-unified aside {
  display: none !important;
}

body.admin-unified main {
  width: 100%;
  margin-left: 0 !important;
  padding: clamp(1rem, 3vw, 2.5rem) !important;
}

.admin-dashboard-unified > :not(.unified-admin-panel) {
  display: none !important;
}

.unified-admin-panel {
  width: min(100%, 86rem);
  margin: 0 auto;
}

.unified-admin-heading {
  margin-bottom: 1.5rem;
}

.unified-admin-heading h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: hsl(var(--foreground));
}

.unified-admin-heading p {
  margin: 0;
  color: hsl(var(--muted-foreground));
}

.unified-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.45rem;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  box-shadow: 0 8px 24px hsl(var(--navy-dark) / 0.06);
}

.unified-admin-tab {
  flex: 1 1 10rem;
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  color: hsl(var(--muted-foreground));
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.unified-admin-tab:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.75);
}

.unified-admin-tab.is-active {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  box-shadow: 0 7px 18px hsl(var(--primary) / 0.22);
}

.unified-admin-frame-wrap {
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  box-shadow: 0 16px 38px hsl(var(--navy-dark) / 0.09);
}

.unified-admin-frame {
  display: block;
  width: 100%;
  min-height: 52rem;
  border: 0;
  background: hsl(var(--secondary));
}

html.embedded-admin,
html.embedded-admin body {
  min-width: 320px;
  background: hsl(var(--secondary));
}

html.embedded-admin header,
html.embedded-admin aside,
html.embedded-admin .skip-link {
  display: none !important;
}

html.embedded-admin main {
  width: 100% !important;
  min-height: 100vh;
  margin-left: 0 !important;
  padding: clamp(1rem, 3vw, 2rem) !important;
}

html.embedded-admin body > #root > div > div.flex {
  display: block !important;
}

/* Footer */
footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0, hsl(var(--teal) / 0.22), transparent 24rem),
    linear-gradient(145deg, hsl(200 45% 23%), hsl(195 42% 29%)) !important;
}

footer::before {
  content: "";
  position: absolute;
  top: -8rem;
  right: -6rem;
  width: 21rem;
  height: 21rem;
  border: 1px solid hsl(var(--gold) / 0.13);
  border-radius: 50%;
  pointer-events: none;
}

footer .container-wide {
  position: relative;
  z-index: 1;
}

footer h4 {
  color: hsl(var(--gold-light));
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

footer a {
  text-underline-offset: 0.25rem;
}

footer a:hover {
  text-decoration: underline;
}

footer .grid > div:first-child > a:first-child img {
  width: auto;
  height: 6.25rem;
  padding: 0;
  border-radius: 0.45rem;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 5px 14px hsl(0 0% 0% / 0.2));
}

footer .grid > div:first-child > a:first-child {
  width: fit-content;
}

footer .break-all {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 767px) {
  header nav > div {
    height: 4.5rem;
  }

  header nav > div > a:first-child img {
    height: 3.25rem;
  }

  header nav > div:first-child > a:first-child::after {
    content: "LCM Sisters";
    color: hsl(var(--primary));
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  header nav > div:nth-child(2) {
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
    background: hsl(var(--background) / 0.98);
    box-shadow: 0 18px 34px hsl(var(--navy-dark) / 0.12);
  }

  header nav > div:nth-child(2) a {
    border-radius: 0.65rem;
    transition: color 160ms ease, background-color 160ms ease;
  }

  header nav > div:nth-child(2) a:hover,
  header nav > div:nth-child(2) a[aria-current="page"] {
    background: hsl(var(--accent) / 0.08);
  }

  main.pt-20 {
    padding-top: 4.5rem;
  }

  .section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .page-hero {
    min-height: 22rem;
    padding-bottom: 3rem;
  }

  .page-hero h1 {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  main > section:first-child:not(.page-hero) {
    min-height: 80vh;
  }

  footer .grid {
    gap: 2.5rem;
  }

  .admin-events-guide {
    align-items: flex-start;
    flex-direction: column;
  }

  .unified-admin-frame {
    min-height: 58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Final reference-site typography overrides */
html, body, button, input, select, textarea { font-family: "Open Sans", Arial, sans-serif; }
body { font-size: 16px; line-height: 24px; }
h1, h2, h3, h4, h5, h6 { font-family: "Open Sans", Arial, sans-serif; letter-spacing: normal; }
header nav > div > a:first-child h1 { font-size: 16px; font-weight: 700; line-height: 24px; letter-spacing: normal; }
header nav > div > div:nth-child(2) > a,
header nav > div > div:nth-child(2) > div > a { font-size: 14px; font-weight: 700; line-height: 24px; letter-spacing: normal; }
main > section:first-child:not(.page-hero) h1 { font-size: clamp(2rem, 4vw, 2.125rem); font-weight: 600; line-height: 44px; letter-spacing: normal; }
.page-hero h1,
main section:not(:first-child) h2 { font-size: clamp(1.75rem, 4vw, 2.1875rem); font-weight: 700; line-height: 42px; letter-spacing: normal; }
main h3,
main h3[class*="text-xl"],
.event-card h3 { font-size: 18px; font-weight: 700; line-height: 24px; letter-spacing: normal; }
main p, footer, footer p, footer a { font-size: 16px; line-height: 24px; }
button, a[class*="button"], a[class*="btn"] { font-size: 16px; font-weight: 700; line-height: 24px; letter-spacing: normal; }
