/* App Commandos — home.css (welcome page only) */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 5rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(9, 8, 6, 0.4), rgba(9, 8, 6, 0.4)),
    url('/images/brand/hero-mythical-opt.webp?v=3') center 38% / cover no-repeat;
}
@supports (background-image: image-set(url('/images/brand/hero-mythical-opt.avif') type('image/avif'))) {
  .hero {
    background-image:
      linear-gradient(rgba(9, 8, 6, 0.4), rgba(9, 8, 6, 0.4)),
      image-set(
        url('/images/brand/hero-mythical-opt.avif?v=3') type('image/avif'),
        url('/images/brand/hero-mythical-opt.webp?v=3') type('image/webp')
      );
  }
}
.hero::before {                    /* candle-glow behind the crest */
  content: '';
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(ellipse 44% 36% at 50% 42%, rgba(208, 171, 111, 0.17) 0%, transparent 62%),
    radial-gradient(ellipse 68% 58% at 50% 48%, rgba(73, 55, 33, 0.38) 0%, transparent 72%);
  animation: heroGlow 7s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::after {                     /* vignette pushing edges into the void */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(9, 8, 6, 0.9) 100%);
  pointer-events: none;
}
@keyframes heroGlow {
  from { opacity: 0.7; transform: scale(0.99); }
  to   { opacity: 1;   transform: scale(1.03); }
}

.hero-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroRise 0.9s ease-out;
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-logo {
  margin: 0;
  font-size: 0;
  line-height: 0;
}
.hero-logo img {
  width: min(430px, 70vw);
  height: auto;
  filter: drop-shadow(0 22px 60px rgba(208, 171, 111, 0.22));
}
.hero-title {
  max-width: 900px;
  margin: 0.35rem 0 0;
  font-size: clamp(1.55rem, 3.2vw, 2.75rem);
  letter-spacing: 0.05em;
}
.hero-subtitle {
  max-width: 760px;
  margin: 0.7rem 0 0;
  color: #E9DFC0;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Scroll cue */
.hero-cue {
  position: absolute;
  bottom: 1.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--color-secondary);
  animation: cueBob 2.4s ease-in-out infinite;
}
.hero-cue:hover { color: var(--color-accent); }
.hero-cue svg { width: 26px; height: 26px; }
@keyframes cueBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero-stack, .hero-cue { animation: none; }
}

/* ---------- Summon-in: service cards materialize with a gold flash ---------- */
html.js .show-grid .reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.9);
  filter: blur(8px) brightness(1.7) saturate(0.5);
  transition:
    opacity 0.85s ease,
    transform 0.85s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.85s ease;
}
html.js .show-grid .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  animation: summonFlash 1.2s ease-out 0.25s backwards;
}
html.js .show-grid article.reveal:nth-of-type(2) {
  transition-delay: 0.14s;
  animation-delay: 0.39s;
}
html.js .show-grid article.reveal:nth-of-type(3) {
  transition-delay: 0.28s;
  animation-delay: 0.53s;
}
@keyframes summonFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 217, 162, 0), 0 0 0 rgba(208, 171, 111, 0);
    border-color: var(--color-border);
  }
  40% {
    box-shadow: 0 0 0 1px rgba(240, 217, 162, 0.6), 0 0 64px rgba(208, 171, 111, 0.42);
    border-color: rgba(240, 217, 162, 0.8);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 217, 162, 0), 0 0 0 rgba(208, 171, 111, 0);
    border-color: var(--color-border);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.js .show-grid .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  html.js .show-grid .reveal.is-visible { animation: none; }
}

/* ---------- Statement sections (Why So Mythical? / Why App Commandos?) ---------- */
.why-section {
  max-width: 50rem;
  margin: 0 auto clamp(3.5rem, 8vw, 5.5rem);
  text-align: center;
}
.why-section h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 1.2rem 0 1.1rem;
}
.why-section p {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.18rem;
  line-height: 1.75;
  color: #E9DFC0;
}
.why-section p + p { margin-top: 1rem; }
.show-grid + .why-section { margin-top: clamp(4.5rem, 10vw, 7rem); }

/* ---------- Services showcase ---------- */
.show-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2.8rem, 6vw, 4.8rem);
}
/* Each card is an unrolled royal scroll: parchment body between two
   rolled cylinder bars (::before top, ::after bottom) with gold end caps. */
.show-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 14px 0;                    /* breathing room for the roller bars */
  background:
    /* faint Victorian trellis wallpaper: crossed diagonals + gold studs */
    radial-gradient(circle at 14px 14px, rgba(240, 217, 162, 0.05) 0 1px, transparent 2px) 0 0 / 28px 28px,
    repeating-linear-gradient(45deg, rgba(240, 217, 162, 0.02) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(240, 217, 162, 0.02) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(240, 217, 162, 0.022) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, rgba(9, 8, 6, 0.55) 0%, transparent 9%, transparent 91%, rgba(9, 8, 6, 0.6) 100%),
    linear-gradient(172deg, #3E321D 0%, #2C2418 55%, #241C10 100%);
  border-inline: 1px solid rgba(208, 171, 111, 0.3);
  border-radius: 2px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.show-card:hover,
.show-card:focus-within {
  transform: translateY(-7px);
  border-color: var(--color-border-strong);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.55), 0 0 44px rgba(208, 171, 111, 0.14);
}
.show-card::before,
.show-card::after {
  content: '';
  position: absolute;
  left: -12px;
  right: -12px;
  height: 24px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 9px 50%, var(--color-accent) 0 5px, rgba(240, 217, 162, 0) 7px),
    radial-gradient(circle at calc(100% - 9px) 50%, var(--color-accent) 0 5px, rgba(240, 217, 162, 0) 7px),
    linear-gradient(180deg, #211708 0%, #8A6A37 30%, #55401F 58%, #171008 100%);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(208, 171, 111, 0.28);
  pointer-events: none;
  z-index: 3;
}
.show-card::before { top: -12px; }
.show-card::after  { bottom: -12px; }
.show-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  margin: 1.7rem 1.2rem 0;
  border: 1px solid rgba(208, 171, 111, 0.35);
  border-radius: 3px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.45);
}
.show-media::before {              /* Victorian inner frame with brass rivets */
  content: '';
  position: absolute;
  inset: 6px;
  z-index: 2;
  border: 1px solid rgba(208, 171, 111, 0.4);
  background:
    radial-gradient(circle at 0 0,       var(--color-primary) 0 2px, transparent 3px),
    radial-gradient(circle at 100% 0,    var(--color-primary) 0 2px, transparent 3px),
    radial-gradient(circle at 0 100%,    var(--color-primary) 0 2px, transparent 3px),
    radial-gradient(circle at 100% 100%, var(--color-primary) 0 2px, transparent 3px);
  pointer-events: none;
}
.show-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.22) saturate(0.8) contrast(1.02);
  transition: transform 0.55s ease;
}
.show-card:hover .show-media img { transform: scale(1.06); }
.show-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9, 8, 6, 0.05) 30%, rgba(9, 8, 6, 0.88) 100%);
}
.show-icons {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: -34px;
}
.show-icons span {                 /* pressed gold wax seal */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 46% 54% 52% 48% / 54% 47% 53% 46%;
  background:
    radial-gradient(circle at 34% 28%, rgba(252, 247, 221, 0.4) 0 9%, transparent 34%),
    radial-gradient(circle at 50% 55%, var(--color-surface-deep) 0 46%, transparent 47%),
    radial-gradient(circle at 50% 50%, #C9A468 0 60%, #97763F 80%, #6B5226 100%);
  border: 1px solid rgba(240, 217, 162, 0.5);
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.6),
    inset 0 -3px 7px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(252, 247, 221, 0.3);
}
.show-icons img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.show-body {
  padding: 1.4rem 1.9rem 2.4rem;
  text-align: center;
}
.show-body h3 {
  font-size: 1.34rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: 0.9rem;
}
.show-body h3::after {             /* fleuron flourish under the decree title */
  content: '\2766';                /* ❦ */
  display: block;
  width: 150px;
  margin: 0.55rem auto 0;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--color-primary);
  background:
    linear-gradient(to right, transparent, rgba(208, 171, 111, 0.6)) left 50% / calc(50% - 20px) 1px no-repeat,
    linear-gradient(to left, transparent, rgba(208, 171, 111, 0.6)) right 50% / calc(50% - 20px) 1px no-repeat;
}
.show-body p::first-letter {       /* illuminated drop cap */
  font-family: var(--font-display);
  font-size: 1.55em;
  line-height: 1;
  color: var(--color-accent);
}
.show-body p {
  font-size: 1.12rem;
  line-height: 1.6;
  color: #DCCFA8;
  margin: 0;
}

/* ---------- Contact CTA ---------- */
.contact-cta { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.contact-cta .panel {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  /* borderless aged-paper sheet instead of the generic bordered panel */
  border: 0;
  border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, rgba(240, 217, 162, 0.02) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(240, 217, 162, 0.018) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse 80% 60% at 18% 8%, rgba(240, 217, 162, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 130% 120% at 50% 45%, transparent 52%, rgba(9, 8, 6, 0.55) 100%),
    linear-gradient(168deg, #40331E 0%, #2C2418 55%, #231B10 100%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}
.contact-cta .panel::before { content: none; }  /* drop the top gold hairline */
.contact-cta h3 {
  font-size: clamp(1.55rem, 3.8vw, 2.25rem);
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
}
.contact-cta p {
  max-width: 46rem;
  margin: 0 auto;
  font-size: 1.18rem;
  color: #E9DFC0;
}
.wa-glyph {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: inline-block;
  vertical-align: text-top;
}
