/* SiteDesign.ir — Structural Footer V2 */

body.home-page .site-footer,
body.inner-page .site-footer {
  --footer-bg: #071126;
  --footer-panel: #0c1a37;
  --footer-blue: #2850ed;
  --footer-cyan: #7fe5f1;
  --footer-ink: #f8faff;
  --footer-muted: #c7d2ec;
  --footer-dim: #8fa0c5;
  --footer-line: rgb(173 193 238 / 22%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(74px, 8vw, 126px) 26px;
  border-block-start: 0;
  background: var(--footer-bg);
  color: var(--footer-ink);
}

.site-footer a:focus-visible,
.site-footer summary:focus-visible {
  outline-color: var(--footer-cyan);
  outline-offset: 5px;
}

.footer-blueprint {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(to left, rgb(127 229 241 / 7%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(127 229 241 / 5%) 1px, transparent 1px),
    linear-gradient(125deg, transparent 0 70%, rgb(40 80 237 / 15%) 70.1% 70.25%, transparent 70.35%),
    radial-gradient(circle at 12% 12%, rgb(40 80 237 / 22%), transparent 30%);
  background-size: clamp(72px, 7vw, 118px) 100%, 100% 72px, 100% 100%, 100% 100%;
  pointer-events: none;
}

.footer-blueprint::before,
.footer-blueprint::after {
  content: "";
  position: absolute;
  border: 1px solid rgb(127 229 241 / 16%);
  transform: rotate(-17deg);
}

.footer-blueprint::before {
  inset-block-start: -140px;
  inset-inline-end: -110px;
  inline-size: 420px;
  aspect-ratio: 1;
}

.footer-blueprint::after {
  inset-block-end: -180px;
  inset-inline-start: 3vw;
  inline-size: 360px;
  aspect-ratio: 1;
}

.footer-frame {
  display: grid;
  grid-template-columns: minmax(360px, .88fr) minmax(0, 1.12fr);
  gap: clamp(38px, 6vw, 96px);
  align-items: stretch;
}

.footer-manifesto {
  position: relative;
  min-block-size: 530px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(32px, 4vw, 62px);
  border: 1px solid var(--footer-line);
  background: linear-gradient(145deg, rgb(14 31 65 / 96%), rgb(8 20 45 / 92%));
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px));
}

.footer-manifesto::before,
.footer-manifesto::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.footer-manifesto::before {
  inset-block-start: 0;
  inset-inline-end: 0;
  inline-size: 34px;
  aspect-ratio: 1;
  border-block-end: 1px solid var(--footer-line);
  border-inline-start: 1px solid var(--footer-line);
}

.footer-manifesto::after {
  inset-inline: 0;
  inset-block-start: 118px;
  block-size: 1px;
  background: var(--footer-line);
}

.footer-brandline {
  inline-size: 100%;
  min-block-size: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer .brand-footer {
  inline-size: 64px;
  min-inline-size: 64px;
  min-block-size: 64px;
  display: grid;
  align-items: center;
}

.site-footer .brand-footer::before {
  border-color: rgb(127 229 241 / 22%);
  background: rgb(255 255 255 / 4%);
}

.site-footer .brand-footer .brand-mark,
.site-footer .brand-footer img {
  inline-size: 54px;
  block-size: 54px;
  object-fit: contain;
}

.footer-brandline > span {
  color: var(--footer-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .58rem;
  letter-spacing: .13em;
}

.footer-index {
  margin: 46px 0 22px;
  color: var(--footer-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .6rem;
  letter-spacing: .08em;
}

.site-footer .footer-manifesto .eyebrow {
  margin-block-end: 12px;
  color: var(--footer-cyan);
}

.site-footer .footer-manifesto h2 {
  max-inline-size: 15ch;
  margin: 0 0 34px;
  color: var(--footer-ink);
  font-size: clamp(1.35rem, 2.2vw, 2.25rem);
  line-height: 1.62;
  letter-spacing: -.035em;
}

.footer-message {
  position: relative;
  inline-size: 100%;
  min-block-size: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 16px;
  margin-block-start: auto;
  padding: 19px 22px;
  border: 1px solid rgb(255 255 255 / 18%);
  background: var(--footer-blue);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  overflow: hidden;
  transition: background-color 200ms ease, transform 200ms ease;
}

.footer-message > * { min-inline-size: 0; }

.footer-message:hover {
  background: #3261ff;
  transform: translateY(-3px);
}

.footer-message-copy { display: grid; gap: 2px; }
.footer-message-copy strong { color: #fff; font-size: .93rem; }
.footer-message-copy small { color: #dce5ff; font-size: .65rem; }
.footer-message-number {
  max-inline-size: 100%;
  justify-self: center;
  overflow: hidden;
  color: #fff;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  text-overflow: clip;
}
.footer-message-arrow {
  display: grid;
  inline-size: 34px;
  aspect-ratio: 1;
  place-items: center;
  border-inline-start: 1px solid rgb(255 255 255 / 28%);
  color: var(--footer-cyan);
  font-size: 1.25rem;
}

.footer-directory {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  border-block-start: 1px solid var(--footer-line);
}

.site-footer .footer-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.site-footer .footer-groups details {
  min-block-size: 230px;
  padding: 28px clamp(22px, 3vw, 38px) 34px;
  border-block-end: 1px solid var(--footer-line);
  border-inline-start: 1px solid var(--footer-line);
}

.site-footer .footer-groups details:nth-child(odd) { border-inline-start: 0; }

.site-footer .footer-groups details > summary {
  min-block-size: auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 19px;
  color: var(--footer-ink);
  font-size: .76rem;
  font-weight: 800;
  list-style: none;
  cursor: default;
}

.site-footer .footer-groups details > summary::-webkit-details-marker { display: none; }
.site-footer .footer-groups details > summary::after { content: none; }
.site-footer .footer-groups details > summary span {
  color: var(--footer-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .57rem;
  font-weight: 500;
}

.site-footer .footer-groups nav {
  display: grid;
  gap: 7px;
  padding: 0;
}

.site-footer .footer-groups nav a {
  position: relative;
  inline-size: fit-content;
  padding-inline-start: 0;
  color: var(--footer-muted);
  font-size: .72rem;
  transition: color 180ms ease, padding-inline-start 180ms ease;
}

.site-footer .footer-groups nav a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  inline-size: 0;
  block-size: 1px;
  background: var(--footer-cyan);
  transition: inline-size 180ms ease;
}

.site-footer .footer-groups nav a:hover {
  padding-inline-start: 18px;
  color: #fff;
}

.site-footer .footer-groups nav a:hover::before { inline-size: 11px; }

.footer-contact-rail {
  min-block-size: 72px;
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.15fr) minmax(0, .68fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 20px;
  margin-block-start: auto;
  padding: 18px clamp(22px, 3vw, 38px);
  border-block-end: 1px solid var(--footer-line);
  background: rgb(255 255 255 / 2%);
}

.footer-contact-rail > * { min-inline-size: 0; }

.footer-contact-rail > span {
  color: var(--footer-dim);
  font-size: .61rem;
}

.footer-contact-rail > a {
  overflow-wrap: anywhere;
  color: var(--footer-ink);
  font-size: .68rem;
}

.footer-contact-rail .footer-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--footer-cyan);
  white-space: nowrap;
}

.footer-contact-rail .footer-linkedin i {
  font-size: .8rem;
  font-style: normal;
  transition: transform 180ms ease;
}

.footer-contact-rail .footer-linkedin:hover i { transform: translate(2px, -2px); }

.footer-contact-rail > a:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline-start: 20px;
  border-inline-start: 1px solid var(--footer-line);
}

.footer-contact-rail b {
  flex: 0 0 auto;
  color: var(--footer-cyan);
  font-size: .64rem;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.site-footer .footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-block-start: clamp(38px, 5vw, 66px);
  padding-block-start: 23px;
  border-block-start: 1px solid var(--footer-line);
  color: var(--footer-dim);
  font-size: .61rem;
}

.site-footer .footer-bottom div { display: flex; gap: 22px; }
.site-footer .footer-bottom a { color: var(--footer-muted); }
.site-footer .footer-bottom a:hover { color: #fff; }
.site-footer .footer-bottom > :last-child { justify-self: end; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

/* Contact page: one primary WhatsApp path and one secondary email path. */
.inner-page .contact-methods { gap: 0; border-block-start: 1px solid var(--inner-line); }
.inner-page .contact-methods .contact-method {
  min-block-size: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-block-end: 1px solid var(--inner-line);
  color: var(--inner-ink);
  transition: background-color 180ms ease, color 180ms ease;
}

.inner-page .contact-methods .contact-method > span { display: grid; gap: 2px; }
.inner-page .contact-methods .contact-method strong { color: inherit; font-size: .78rem; }
.inner-page .contact-methods .contact-method small { color: #59657c; font-size: .63rem; }
.inner-page .contact-methods .contact-method b { color: inherit; font-size: .65rem; font-weight: 600; }
.inner-page .contact-methods .contact-method i { color: var(--inner-blue); font-size: 1.1rem; font-style: normal; }
.inner-page .contact-methods .contact-method-primary { background: var(--inner-blue); color: #fff; }
.inner-page .contact-methods .contact-method-primary small { color: #e1e8ff; }
.inner-page .contact-methods .contact-method-primary i { color: #a6f1f6; }
.inner-page .contact-methods .contact-method:hover { background: #edf2ff; }
.inner-page .contact-methods .contact-method-primary:hover { background: var(--inner-indigo); color: #fff; }

@media (max-width: 1120px) {
  .footer-frame { grid-template-columns: 1fr; }
  .footer-manifesto { min-block-size: 470px; }
  .site-footer .footer-manifesto h2 { max-inline-size: 22ch; }
  .footer-directory { margin-block-start: 0; }
}

@media (max-width: 760px) {
  body.home-page .site-footer,
  body.inner-page .site-footer { padding-block-start: 52px; }

  .footer-frame { gap: 32px; }
  .footer-manifesto {
    min-block-size: 420px;
    padding: 24px 20px 20px;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  }
  .footer-manifesto::after { inset-block-start: 96px; }
  .footer-brandline { min-block-size: 46px; }
  .site-footer .brand-footer { inline-size: 56px; min-inline-size: 56px; min-block-size: 56px; }
  .site-footer .brand-footer .brand-mark,
  .site-footer .brand-footer img { inline-size: 48px; block-size: 48px; }
  .footer-brandline > span { font-size: .5rem; }
  .footer-index { margin-block-start: 37px; }
  .site-footer .footer-manifesto h2 { max-inline-size: 18ch; font-size: 1.42rem; }
  .footer-message { grid-template-columns: minmax(0, 1fr) 34px; min-block-size: 84px; padding: 16px; }
  .footer-message-number { display: none; }

  .site-footer .footer-groups { grid-template-columns: 1fr; border-block-start: 1px solid var(--footer-line); }
  .site-footer .footer-groups details,
  .site-footer .footer-groups details:nth-child(odd) {
    min-block-size: auto;
    padding: 0;
    border-inline-start: 0;
    border-block-end: 1px solid var(--footer-line);
  }
  .site-footer .footer-groups details > summary {
    min-block-size: 58px;
    justify-content: flex-start;
    margin: 0;
    padding-inline: 4px;
    cursor: pointer;
  }
  .site-footer .footer-groups details > summary::after {
    content: "+";
    margin-inline-start: auto;
    color: var(--footer-cyan);
    font-size: 1rem;
    font-weight: 400;
  }
  .site-footer .footer-groups details[open] > summary::after { content: "−"; }
  .site-footer .footer-groups nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 4px 4px 22px; }
  .site-footer .footer-groups nav a { inline-size: auto; }

  .footer-contact-rail {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 4px;
  }
  .footer-contact-rail > a:last-child { padding: 0; border-inline-start: 0; }

  .site-footer .footer-bottom {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 13px;
  }
  .site-footer .footer-bottom > :last-child { justify-self: start; }
  .site-footer .footer-bottom div { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-message,
  .site-footer .footer-groups nav a { transition: none; }
}
