/* ==========================================================================
   Palms — components
   ========================================================================== */

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--border-subtle); position: relative; z-index: 20; }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}

.wordmark { display: flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
.wordmark__name { font-family: var(--serif); font-size: 1.75rem; line-height: 1; }
.wordmark__desc {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
[lang="ka"] .wordmark__desc { text-transform: none; letter-spacing: 0.05em; font-size: 0.5625rem; }
@media (max-width: 1180px) { .wordmark__desc { display: none; } }

.nav { display: flex; gap: 26px; margin-inline: auto; }
.nav a { font-size: 0.8125rem; color: var(--text-secondary); transition: color .16s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); }
[lang="ka"] .nav { gap: 18px; }
[lang="ka"] .nav a { font-size: 0.75rem; }

.header-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }

.lang { display: flex; gap: 6px; font-size: 0.6875rem; letter-spacing: .08em; color: var(--text-muted); }
.lang a[aria-current="true"] { color: var(--text-primary); }

.header-cta { padding: 13px 22px; }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  padding: 12px 10px;
}
.burger span { display: block; height: 1.5px; background: var(--text-primary); margin: 4px 0; }
.burger span:last-child { width: 60%; }

@media (max-width: 980px) {
  .burger { display: block; }
  .nav {
    position: absolute; inset: 84px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px var(--gutter) 24px;
    margin: 0;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--border-subtle); }
  .header-cta { display: none; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border-subtle); padding-block: 48px 56px; }
.site-footer__grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px)  { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (min-width: 1040px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }

.footer-col h4 {
  font-family: var(--sans); font-weight: 500;
  font-size: var(--label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 18px;
}
[lang="ka"] .footer-col h4 { text-transform: none; letter-spacing: .06em; font-size: .6875rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 0.8125rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--text-primary); }
.footer-meta { font-size: 0.8125rem; color: var(--text-secondary); }
.footer-meta a:hover { color: var(--text-primary); }
.footer-legal { margin-top: 12px; font-size: 0.6875rem; color: var(--text-muted); }

/* ---------- architecture diagram ----------
   Grid-driven so it recomposes instead of scaling down. */
.diagram { --node-gap: 20px; }
.diagram__tier { display: grid; gap: var(--node-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.diagram__node {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 92px;
}
.diagram__node h4 { margin: 0 0 6px; font-family: var(--sans); font-size: 0.78rem; font-weight: 500; }
.diagram__node p { margin: 0; font-size: 0.65rem; line-height: 1.5; color: var(--text-muted); }

.diagram__link {
  position: relative;
  height: 46px;
  margin-inline: auto;
  width: 1px;
  background: var(--accent-blue);
}
.diagram__bus {
  position: relative;
  height: 1px;
  background: var(--accent-blue);
  margin: 0 25%;
}
.diagram__bus::before, .diagram__bus::after {
  content: ""; position: absolute; top: -2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-blue);
}
.diagram__bus::before { left: -2px; }
.diagram__bus::after  { right: -2px; }

.diagram__core {
  border: 1px solid var(--accent-blue);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  max-width: 260px;
  margin-inline: auto;
  outline: 1px dashed rgb(52 103 241 / .22);
  outline-offset: 16px;
}
.diagram__core strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.diagram__core span { display: block; font-size: 0.6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-blue); margin-top: 6px; }
[lang="ka"] .diagram__core span { text-transform: none; letter-spacing: .08em; }
.diagram__core em { display: block; font-style: normal; font-size: 0.6rem; color: var(--text-muted); margin-top: 8px; }

.diagram__caption {
  margin-top: 22px;
  font-size: 0.6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
[lang="ka"] .diagram__caption { text-transform: none; letter-spacing: .05em; font-size: .6875rem; }

@media (max-width: 560px) {
  .diagram__tier { grid-template-columns: 1fr; }
  .diagram__bus { display: none; }
  .diagram__link { height: 28px; }
}

/* ---------- process rail ---------- */
.rail { margin-top: 40px; }
.rail__track { display: none; }
.rail__steps { display: grid; gap: 20px; grid-template-columns: 1fr; }
.rail__step { border-top: 1px solid var(--border-subtle); padding-top: 16px; }
.rail__step:first-child { border-top-color: var(--accent-blue); }
.rail__n { font-family: var(--serif); color: var(--accent-blue); font-size: 0.8125rem; margin-right: 10px; }
.rail__name { font-size: 0.78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
[lang="ka"] .rail__name { text-transform: none; letter-spacing: .02em; font-size: .875rem; }
.rail__d { margin-top: 10px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; }

@media (min-width: 900px) {
  .rail__steps { grid-template-columns: repeat(5, 1fr); gap: 20px; }
}

/* ---------- figure ---------- */
.figure {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
}
/* Media columns are capped so the image never overshoots the text column
   next to it; the render crops from the centre instead of stretching. */
.figure img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}
.figure--tall img { aspect-ratio: 3 / 4; }
.figure figcaption {
  padding: 12px 16px;
  font-size: 0.6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}
[lang="ka"] .figure figcaption { text-transform: none; letter-spacing: .05em; font-size: .6875rem; }

/* ---------- partner slots ---------- */
.slot {
  border: 1px dashed var(--border-subtle);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  min-height: 104px;
  font-size: 0.6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
[lang="ka"] .slot { text-transform: none; letter-spacing: .05em; font-size: .75rem; }
.slot--bank { min-height: 140px; }

/* ---------- form ---------- */
.form { display: grid; gap: 22px; }
.form__row { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 9px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 17px 18px;
  transition: border-color .16s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-blue); }
.field select { appearance: none; background-image: none; }

.form__submit { width: 100%; justify-content: center; }
.form__note { font-size: 0.72rem; color: var(--text-muted); }

/* honeypot — hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { font-size: 0.82rem; padding: 14px 16px; border-radius: 3px; display: none; }
.form__status[data-state="ok"]   { display: block; border: 1px solid var(--border-active); color: var(--text-primary); }
.form__status[data-state="err"]  { display: block; border: 1px solid #7a3a3a; color: #f0c9c9; }

/* ---------- contact details ---------- */
.contact-detail { border-top: 1px solid var(--border-subtle); padding-top: 20px; margin-top: 28px; }
.contact-detail dt {
  font-size: var(--label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
[lang="ka"] .contact-detail dt { text-transform: none; letter-spacing: .06em; font-size: .6875rem; }
.contact-detail dd { margin: 0 0 20px; font-size: 0.95rem; }


/* ---------- audit fixes (1 Sep 2026) ---------- */
/* language switch and footer links were below the 40px tap minimum on mobile */
.lang a { display:inline-block; padding:10px 6px; margin:-10px 0; }
@media (max-width: 980px) {
  .footer-col li { margin-bottom: 0; }
  .footer-col a { display:block; padding:10px 0; }
  .footer-meta a, .footer-legal a { display:inline-block; padding:8px 0; }
}
/* labels under 11px are hard to read on small screens */
@media (max-width: 600px) {
  .eyebrow, .rail__name, .diagram__caption, .figure figcaption, .slot, .footer-col h4 { font-size: 0.6875rem; }
  .wordmark__desc { display:none; }
}

/* ---------- cinematic technology band ----------
   Full-bleed, no frame: the render dissolves into the page on every edge. */
.techband {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  isolation: isolate;
}
.techband__img {
  display: block;
  width: 100%;
  height: clamp(300px, 42vw, 620px);
  object-fit: cover;
  object-position: center;
  opacity: .92;
}
/* left/right dissolve */
.techband::before,
/* top/bottom dissolve */
.techband::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.techband::before {
  background: linear-gradient(90deg,
    var(--bg-primary) 0%,
    rgb(5 6 8 / .75) 8%,
    rgb(5 6 8 / 0) 26%,
    rgb(5 6 8 / 0) 74%,
    rgb(5 6 8 / .75) 92%,
    var(--bg-primary) 100%);
}
.techband::after {
  background: linear-gradient(180deg,
    var(--bg-primary) 0%,
    rgb(5 6 8 / .7) 10%,
    rgb(5 6 8 / 0) 34%,
    rgb(5 6 8 / 0) 62%,
    rgb(5 6 8 / .8) 90%,
    var(--bg-primary) 100%);
}
.techband__caption {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 2;
  font-size: 0.625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
[lang="ka"] .techband__caption { text-transform: none; letter-spacing: .06em; }
@media (max-width: 600px) {
  .techband__caption { font-size: 0.5625rem; letter-spacing: .1em; }
}

/* Narrow screens: the side fades would eat the whole frame, so pull them in
   and let the image breathe; the vertical dissolve does the blending. */
@media (max-width: 900px) {
  .techband__img { height: clamp(240px, 60vw, 380px); opacity: 1; }
  .techband::before {
    background: linear-gradient(90deg,
      rgb(5 6 8 / .85) 0%, rgb(5 6 8 / 0) 14%,
      rgb(5 6 8 / 0) 86%, rgb(5 6 8 / .85) 100%);
  }
  .techband::after {
    background: linear-gradient(180deg,
      var(--bg-primary) 0%, rgb(5 6 8 / .5) 12%,
      rgb(5 6 8 / 0) 40%, rgb(5 6 8 / 0) 58%,
      rgb(5 6 8 / .7) 88%, var(--bg-primary) 100%);
  }
}

/* ---------- frameless column media ----------
   No border, no plate: the render dissolves into the page. */
.media-soft { position: relative; }
.media-soft img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.media-soft::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg-primary) 0%, rgb(5 6 8 / 0) 14%,
                           rgb(5 6 8 / 0) 86%, var(--bg-primary) 100%),
    linear-gradient(180deg, var(--bg-primary) 0%, rgb(5 6 8 / 0) 16%,
                            rgb(5 6 8 / 0) 82%, var(--bg-primary) 100%);
}
.media-soft__caption {
  margin-top: 1rem;
  font-size: 0.625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
[lang="ka"] .media-soft__caption { text-transform: none; letter-spacing: .06em; font-size: .6875rem; }

/* Match the palm render to the muted gold of the chip illustration. */
.media-soft img[src*="palm-identity"] {
  filter: hue-rotate(8deg) saturate(.65) brightness(.82);
}

/* Deployment image: enlarged, unframed, fading into the actual page background. */
.deployment-visual {
  width: 120%;
  margin: 0 -10%;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.deployment-visual img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
                      linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
              linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.deployment-visual figcaption {
  margin-inline: 8.333%;
  padding: 12px 0;
  border: 0;
}
.deployment-hero { overflow: hidden; }

/* Small interaction cues, only on devices with a precise hover pointer. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .btn { transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .footer-col a, .footer-meta a { transition: color .18s ease; }
}

/* Animate only registered copies of existing pixels: no new symbols or hues. */
.motion-surface { position: relative; display: block; }
.motion-surface > img.motion-copy {
  position: absolute; inset: 0; width: 100%; height: 100% !important;
  pointer-events: none; opacity: 0;
  animation-play-state: paused;
}
.motion-surface[data-running="true"] > img.motion-copy { animation-play-state: running; }
.motion-chip > img.motion-copy {
  filter: brightness(1.34);
  -webkit-mask-image: linear-gradient(110deg, transparent 43%, #000 50%, transparent 57%);
  mask-image: linear-gradient(110deg, transparent 43%, #000 50%, transparent 57%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%;
  animation: chip-flow 10s ease-in-out infinite;
  animation-play-state: paused;
}
@keyframes chip-flow {
  0%, 16% { opacity: 0; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  28%, 60% { opacity: .42; }
  76%, 100% { opacity: 0; -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}
/* Limit the activity pulse to the existing illuminated scanner rim. */
.motion-terminal > img.motion-copy {
  filter: brightness(1.3);
  -webkit-mask-image: radial-gradient(ellipse 7% 8.5% at 59.4% 17.7%, transparent 54%, #000 73%, transparent 100%);
  mask-image: radial-gradient(ellipse 7% 8.5% at 59.4% 17.7%, transparent 54%, #000 73%, transparent 100%);
  -webkit-mask-composite: source-over; mask-composite: add;
  animation: scanner-activity 5s ease-in-out infinite;
  animation-play-state: paused;
}
@keyframes scanner-activity { 0%, 100% { opacity: .04; } 48% { opacity: .62; } }
.motion-palm > img.motion-copy {
  filter: hue-rotate(8deg) saturate(.65) brightness(1.14);
  animation: palm-identification 10s ease-in-out infinite;
  animation-play-state: paused;
}
.motion-palm > .motion-copy--0 {
  -webkit-mask-image: radial-gradient(ellipse 2% 2.4% at 49% 43%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 49% 33%, #000, transparent);
  mask-image: radial-gradient(ellipse 2% 2.4% at 49% 43%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 49% 33%, #000, transparent);
}
.motion-palm > .motion-copy--1 {
  -webkit-mask-image: radial-gradient(ellipse 2% 2.4% at 55% 39%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 55% 27%, #000, transparent);
  mask-image: radial-gradient(ellipse 2% 2.4% at 55% 39%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 55% 27%, #000, transparent);
  animation-delay: 1.4s;
}
.motion-palm > .motion-copy--2 {
  -webkit-mask-image: radial-gradient(ellipse 2% 2.4% at 59% 44%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 60% 34%, #000, transparent);
  mask-image: radial-gradient(ellipse 2% 2.4% at 59% 44%, #000, transparent), radial-gradient(ellipse 1.5% 2% at 60% 34%, #000, transparent);
  animation-delay: 2.8s;
}
@keyframes palm-identification { 0%, 8%, 42%, 100% { opacity: 0; } 23% { opacity: .62; } }
@media (prefers-reduced-motion: reduce) {
  .motion-surface > img.motion-copy { display: none; animation: none; }
}

/* Keep the existing edge fades above animated image layers. */
.techband::before, .techband::after { z-index: 1; }

/* Consistent interaction details, using only existing palette tokens. */
.btn { justify-content: center; min-height: 44px; touch-action: manipulation; }
.burger { min-width: 44px; min-height: 44px; touch-action: manipulation; }
.btn:focus-visible, .burger:focus-visible, a:focus-visible,
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent-cta); outline-offset: 4px;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.footer-col a, .footer-meta a { text-underline-offset: .25em; }
.field select { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .footer-col a:hover, .footer-meta a:hover { text-decoration: underline; }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-active); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .burger { transition: transform .18s ease, opacity .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
  .btn:not(:disabled):not([aria-disabled="true"]):active, .burger:active { transform: scale(.98); }
  .btn__arrow { display: inline-block; transition: transform .2s ease; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .btn:hover .btn__arrow { transform: translateX(3px); }
}
