/* =========================
   LAW FIRM – clean, modern, premium (non-template)
   Simple • Intuitive • Centred • Neutral tones with subtle brand colour
========================= */

:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #f0f3ef;
  --text: #0f172a;
  --muted: #4b5563;
  --border: #d8ded8;

  /* Neutral base */
  --accent: #1f2937; /* general accents */
  --accent-strong: #111827; /* strongest text */

  /* Subtle brand (sage) */
  --brand: #2f4f4f;
  --brand-soft: #e6efee;
  --ink: #202838;
  --ink-soft: #2b3547;
  --gold: #a77a3c;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);

  --container: 1120px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* prevent subtle horizontal drift on some layouts */
body {
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(var(--container), calc(100% - 2 * var(--space-4)));
  margin: 0 auto;
}

/* =========================
   Header
========================= */

.site-header {
  padding: var(--space-4) 0 0;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(230, 239, 238, 0.55), rgba(255, 255, 255, 0) 44%),
    var(--surface);
  color: var(--text);
}

/* IMPORTANT: do NOT center the whole header container (causes visual offset). */
.site-header .container {
  text-align: left;
  width: min(var(--container), calc(100% - 2 * clamp(40px, 6vw, 96px)));
}

/* Top row: logo + nav */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.site-logo {
  height: 58px;
  width: auto;
}

/* Hero area within header */
.hero {
  margin-top: 0;
  padding: clamp(36px, 5vw, 64px) 0 clamp(40px, 5vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  column-gap: clamp(40px, 7vw, 96px);
  align-items: center;
  text-align: left;
}

.hero-tagline {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 2.8vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: 0;
  max-width: 18ch;
}

.company-name {
  grid-column: 2;
  margin: 0 0 var(--space-2);
  padding-left: var(--space-3);
  border-left: 2px solid var(--gold);
  color: var(--accent-strong);
  font-weight: 700;
  text-align: left;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.35;
}

.company-registration {
  grid-column: 2;
  margin: 0;
  padding-left: calc(var(--space-3) + 2px);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
}

/* =========================
   Navigation (text links, underline on hover)
========================= */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px 0; /* no pill padding */
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 160ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.nav-link:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* CTA is still a text link, just stronger */
.nav-link--cta {
  color: var(--brand);
  font-weight: 700;
}

.nav-link--cta:hover {
  color: var(--brand);
}

/* =========================
   Sections (avoid “same card template” look)
========================= */

.section {
  padding: clamp(56px, 7vw, 88px) 0;
}

.section .container {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none; /* remove generic shadow everywhere */
}

/* create subtle variety per section */
.section--about,
.section--languages {
  background: #fff;
}

.section--practice-areas,
.section--contact {
  background: var(--bg);
}

.section--about .container,
.section--practice-areas .container,
.section--languages .container {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: var(--space-6);
  align-items: start;
}

.section--about .container {
  grid-template-columns: 260px minmax(0, 1fr);
}

.about-aside {
  display: grid;
  align-content: start;
  gap: var(--space-6);
}

.about-copy {
  max-width: 82ch;
}

.section--about .section-note {
  max-width: 22ch;
}

.section-title {
  margin: 0;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-text {
  margin: 0 0 var(--space-3);
  color: var(--text);
  max-width: 78ch;
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
  line-height: 1.75;
}

.section-note {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
}

/* =========================
   Lists
========================= */

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: practice-item;
}

.list-item {
  counter-increment: practice-item;
  padding: 18px 0 18px 46px;
  position: relative;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 700;
}

.list-item::before {
  content: counter(practice-item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

@media (min-width: 740px) {
  .list--areas {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-6);
    row-gap: 10px;
  }

  .list--languages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

/* =========================
   Contact layout
========================= */

.contact-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    align-items: start;
  }

  .contact-details {
    border-left: 1px solid var(--border);
    padding-left: var(--space-5);
  }
}

.contact-form,
.contact-details {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

/* =========================
   Form
========================= */

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #cfd6d2;
  background: transparent;
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

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

.form-input:focus,
.form-textarea:focus {
  border-color: var(--brand);
  box-shadow: none;
}

.form-row--consent {
  margin-top: var(--space-2);
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-checkbox {
  margin-top: 2px;
}

/* slightly darker privacy link for readability */
.link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--brand);
}

/* disclaimer – keep visible but not noisy */
.form-disclaimer {
  margin: var(--space-3) 0;
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: 0;
  border-left: 0;
}

/* =========================
   Buttons
========================= */

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.button--primary {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.button--primary:hover {
  transform: translateY(-1px);
  background: var(--brand);
  filter: none;
}

.button--primary:active {
  transform: translateY(0);
}

/* =========================
   Thank you page
========================= */

.thank-you-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(230, 239, 238, 0.65), rgba(255, 255, 255, 0) 50%),
    var(--bg);
}

.thank-you-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

.thank-you-panel {
  width: min(100%, 640px);
  padding: clamp(32px, 6vw, 56px);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.thank-you-logo {
  height: 64px;
  width: auto;
  margin-bottom: var(--space-5);
}

.thank-you-title {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
}

.thank-you-text {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  max-width: 48ch;
  font-size: 1.05rem;
}

/* =========================
   Contact details
========================= */

.contact-details__title {
  margin: 0 0 var(--space-4);
  font-size: 1.05rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}

.contact-list__item {
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  padding: var(--space-3) 0;
}

.contact-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-value {
  display: block;
  color: var(--text);
}

/* darker + clearer phone/email */
.contact-link {
  color: var(--accent-strong);
  font-weight: 700;
}

.contact-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* =========================
   Footer
========================= */

.site-footer {
  padding: var(--space-5) 0 var(--space-4);
  border-top: 1px solid var(--border);
  background: #f7f8f6;
  color: var(--text);
}

.footer-main {
  display: block;
}

.funded-project {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(28px, 3.5vw, 40px);
  border-top: 1px solid var(--border);
}

.legal {
  padding: 0;
}

.legal-title {
  margin: 0 0 var(--space-2);
  color: var(--text);
  font-size: 0.95rem;
}

.legal-text {
  margin: 0;
  color: var(--muted);
  max-width: 82ch;
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer-project-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 var(--space-3);
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.footer-project-button:hover {
  background: var(--brand);
  color: #fff;
}

.footer-project-button:active {
  transform: translateY(1px);
}

.footer-funding {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-2);
  align-content: start;
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  width: 100%;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
  padding: 6px;
  border: 1px solid var(--border);
  background: #fff;
}

.footer-logo--startup {
  max-width: 150px;
}

.footer-logo--iapmei {
  max-width: 300px;
}

.footer-bottom {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

/* slightly darker privacy in footer */
.legal-text,
.footer-copy {
  color: #374151;
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

/* Accessibility */
:focus-visible {
  outline: 3px solid rgba(47, 79, 79, 0.35);
  outline-offset: 3px;
}

/* =========================
   Mobile
========================= */

@media (max-width: 640px) {
  .site-header {
    padding: var(--space-3) 0;
  }

  .site-header .container {
    width: calc(100% - 2 * var(--space-5));
  }

  .site-logo {
    height: 46px;
  }

  .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .site-nav {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    gap: 14px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .hero {
    margin-top: var(--space-3);
    padding: var(--space-4) 0;
    display: block;
    text-align: center;
  }

  .hero-tagline {
    margin: 0 auto;
    max-width: 22ch;
    font-size: 1.35rem;
    line-height: 1.12;
  }

  .hero-tagline,
  .company-name,
  .company-registration {
    text-align: center;
  }

  .company-name {
    margin-top: var(--space-3);
    padding-left: 0;
    border-left: 0;
    font-size: 0.9rem;
  }

  .company-registration {
    padding-left: 0;
    font-size: 0.82rem;
  }

  .section {
    padding: var(--space-5) 0;
  }

  .section--about .container,
  .section--practice-areas .container,
  .section--languages .container {
    display: block;
  }

  .section-title {
    margin-bottom: var(--space-3);
  }

  .section-text,
  .section-note {
    font-size: 1rem;
  }

  .funded-project {
    display: block;
  }

  .footer-project-button {
    width: 100%;
    margin-top: var(--space-2);
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .section .container {
    padding: var(--space-4);
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--space-1);
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }
}
