/* ============================================================
   VAL FOURRÉ — visual identity
   Palette:
     --paper        #F4F0E6  parchment ground
     --ink          #1C3A4A  blueprint ink (display / primary)
     --charcoal     #2A2A26  body text
     --brass        #B08D57  survey-stake accent (secondary CTA, highlights)
     --cadastral    #A63D40  boundary-line red (small accents only)
     --white        #FFFFFF  card surfaces
   Type:
     Display  — 'Fraunces'      (deed / document character)
     Body     — 'Inter'         (plain, legible)
     Utility  — 'IBM Plex Mono' (reference codes, prices, coordinates)
   ============================================================ */

:root {
  --paper: #f4f0e6;
  --ink: #1c3a4a;
  --ink-soft: #2f5064;
  --charcoal: #2a2a26;
  --brass: #b08d57;
  --cadastral: #a63d40;
  --white: #ffffff;
  --line: rgba(28, 58, 74, 0.18);
  --radius: 2px;
  --max-width: 1400px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--charcoal);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-optical-sizing: auto;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 500;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand__name {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

.brand__name small {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--brass);
  text-transform: uppercase;
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 32px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  color: var(--charcoal);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--brass);
}

.nav-toggle {
  display: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--ink-soft);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

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

.hero {
  padding: 72px 0 96px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero__file-tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 5px 10px;
  margin-bottom: 22px;
  background: var(--white);
}

.hero p.lead {
  font-size: 1.1rem;
  max-width: 46ch;
  color: var(--charcoal);
}

.hero__ctas {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero__figure {
  position: relative;
}

.hero__figure svg {
  width: 100%;
  height: auto;
}

/* parcel-outline draw-on animation */
.parcel-outline {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.4s ease forwards 0.2s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- Section scaffolding ---------- */

.section {
  padding: 84px 0;
}

.section--tight {
  padding: 56px 0;
}

.section--alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  max-width: 60ch;
  margin-bottom: 44px;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
  opacity: 0.7;
}

.divider svg {
  width: 220px;
  height: auto;
}

/* ---------- Service / case-file cards ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.case-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.case-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.case-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}

.case-card__ref {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.case-card__price {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
}

.case-card h3 {
  margin-bottom: 2px;
}

.case-card__summary {
  color: var(--charcoal);
  font-size: 0.95rem;
  flex-grow: 1;
}

.case-card__cta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.case-card__cta::after {
  content: "→";
  transition: transform 0.2s ease;
}

.case-card:hover .case-card__cta::after {
  transform: translateX(4px);
}

/* ---------- About / process ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.fact-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt,
.fact-list .fact-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---------- Service detail / checkout ---------- */

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 40px;
}

.service-header__price {
  font-family: "Fraunces", serif;
  font-size: 2.2rem;
  color: var(--ink);
  font-weight: 600;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.includes-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.includes-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
}

.includes-list li::before {
  content: "—";
  color: var(--brass);
  flex-shrink: 0;
}

.turnaround {
  margin-top: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--ink);
}

.order-form {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px;
}

.order-form h3 {
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  border-radius: var(--radius);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.form-field textarea {
  resize: vertical;
  min-height: 70px;
}

#payment-element {
  margin: 8px 0 22px;
}

.form-note {
  font-size: 0.82rem;
  color: rgba(42, 42, 38, 0.7);
  margin-top: 10px;
}

.form-error {
  color: var(--cadastral);
  font-size: 0.88rem;
  margin-top: 10px;
  min-height: 1.2em;
}

/* ---------- Success page ---------- */

.success-panel {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px 90px;
}

.success-panel .stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 2px solid var(--cadastral);
  border-radius: 50%;
  color: var(--cadastral);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 26px;
  transform: rotate(-6deg);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px;
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--ink);
  color: var(--paper);
}

.site-footer a {
  color: var(--paper);
  text-decoration: none;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 {
  color: var(--paper);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.site-footer p,
.site-footer li {
  font-size: 0.88rem;
  color: rgba(244, 240, 230, 0.78);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(244, 240, 230, 0.18);
  padding-top: 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(244, 240, 230, 0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  padding: 100px 24px;
}

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

@media (max-width: 860px) {
  .hero__grid,
  .about-grid,
  .checkout-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero__figure {
    order: -1;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .fact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- Gallery ---------- */

.gallery-grid {
  column-count: 4;
  column-gap: 16px;
}

.gallery-grid img {
  width: 100%;
  display: block;
  margin-bottom: 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  break-inside: avoid;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-grid img:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(28, 58, 74, 0.15);
}

@media (max-width: 900px) {
  .gallery-grid { column-count: 3; }
}

@media (max-width: 640px) {
  .gallery-grid { column-count: 2; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 24, 28, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
}

.lightbox--open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--paper);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox__close:hover {
  opacity: 1;
}

/* ---------- Gallery CTA ---------- */

.gallery-cta {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.gallery-cta p {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 20px;
}

/* ---------- Language switch ---------- */


.lang-switch {
  position: relative;
  margin-left: 24px;
}

.lang-switch__trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lang-switch__trigger::-webkit-details-marker {
  display: none;
}

.lang-switch__trigger:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.lang-switch[open] .lang-switch__trigger {
  border-color: var(--brass);
  color: var(--brass);
  background: rgba(176, 141, 87, 0.08);
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 140px;
  box-shadow: 0 12px 28px rgba(28, 58, 74, 0.12);
  overflow: hidden;
  z-index: 20;
}

.lang-switch__menu a {
  display: block;
  padding: 10px 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--charcoal);
  opacity: 0.75;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.lang-switch__menu a:hover {
  background: var(--paper);
  opacity: 1;
}

.lang-switch__active {
  opacity: 1 !important;
  color: var(--ink) !important;
  font-weight: 700;
}

.lang-switch__trigger {
  width: auto !important;
  border-radius: 999px !important;
  padding: 0 12px 0 8px;
  gap: 6px;
}

.lang-switch__code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
