/* HIDAOUI MED LLC corporate site stylesheet
   Self-contained: fonts are self-hosted, no analytics or third-party requests. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

:root {
  --bg: #f8f6f1;
  --bg-soft: #f1ede4;
  --surface: #ffffff;
  --ink: #151a2c;
  --ink-soft: #4e5769;
  --navy: #0c1424;
  --navy-2: #131f38;
  --navy-3: #1c2c4f;
  --gold: #b3893a;
  --gold-light: #d8b271;
  --line: #e5e0d4;
  --line-dark: rgba(255, 255, 255, 0.09);
  --max: 1160px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(12, 20, 36, 0.05);
  --shadow-md: 0 6px 24px rgba(12, 20, 36, 0.07);
  --shadow-lg: 0 24px 60px rgba(12, 20, 36, 0.14);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

::selection {
  background: rgba(179, 137, 58, 0.25);
}

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

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Top accent bar ---------- */

.top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 45%, var(--gold) 100%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(12, 20, 36, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--navy);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #f5edd9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1.5px rgba(216, 178, 113, 0.55);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
}

.brand-sub {
  font-size: 0.66rem;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  position: relative;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transition: right 0.25s ease;
}

.main-nav a:hover {
  text-decoration: none;
  color: var(--navy);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  right: 0;
}

.main-nav a.active {
  color: var(--navy);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(179, 137, 58, 0.14), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(28, 44, 79, 0.08), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 96px 0 104px;
  overflow: hidden;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 20, 36, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 20, 36, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 75%);
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--navy);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .tagline {
  font-size: 1.14rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 540px;
}

.hero p.lead {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: #ffffff;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--navy-3);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  display: inline-block;
  color: var(--navy);
  padding: 14px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  text-decoration: none;
  border-color: var(--gold);
  background: #ffffff;
}

/* Registry card in hero */

.registry-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 34px 28px;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.6deg);
}

.registry-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 0 0 4px 4px;
}

.registry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}

.registry-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.registry-seal {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.registry-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dotted var(--gold);
}

.registry-seal span {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
}

.registry-rows {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
}

.registry-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.88rem;
}

.registry-rows dt {
  color: var(--ink-soft);
  white-space: nowrap;
}

.registry-rows dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
}

.registry-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: #1f7a45;
}

.registry-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2da05c;
  box-shadow: 0 0 0 3px rgba(45, 160, 92, 0.18);
}

.registry-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* ---------- Credentials strip ---------- */

.credentials-strip {
  background: var(--navy);
  border-bottom: 1px solid var(--line-dark);
}

.credentials-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
}

.cred-item {
  padding: 26px 28px;
  border-left: 1px solid var(--line-dark);
  text-align: left;
}

.cred-item:first-child {
  border-left: none;
}

.cred-value {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: #f3efe6;
  line-height: 1.3;
}

.cred-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8d99af;
  margin-top: 4px;
}

.cred-value .placeholder {
  font-size: 0.95rem;
}

/* ---------- Page header (non-home pages) ---------- */

.page-header {
  position: relative;
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(179, 137, 58, 0.13), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
  overflow: hidden;
}

.page-header .container {
  position: relative;
}

.page-header .eyebrow {
  margin-bottom: 14px;
}

.page-header h1 {
  font-family: var(--serif);
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.page-header p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 580px;
}

/* ---------- Sections ---------- */

section {
  padding: 88px 0;
}

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

section.dark {
  background:
    radial-gradient(800px 400px at 15% 0%, rgba(28, 44, 79, 0.6), transparent 60%),
    var(--navy);
  border: none;
  color: #c9d1de;
}

.section-head {
  max-width: 660px;
  margin-bottom: 52px;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 16px;
  line-height: 1.15;
}

section.dark h2 {
  color: #f3efe6;
}

h3 {
  font-size: 1.08rem;
  color: var(--navy);
  font-weight: 600;
  margin: 0 0 10px;
}

section.dark h3 {
  color: #f3efe6;
}

.section-intro {
  max-width: 700px;
  color: var(--ink-soft);
  margin: 0 0 0;
}

section.dark .section-intro {
  color: #97a2b5;
}

.grid-follow-link {
  margin-top: 36px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--navy);
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s ease;
}

.link-arrow:hover {
  text-decoration: none;
  color: var(--gold);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Grid / cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card:hover::after {
  transform: scaleX(1);
}

.card h3 {
  margin: 0 0 10px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0;
}

.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(12, 20, 36, 0.05), rgba(179, 137, 58, 0.12));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--navy);
}

.icon-circle svg {
  width: 23px;
  height: 23px;
}

/* ---------- Approach / numbered steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--gold);
  margin-bottom: 18px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin: 0;
}

/* ---------- Principles (dark) ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.principle {
  padding: 30px 28px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.principle:hover {
  border-color: rgba(216, 178, 113, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.principle .p-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.principle p {
  color: #97a2b5;
  font-size: 0.93rem;
  margin: 0;
}

/* ---------- Info / fact table ---------- */

.fact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 34px;
  box-shadow: var(--shadow-md);
  max-width: 780px;
}

.fact-table {
  width: 100%;
  border-collapse: collapse;
}

.fact-table tr {
  border-bottom: 1px solid var(--line);
}

.fact-table tr:last-child {
  border-bottom: none;
}

.fact-table th,
.fact-table td {
  text-align: left;
  padding: 17px 16px 17px 0;
  vertical-align: top;
}

.fact-table th {
  width: 240px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
}

.fact-table td {
  font-weight: 500;
  font-size: 0.95rem;
}

.placeholder {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}

/* ---------- Verification band ---------- */

.contact-band {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 64px 0;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-inner h2 {
  margin-bottom: 8px;
}

.contact-inner p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 520px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}

.contact-details dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 26px;
}

.contact-details dt:first-child {
  margin-top: 0;
}

.contact-details dd {
  margin: 6px 0 0;
  font-size: 1.06rem;
  font-weight: 500;
}

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy-3);
  box-shadow: 0 0 0 3px rgba(28, 44, 79, 0.12);
}

button.btn {
  align-self: flex-start;
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 13px 30px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button.btn:hover {
  background: var(--navy-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

#form-status {
  font-size: 0.87rem;
}

/* ---------- Legal pages ---------- */

.legal-content h2 {
  margin-top: 46px;
  font-size: 1.3rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content {
  max-width: 780px;
}

.legal-meta {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 34px;
}

.notice-box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin-bottom: 40px;
  font-size: 0.91rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

/* ---------- Error page ---------- */

.error-section {
  position: relative;
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(179, 137, 58, 0.13), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 110px 0 120px;
  text-align: center;
}

.error-code {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(5rem, 14vw, 8.5rem);
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
  margin-bottom: 8px;
}

.error-section h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
}

.error-section p {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--ink-soft);
}

.error-section .hero-actions {
  justify-content: center;
}

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

.site-footer {
  background: var(--navy);
  color: #c9d1de;
  padding: 64px 0 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.footer-brand .brand-mark {
  background: transparent;
  border: 1.5px solid rgba(216, 178, 113, 0.6);
  box-shadow: none;
  color: var(--gold-light);
}

.footer-brand .footer-brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #f3efe6;
}

.footer-tagline {
  max-width: 320px;
  font-size: 0.88rem;
  color: #8d99af;
  margin: 0 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

.site-footer h4 {
  color: #f3efe6;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 18px;
}

.site-footer p,
.site-footer address {
  margin: 0 0 8px;
  font-style: normal;
  font-size: 0.9rem;
  color: #97a2b5;
}

.site-footer a {
  color: #c9d1de;
  transition: color 0.2s ease;
}

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

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

.footer-links li {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  font-size: 0.79rem;
  color: #6d7a92;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

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

@media (max-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .registry-card {
    max-width: 460px;
    transform: none;
  }

  .credentials-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .cred-item:nth-child(3) {
    border-left: none;
  }

  .cred-item {
    border-top: 1px solid var(--line-dark);
  }

  .cred-item:nth-child(-n+2) {
    border-top: none;
  }
}

@media (max-width: 860px) {
  section {
    padding: 64px 0;
  }

  .grid,
  .steps,
  .principles {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 640px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 16px;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .grid,
  .steps,
  .principles {
    grid-template-columns: 1fr;
  }

  .credentials-inner {
    grid-template-columns: 1fr;
  }

  .cred-item {
    border-left: none;
    border-top: 1px solid var(--line-dark);
    padding: 20px 28px;
  }

  .cred-item:first-child {
    border-top: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .registry-card {
    padding: 26px 22px 22px;
  }

  .fact-card {
    padding: 4px 20px;
  }

  .fact-table th {
    width: auto;
  }

  .fact-table tr {
    display: flex;
    flex-direction: column;
    padding: 13px 0;
  }

  .fact-table th,
  .fact-table td {
    padding: 2px 0;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
