/* =================================================================
   Shortcut — "ให้ออมสินดูแลคุณ" (Figma "Shortcut", 1440×499)
   Full-bleed pink abstract + blue corner glow, six glass tiles.
   ================================================================= */
.s-shortcut {
  --sc-tile-w: 136.67px;
  --sc-tile-h: 176px;
  --sc-gap: 16px;
  --sc-glass: rgba(255, 255, 255, 0.2);
  --sc-glass-hover: rgba(255, 255, 255, 0.28);
  --sc-edge: rgba(255, 255, 255, 0.75);
  /* hover motion standard (same curve + tempo in and out) */
  --sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sc-dur: 560ms;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 499px;
  padding: 100px 16px;
  background: #ff6a9e;
  color: #fff;
}

/* ---------- background (fill layers: image FILL + linear gradient on top) ---------- */
.s-shortcut .sc-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.s-shortcut .sc-bg__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.s-shortcut .sc-bg__glow {
  position: absolute;
  inset: 0;
  /* Figma GRADIENT_LINEAR (#00BDFF → #3C65A8 → transparent) mapped to CSS at 1440×499 */
  background: linear-gradient(350.54deg, #00bdff -7.2%, #3c65a8 10.9%, rgba(105, 99, 162, 0.75) 15.7%, rgba(151, 97, 156, 0.5) 20.5%, rgba(196, 94, 150, 0.25) 25.3%, rgba(241, 92, 144, 0) 30.1%);
}

/* ---------- layout ---------- */
.s-shortcut .sc-inner {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.s-shortcut .sc-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.s-shortcut .sc-title {
  font-size: 40px;
  line-height: 1.2;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}
.s-shortcut .sc-sub {
  font-size: 16px;
  line-height: 1.2;
  font-weight: var(--fw-regular);
}

.s-shortcut .sc-nb { display: inline-block; }
.s-shortcut .sc-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sc-gap);
  width: 100%;
}
.s-shortcut .sc-cell { position: relative; display: flex; }
/* Hover shadow on its own layer (the tile clips its overflow for the sheen), moving with
   the tile; only opacity + transform animate. Outer shadows only → never over the glass. */
.s-shortcut .sc-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow:
    0 18px 36px -16px rgba(140, 0, 70, 0.4),
    0 0 26px rgba(255, 255, 255, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sc-dur) var(--sc-ease), transform var(--sc-dur) var(--sc-ease);
}

/* ---------- glass tile ---------- */
.s-shortcut .sc-tile {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: var(--sc-tile-h);
  padding: 24px 8px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--sc-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 0.5px var(--sc-edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateZ(0);
  transition:
    transform var(--sc-dur) var(--sc-ease),
    background-color var(--sc-dur) var(--sc-ease);
  -webkit-tap-highlight-color: transparent;
}
/* brighter glass edge on hover — faded in on its own layer instead of animating box-shadow */
.s-shortcut .sc-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sc-dur) var(--sc-ease);
}
/* soft sheen that sweeps across on hover */
.s-shortcut .sc-tile::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
  transform: translateX(-70%);
  opacity: 0;
  pointer-events: none;
  /* hover-out: fade the sheen away where it is, then park it back off-screen */
  transition: opacity 480ms var(--sc-ease), transform 0s linear 480ms;
}
.s-shortcut .sc-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  flex: none;
  transition: transform 650ms var(--sc-ease), filter 650ms var(--sc-ease);
  will-change: transform; /* kept: the icon's own layer (also keeps its sub-pixel placement identical to the design) */
}
.s-shortcut .sc-tile__icon img { max-width: none; }
.s-shortcut .sc-tile__label {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  font-weight: var(--fw-semibold);
}

@media (hover: hover) and (pointer: fine) {
  .s-shortcut .sc-cell:hover::before { opacity: 1; transform: translateY(-4px); }
  .s-shortcut .sc-tile:hover {
    transform: translateY(-4px);
    background-color: var(--sc-glass-hover);
    will-change: transform;
  }
  .s-shortcut .sc-tile:hover::before { opacity: 1; }
  .s-shortcut .sc-tile:hover .sc-tile__icon {
    transform: translateY(-3px) rotate(-3deg) scale(1.03);
    filter: drop-shadow(0 8px 10px rgba(150, 0, 70, 0.22));
  }
  .s-shortcut .sc-tile:hover::after {
    opacity: 1;
    transform: translateX(70%);
    transition: transform 1100ms var(--sc-ease), opacity 360ms var(--sc-ease);
  }
  .s-shortcut .sc-tile:hover:active { transform: translateY(-4px) scale(0.985); }
  .s-shortcut .sc-cell:hover:has(.sc-tile:active)::before { transform: translateY(-4px) scale(0.985); }
}
.s-shortcut .sc-tile:active {
  transform: scale(0.985);
  transition-duration: 160ms;
}
.s-shortcut .sc-cell:has(.sc-tile:active)::before { transition-duration: 160ms; }
.s-shortcut .sc-tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 24px;
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .s-shortcut { padding: 80px var(--gutter); min-height: 0; }
  .s-shortcut .sc-inner { max-width: 640px; gap: 32px; }
  .s-shortcut .sc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .s-shortcut .sc-tile { min-height: 164px; }
  .s-shortcut .sc-bg__glow {
    background: linear-gradient(345deg, #00bdff -6%, #3c65a8 8%, rgba(241, 92, 144, 0) 24%);
  }
}

@media (max-width: 767px) {
  .s-shortcut { padding: 56px var(--gutter) 64px; }
  .s-shortcut .sc-inner { gap: 24px; }
  .s-shortcut .sc-head { gap: 10px; }
  .s-shortcut .sc-title { font-size: 30px; }
  .s-shortcut .sc-sub { font-size: 15px; line-height: 1.45; max-width: 300px; }
  .s-shortcut .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* list-tile layout: icon left, label right */
  .s-shortcut .sc-tile {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    min-height: 76px;
    padding: 10px 12px 10px 8px;
    border-radius: 20px;
    text-align: left;
  }
  .s-shortcut .sc-tile__icon { width: 52px; height: 52px; }
  .s-shortcut .sc-tile__icon img { transform: scale(0.72); }
  .s-shortcut .sc-tile__label { font-size: 14px; line-height: 1.3; }
  .s-shortcut .sc-tile:focus-visible { border-radius: 20px; }
  .s-shortcut .sc-bg__glow {
    background: linear-gradient(335deg, #00bdff -4%, #3c65a8 7%, rgba(241, 92, 144, 0) 20%);
  }
}

@media (max-width: 359px) {
  .s-shortcut .sc-tile { padding-right: 8px; }
  .s-shortcut .sc-tile__label { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .s-shortcut .sc-tile:hover,
  .s-shortcut .sc-tile:active,
  .s-shortcut .sc-cell:hover::before,
  .s-shortcut .sc-tile:hover .sc-tile__icon { transform: none; }
  .s-shortcut .sc-tile::after { display: none; }
}
