/* Legalis Vita's public homepage. It follows the client's own site and
 * printed brand: a gold header, pearl surfaces, gold cards, Cormorant
 * Garamond for display type and Montserrat for text. Navy is kept for
 * type and a few lines, never as a section's background.
 *
 * The values below mirror config/settings/base.py's BRAND_* defaults; the
 * values actually served come from the branding context processor through
 * the page's own inline <style> block, which loads after this file and
 * wins. --on-gold and --on-gold-light are derived there (white or navy,
 * whichever reads better on the fill), so any palette stays legible. */

:root {
  --navy: #13233f;
  --navy-rgb: 19, 35, 63;
  --gold: #c9962a;
  --gold-rgb: 201, 150, 42;
  --paper: #f9f3ee;
  --paper-rgb: 249, 243, 238;
  --gold-light: #d6a843;
  --gold-light-rgb: 214, 168, 67;
  --on-gold: #13233f;
  --on-gold-light: #13233f;
  --gold-text: #8a6410;
  /* Type on the gold header and cards. White, as on the client's current
   * site; --on-gold / --on-gold-light stay the contrast-safe choice used
   * by hover states and buttons. */
  --on-fill: #fff;

  --paper-soft: color-mix(in srgb, var(--paper) 40%, #fff);
  --navy-soft: color-mix(in srgb, var(--navy) 78%, var(--paper));
  --line: rgba(var(--gold-rgb), .35);

  --serif: "Cormorant Garamond Variable", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat Variable", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold-light);
  color: var(--on-gold-light);
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
blockquote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin-top: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-150%);
}

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

.section {
  padding-block: 112px;
  scroll-margin-top: var(--header-height);
}

.eyebrow {
  color: var(--gold-text);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.rule {
  width: 96px;
  height: 1px;
  margin-top: 28px;
  background: var(--gold);
}

.section-intro {
  margin-bottom: 64px;
}

.section-intro h2 {
  margin-top: 14px;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.05;
  text-transform: uppercase;
}

.section-intro--center {
  text-align: center;
}

.section-intro--center .rule {
  margin-inline: auto;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(380px, 100%);
  margin-inline: auto;
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold);
}

.ornament span {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---- buttons -------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 38px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-text);
  font: 500 .82rem/1 var(--sans);
  letter-spacing: .24em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease;
}

.button--outline:hover,
.button--outline:focus-visible {
  background: var(--gold);
  color: var(--on-gold);
}

.button--light {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.button--light:hover,
.button--light:focus-visible {
  background: var(--gold-light);
  color: var(--on-gold-light);
}

/* ---- header --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--gold);
  color: var(--on-fill);
  box-shadow: 0 1px 0 rgba(var(--navy-rgb), .12);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
}

.brand {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  position: relative;
  padding-block: 8px;
  font-size: .86rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-options {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.language-options::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px auto 3px 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: var(--paper);
  transform: translateX(0);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}

.language-options[data-selected-language="en"]::before {
  transform: translateX(100%);
}

.language-options[data-selected-language="fr"]::before {
  transform: translateX(200%);
}

.language-options a {
  display: inline-block;
  width: 38px;
  min-width: 38px;
  text-align: center;
  text-decoration: none;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 .72rem/1 var(--sans);
  letter-spacing: .1em;
  cursor: pointer;
  transition: color .2s ease;
}

.language-options a:hover {
  background: rgba(var(--navy-rgb), .12);
}

.language-options[data-selected-language="es"] [lang="es"],
.language-options[data-selected-language="en"] [lang="en"],
.language-options[data-selected-language="fr"] [lang="fr"] {
  color: var(--navy);
}

.portal-link,
.portal-menu summary {
  display: inline-block;
  text-align: center;
  padding: 9px 20px;
  border: 1px solid currentColor;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.portal-menu summary::-webkit-details-marker {
  display: none;
}

.portal-link:hover,
.portal-link:focus-visible,
.portal-menu summary:hover,
.portal-menu[open] summary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

.portal-menu {
  position: relative;
}

.portal-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(var(--navy-rgb), .18);
  color: var(--navy);
}

.portal-menu__panel a {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  text-decoration: none;
}

.portal-menu__panel a:hover,
.portal-menu__panel a:focus-visible {
  background: rgba(var(--gold-rgb), .14);
}

.portal-menu__panel a > span {
  color: var(--gold-text);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.portal-menu__panel strong {
  font-family: var(--serif);
  font-size: 1.15rem;
}

/* ---- hero ----------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: 88px 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.hero-photo {
  position: relative;
  width: min(100%, 470px);
  margin: 0 0 24px 24px;
  justify-self: center;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  z-index: 0;
  border: 1px solid var(--gold);
  pointer-events: none;
}

.hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1280 / 1169;
  object-fit: cover;
}

.hero-brand {
  min-width: 0;
  container-type: inline-size;
  text-align: center;
}

.hero-seal img {
  width: clamp(170px, 20vw, 240px);
  height: auto;
  margin: 0 auto 8px;
}

.hero h1 {
  font-size: clamp(1.25rem, 8cqi, 3.4rem);
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.1;
  text-transform: uppercase;
  padding-left: .16em;
  overflow-wrap: anywhere;
}

.hero-tagline {
  margin: 20px 0 22px;
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-languages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 26px 0 30px;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-languages__label {
  flex-basis: 100%;
  color: var(--navy-soft);
  font-size: .7rem;
  letter-spacing: .3em;
}

.hero-languages i {
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--gold-text);
  transform: translateX(-50%);
}

/* ---- about ---------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.about-copy h2 {
  margin-bottom: 36px;
  color: var(--gold-text);
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  font-weight: 500;
  text-transform: uppercase;
}

.about-copy p {
  max-width: 34em;
  font-size: 1.06rem;
  line-height: 2.1;
}

.philosophy {
  position: relative;
  padding: 52px 48px 56px;
  border-left: 10px solid var(--navy);
  background: var(--gold-light);
  color: var(--on-fill);
}

.philosophy::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  right: 24px;
  font-family: var(--serif);
  font-size: 7rem;
  line-height: 1;
  opacity: .35;
}

.philosophy h2 {
  margin-bottom: 26px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  text-transform: uppercase;
}

.philosophy blockquote {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.95;
}

.reach {
  margin-top: 44px;
}

.reach h3 {
  margin-bottom: 12px;
  color: var(--gold-text);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reach p {
  margin: 0;
  line-height: 1.9;
}

/* ---- services ------------------------------------------------------- */

.services-section {
  border-block: 1px solid var(--line);
  background: var(--paper-soft);
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1010px;
  margin-inline: auto;
}

.services article {
  padding: 44px 52px 48px;
}

.services article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.services article:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.service-number {
  display: block;
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.services h3 {
  margin: 4px 0 24px;
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
}

.services li {
  position: relative;
  padding: 3px 0 3px 22px;
  font-size: 1rem;
}

.services li::before {
  content: "";
  position: absolute;
  top: 1em;
  left: 2px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---- statement ------------------------------------------------------ */

/* The plate is the client's banner without its lettering; the text is real
 * and sized in container units so it keeps the artwork's proportions. */
.statement {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1600 / 667;
  overflow: hidden;
  background: var(--paper-soft);
}

.statement-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.statement-copy {
  position: absolute;
  top: 50%;
  left: 43%;
  width: 41%;
  text-align: center;
  transform: translateY(-50%);
}

.statement-kicker {
  margin: 0 0 .4cqw;
  color: var(--gold-text);
  font-size: 1.05cqw;
  font-weight: 500;
  letter-spacing: .6em;
  padding-left: .6em;
  text-transform: uppercase;
}

.statement-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 6.1cqw;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.statement .ornament {
  width: 38cqw;
  max-width: 100%;
  margin-top: 1.6cqw;
}

.statement-line {
  margin: 1.8cqw 0 0;
  font-family: var(--serif);
  font-size: 2.1cqw;
  font-style: italic;
  line-height: 1.4;
}

/* ---- values --------------------------------------------------------- */

.values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1020px;
  margin-inline: auto;
}

.values li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px 38px;
  background: var(--gold-light);
  color: var(--on-fill);
  text-align: center;
}

.values li:nth-child(even) {
  background: var(--gold);
}

.value-icon {
  display: grid;
  height: 56px;
  margin-block: 22px;
  place-items: center;
}

/* The monochrome icons are black in the file; white here. The stars icon
 * brings its own colors (gold stars on a white pill). */
.value-icon img {
  width: auto;
  height: 100%;
  max-width: 104px;
  filter: brightness(0) invert(1);
}

.value-icon--stars img {
  height: 22px;
  filter: none;
}

.value-icon--handshake img {
  height: 44px;
}

.value-icon--people img {
  height: 48px;
}

.value-icon--heart img {
  height: 46px;
}

.value-icon--globe img {
  height: 52px;
}

.values h3 {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
}

.values p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.6;
}

/* ---- contact -------------------------------------------------------- */

.contact-section {
  border-block: 1px solid var(--line);
  background: var(--paper-soft);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 24px;
  max-width: 1040px;
  margin-inline: auto;
}

.contact-cards a {
  display: grid;
  justify-items: center;
  gap: 6px;
  height: 100%;
  padding: 36px 20px 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-cards a:hover,
.contact-cards a:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 14px 34px rgba(var(--navy-rgb), .1);
}

.contact-cards svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  color: var(--gold-text);
}

.contact-cards strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.contact-cards a > span {
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.contact-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin-top: 44px;
}

.contact-notes li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-notes svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--gold-text);
}

.location {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  margin-top: 72px;
}

.location-copy h3 {
  margin-bottom: 14px;
  font-size: 2rem;
  font-weight: 500;
}

.location-copy p {
  margin-bottom: 28px;
}

.location-map iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  background: var(--paper);
}

/* ---- portals -------------------------------------------------------- */

.portals-section {
  padding-block: 72px;
  border-bottom: 1px solid var(--line);
}

.portals-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
}

.portals-heading h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
}

.portals-heading p {
  margin: 12px 0 0;
  color: var(--navy-soft);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.portal-card {
  display: grid;
  gap: 6px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 14px 34px rgba(var(--navy-rgb), .1);
}

.portal-kicker {
  color: var(--gold-text);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.portal-card strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.portal-description {
  color: var(--navy-soft);
  font-size: .92rem;
}

.portal-action {
  margin-top: 6px;
  color: var(--gold-text);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---- footer --------------------------------------------------------- */

.site-footer {
  padding-block: 88px 36px;
  text-align: center;
}

.footer-tagline p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
}

.footer-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 48px 0 56px;
}

.footer-lockup img {
  width: 104px;
  height: auto;
}

.footer-lockup .ornament {
  width: min(240px, 70%);
  margin-top: 2px;
}

.footer-wordmark {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
}

.footer-legal {
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--navy-soft);
  font-size: .82rem;
}

/* ---- responsive ----------------------------------------------------- */

@media (max-width: 1180px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 980px) {
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .values li:last-child {
    grid-column: 1 / -1;
  }

  .portals-layout,
  .location {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .section {
    padding-block: 80px;
  }

  .hero {
    padding-block: 56px 100px;
  }

  .hero-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero-photo {
    width: auto;
    max-width: 470px;
    margin-right: 20px;
  }

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

  .services article {
    padding: 36px 8px;
  }

  .services article:nth-child(odd) {
    border-right: 0;
  }

  .services article:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .philosophy {
    padding: 44px 30px 46px;
  }
}

@media (max-width: 820px) {
  .statement {
    aspect-ratio: auto;
    container-type: normal;
    padding-bottom: 56px;
  }

  .statement-art {
    position: static;
    height: 260px;
    object-position: 18% center;
  }

  .statement-copy {
    position: static;
    width: min(100% - 48px, 560px);
    margin: 36px auto 0;
    transform: none;
  }

  .statement-kicker {
    font-size: .8rem;
  }

  .statement-name {
    font-size: clamp(2.8rem, 12vw, 4.4rem);
  }

  .statement .ornament {
    width: min(300px, 100%);
    margin-top: 16px;
  }

  .statement-line {
    margin-top: 18px;
    font-size: 1.5rem;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 68px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .section-intro h2 {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .brand {
    font-size: 1.05rem;
    letter-spacing: .14em;
  }

  .main-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding-block: 12px;
  }

  .nav-tools {
    gap: 8px;
  }

  .language-options a {
    width: 32px;
    min-width: 32px;
    padding: 5px 7px;
  }

  .portal-link,
  .portal-menu summary {
    padding: 8px 12px;
    letter-spacing: .1em;
  }

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

  .contact-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .location-map iframe {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
