:root {
  color-scheme: light;
  --ink: #102a32;
  --muted: #5c7076;
  --line: #d7e2e3;
  --paper: #fbf8f3;
  --white: #ffffff;
  --teal: #0f6b78;
  --deep: #0f3d4a;
  --gold: #c49a43;
  --sea: #dff0f0;
  --shadow: 0 18px 50px rgba(15, 61, 74, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(251, 248, 243, 0.94);
  box-shadow: 0 1px 0 rgba(16, 42, 50, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.brand small {
  color: currentColor;
  font-size: 0.75rem;
  opacity: 0.78;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
}

.desktop-nav a,
.link-button {
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 4px 0;
}

.desktop-nav a:hover,
.link-button:hover {
  color: var(--gold);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled .language-switch {
  border-color: rgba(16, 42, 50, 0.18);
  background: rgba(16, 42, 50, 0.04);
}

.language-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  color: currentColor;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"] {
  color: #092229;
  background: var(--gold);
}

.hero {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  background: var(--deep);
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  z-index: -2;
  background-image: url("./assets/notary-hero-refined.jpg");
  background-position: 64% center;
  background-size: cover;
  transform: scale(1.01);
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(15, 61, 74, 0.08), rgba(15, 61, 74, 0.9) 70%, rgba(15, 61, 74, 0.98)),
    linear-gradient(90deg, rgba(9, 34, 41, 0.9), rgba(9, 34, 41, 0.42) 56%, rgba(9, 34, 41, 0.14));
}

.hero-content {
  display: flex;
  min-height: 92svh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 112px clamp(18px, 6vw, 72px) 34px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 13vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 3.8vw, 1.26rem);
}

.hero-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(196, 154, 67, 0.48);
  outline-offset: 3px;
}

.button.primary {
  color: #092229;
  background: var(--gold);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.button.card-button {
  width: 100%;
  color: var(--white);
  background: var(--deep);
}

.button.card-button:hover {
  background: var(--teal);
}

.hero-facts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 720px);
  margin: 34px 0 0;
}

.hero-facts div {
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.36);
  padding-top: 12px;
}

.hero-facts dt {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 3px 0 0;
  font-weight: 750;
}

.notice-band {
  background: var(--sea);
  padding: 18px clamp(18px, 6vw, 72px);
}

.notice-band p {
  max-width: 920px;
  margin: 0 auto;
  color: var(--deep);
  font-weight: 750;
  text-align: center;
}

.section {
  padding: clamp(58px, 10vw, 108px) clamp(18px, 6vw, 72px);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.service-grid,
.pricing-grid {
  display: grid;
  gap: 14px;
}

.service-card,
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(16, 42, 50, 0.04);
}

.service-card {
  padding: 22px;
}

.service-card p,
.price-card li,
.about-copy p,
.limits-copy p,
.steps li {
  color: var(--muted);
}

.pricing-section,
.limits-section {
  background: var(--white);
}

.price-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
}

.price-card.featured {
  border-color: rgba(15, 107, 120, 0.42);
  box-shadow: var(--shadow);
}

.price-label {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.7rem;
  line-height: 1;
}

.price small {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.price span {
  font-size: 1.6rem;
  vertical-align: 62%;
}

.price-note {
  margin-bottom: 0;
  color: var(--muted);
}

.price-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.process-layout,
.limits-layout {
  display: grid;
  gap: 28px;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  border-left: 2px solid var(--gold);
  padding-left: 22px;
}

.steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  top: 0;
  left: -15px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--deep);
  font-size: 0.82rem;
  font-weight: 850;
}

.steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.about-section {
  background: var(--paper);
}

.about-layout {
  display: grid;
  gap: 30px;
  align-items: center;
}

.about-copy {
  max-width: 650px;
}

.portrait-panel {
  width: min(100%, 520px);
  margin: 0 auto;
}

.portrait-panel img {
  width: 100%;
  aspect-ratio: 520 / 694;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.portrait-panel figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.limits-copy {
  display: grid;
  gap: 14px;
}

.site-footer {
  display: grid;
  gap: 18px;
  padding: 34px clamp(18px, 6vw, 72px);
  color: rgba(255, 255, 255, 0.78);
  background: #092229;
}

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin-bottom: 0;
}

.footer-actions a,
.footer-actions button {
  color: var(--white);
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.copyright {
  font-size: 0.88rem;
}

.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 14px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 34, 41, 0.72);
}

.modal-panel {
  position: relative;
  width: min(100%, 620px);
  max-height: min(86svh, 780px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.legal-panel {
  max-width: 720px;
}

.modal-panel h2 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.05;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 1.6rem;
  line-height: 1;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfdfd;
}

.modal-form textarea {
  resize: vertical;
}

.field-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.small-print,
.form-status,
.payment-estimate {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-estimate {
  border: 1px solid rgba(15, 107, 120, 0.22);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--deep);
  background: var(--sea);
  font-weight: 850;
}

.form-status.is-error {
  color: #9c3327;
}

.form-status.is-success {
  color: var(--teal);
}

.form-submit[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 32px));
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--white);
  background: var(--deep);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .desktop-nav {
    display: flex;
  }

  .hero-content {
    justify-content: center;
    padding-bottom: 52px;
  }

  .hero-image {
    background-position: center right;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(9, 34, 41, 0.97) 0%, rgba(9, 34, 41, 0.8) 42%, rgba(9, 34, 41, 0.16) 74%),
      linear-gradient(180deg, rgba(15, 61, 74, 0.02), rgba(15, 61, 74, 0.48));
  }

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

  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .process-layout,
  .limits-layout,
  .about-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .portrait-panel {
    justify-self: end;
  }

  .modal {
    place-items: center;
    padding: 26px;
  }

  .modal-panel {
    padding: 30px;
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .brand strong {
    max-width: 156px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .language-switch button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .hero-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
}

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