/* Final visual polish for the neutral SORAI landing with corporate blue accents. Loaded after styles.css. */

/* Product artwork ---------------------------------------------------------- */
.product-icon,
.visual-icon {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.product-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 0;
}

.product-icon::before,
.visual-icon::before {
  display: none;
  content: none;
}

/*
 * Each SVG fills a different share of its canvas (Apt ~100%, Kavi ~82%, Kai/Assis ~55%),
 * so scale and offset are tuned per mark to give all of them the same optical size and
 * a centered silhouette. Solid, dense marks (Kavi, Kai) sit slightly smaller on purpose.
 */
.cloud-kavi,
.product-card-kavi {
  --mark-scale: 0.92;
}

.cloud-mizu,
.product-card-mizu {
  --mark-scale: 1.24;
  --mark-y: 3.6%;
}

.cloud-apt,
.product-card-apt {
  --mark-scale: 0.9;
  --mark-x: 0;
  --mark-y: 0;
}

.cloud-kai,
.product-card-kai {
  --mark-scale: 1.34;
  --mark-x: -5.5%;
}

.cloud-assis,
.product-card-assis {
  --mark-scale: 1.36;
  --mark-x: -2%;
}

/* Preserve the official Fieldops PNG canvas without the legacy glyph crop. */
.cloud-fieldops,
.product-card-fieldops {
  --mark-scale: 1;
  --mark-x: 0;
  --mark-y: 0;
}

/* Hero products are links to their pages (/kavi/, /mizu/, ...). */
a.cloud-product {
  color: inherit;
  text-decoration: none;
}

a.cloud-product:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.product-icon img,
.visual-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(var(--mark-x, 0), var(--mark-y, 0)) scale(var(--mark-scale, 0.9));
  transform-origin: center;
  filter: drop-shadow(0 10px 22px var(--shadow-mark));
}

/* Product marks are white monochrome SVGs; the light theme turns them into ink. */
[data-theme="light"] .product-icon img,
[data-theme="light"] .visual-icon img {
  filter: brightness(0) drop-shadow(0 10px 22px var(--shadow-mark));
}

/* Only the Apt hero card uses the official blue mark on its tightly fitted canvas. */
.hero-apt-mark {
  --mark-scale: 1;
  --mark-x: 0;
  --mark-y: 0;
}

.hero-apt-mark .product-icon {
  border-radius: 12px;
  background: var(--surface-1);
}

.hero-apt-mark .product-icon img,
[data-theme="light"] .hero-apt-mark .product-icon img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: none;
}

.visual-icon {
  width: 112px;
  height: 112px;
  padding: 0;
  border-radius: 0;
}

.cloud-product {
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(var(--tint), 0.025), transparent 58%),
    var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(var(--tint), 0.025);
}

.cloud-product:hover {
  background:
    linear-gradient(145deg, rgba(var(--tint), 0.04), transparent 58%),
    var(--surface-raised-hover);
}

.product-cloud {
  box-shadow:
    var(--shadow-cloud),
    inset 0 1px 0 rgba(var(--tint), 0.025);
}

.product-card {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(var(--tint), 0.02),
    var(--shadow-card);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(var(--tint), 0.018), transparent 34%);
}

.product-card-visual {
  min-height: 300px;
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--tint), 0.045), transparent 12rem),
    linear-gradient(180deg, rgba(var(--tint), 0.01), transparent 70%),
    var(--surface-visual);
}

.product-card-visual::after {
  display: none;
  content: none;
}

.product-card:hover .visual-icon {
  transform: translateY(-3px) scale(1.025);
}

.visual-word {
  right: 18px;
  bottom: 8px;
  color: rgba(var(--tint), 0.03);
  transition: color 0.24s ease, transform 0.24s ease;
}

.product-card:hover .visual-word {
  color: rgba(var(--tint), 0.048);
  transform: translateX(-3px);
}

.product-card-copy {
  position: relative;
  z-index: 2;
}

.status-badge {
  background: rgba(var(--tint), 0.018);
}

.status-demo {
  background: var(--contrast);
}

/* Lumi stays intentionally typographic until its production mark is approved. */
/* The bordered box reads larger than the open marks, so it sits inset within the same 48px slot. */
.lumi-mark {
  width: 40px;
  height: 40px;
  margin: 4px;
  border-color: rgba(var(--tint), 0.16);
  border-radius: 12px;
  background: transparent;
}

@media (max-width: 680px) {
  .lumi-mark {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 560px) {
  .lumi-mark {
    width: 34px;
    height: 34px;
  }
}

/* Keep light surfaces neutral and free of decorative gradient overlays. */
[data-theme="light"] .product-cloud {
  background: var(--surface-1);
}

[data-theme="light"] .cloud-product {
  background: var(--surface-raised);
}

[data-theme="light"] .cloud-product:hover {
  background: var(--surface-raised-hover);
}

[data-theme="light"] .product-card-visual {
  background: var(--surface-visual);
}

[data-theme="light"] .product-cloud::before,
[data-theme="light"] .product-card::after,
[data-theme="light"] .product-card-visual::before {
  background: none;
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  position: relative;
  padding-top: 0;
  overflow: hidden;
}

.site-footer::before {
  content: "SORAI";
  position: absolute;
  right: -0.035em;
  bottom: 32px;
  z-index: -1;
  color: rgba(var(--tint), 0.018);
  font-size: clamp(8rem, 23vw, 23rem);
  line-height: 0.7;
  font-weight: 950;
  letter-spacing: -0.085em;
  pointer-events: none;
  user-select: none;
}

.footer-cta {
  min-height: 330px;
  padding: 62px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  border-bottom: 1px solid var(--border);
}

.footer-cta-copy {
  max-width: 900px;
}

.footer-cta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-cta-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--contrast);
  box-shadow: 0 0 0 5px rgba(var(--tint), 0.05);
}

.footer-cta h2 {
  margin: 18px 0 0;
  max-width: 880px;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  line-height: 0.91;
  letter-spacing: -0.065em;
}

.footer-cta h2 em {
  color: var(--accent-text);
  font-style: normal;
}

.footer-cta-action {
  min-width: 170px;
  min-height: 54px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 0.9rem;
  font-weight: 850;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.footer-cta-action:hover {
  color: var(--on-accent);
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.footer-main {
  padding: 58px 0 62px;
  grid-template-columns: minmax(280px, 1.45fr) repeat(3, minmax(145px, 0.55fr));
  gap: clamp(34px, 5vw, 72px);
}

.footer-brand {
  max-width: 340px;
}

.footer-brand p {
  max-width: 290px;
  margin-top: 20px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.footer-brand-note {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.footer-socials {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-social {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-soft);
  background: rgba(var(--tint), 0.015);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.footer-social svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-social[href]:hover {
  color: var(--on-accent);
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-2px);
}

.footer-social-placeholder {
  color: var(--text-faint);
  cursor: default;
}

.footer-column {
  gap: 11px;
}

.footer-column strong {
  margin-bottom: 10px;
}

.footer-column a,
.footer-contact span {
  line-height: 1.45;
}

.footer-contact a {
  width: fit-content;
}

.footer-location {
  margin-top: 5px;
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
}

.footer-bottom {
  min-height: 72px;
}

.footer-bottom-meta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-made-in {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-made-in::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

@media (max-width: 1080px) {
  .footer-main {
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(120px, 0.5fr));
    gap: 34px;
  }
}

@media (max-width: 820px) {
  .visual-icon {
    width: 96px;
    height: 96px;
  }

  .footer-cta {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-cta-action {
    width: fit-content;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .product-icon {
    width: 42px;
    height: 42px;
  }

  .visual-icon {
    width: 88px;
    height: 88px;
  }

  .product-card-visual {
    min-height: 250px;
  }

  .footer-cta {
    padding: 48px 0 44px;
    gap: 30px;
  }

  .footer-cta h2 {
    font-size: clamp(2.55rem, 14vw, 4.2rem);
  }

  .footer-main {
    padding-top: 46px;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-bottom-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card:hover .visual-icon,
  .product-card:hover .visual-word,
  .footer-social[href]:hover,
  .footer-cta-action:hover {
    transform: none;
  }
}
