/* V26 homepage refinement — preserve the original watercolor identity while
   moving help, support and readable controls into a clearer first viewport. */

.topbar-meta:last-child {
  min-width: 0;
}

.topbar-phone {
  display: inline-flex;
  min-height: 2.1rem;
  align-items: center;
  padding: .2rem .65rem;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .09);
  letter-spacing: .035em;
}

.access-toggle {
  display: none;
  width: 2.8rem;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--wine-deep);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: .85rem;
  cursor: pointer;
  line-height: 1;
}

.access-toggle span {
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: 1rem;
  font-weight: 900;
}

.access-toggle small {
  margin-top: .15rem;
  font-size: .57rem;
  font-weight: 850;
}

.hero-copy h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
}

.hero-lead {
  max-width: 650px;
  margin-bottom: 1.25rem;
  color: #594146;
}

.hero-primary-actions {
  display: grid;
  max-width: 710px;
  margin: 0 0 .8rem;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-action {
  position: relative;
  display: grid;
  min-height: 7.25rem;
  align-content: center;
  gap: .16rem;
  overflow: hidden;
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 20px 27px 18px 24px / 23px 18px 26px 19px;
  color: #fff;
  box-shadow: 0 16px 38px rgba(73, 37, 43, .16);
  text-decoration: none;
  transition: transform .28s var(--warm-ease), box-shadow .28s ease, filter .28s ease;
}

.hero-action::after {
  position: absolute;
  inset: 0 auto 0 -52%;
  width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .27), transparent);
  content: "";
  pointer-events: none;
  transform: skewX(-18deg);
  transition: translate .62s var(--warm-ease);
}

.hero-action:hover {
  filter: saturate(1.04);
  box-shadow: 0 20px 46px rgba(73, 37, 43, .22);
  transform: translateY(-3px);
}

.hero-action:hover::after {
  translate: 430% 0;
}

.hero-action-help {
  background: linear-gradient(138deg, #7b3045, #a64a5c);
}

.hero-action-support {
  background: linear-gradient(138deg, #28584f, #4d8979);
}

.hero-action-label {
  justify-self: start;
  margin-bottom: .25rem;
  padding: .2rem .5rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-action strong {
  color: #fff;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 1.12rem;
  line-height: 1.45;
}

.hero-action small {
  color: rgba(255, 255, 255, .91);
  font-size: .76rem;
  font-weight: 650;
  line-height: 1.55;
}

.hero-assurance {
  display: flex;
  max-width: 710px;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .9rem;
  margin: 0 0 1rem;
  color: #654a4e;
  font-size: .74rem;
  font-weight: 750;
}

.hero-assurance span,
.hero-assurance a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.hero-assurance span::before {
  color: var(--support);
  content: "✓";
  font-weight: 950;
}

.hero-assurance a {
  color: #700020;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.perspective-control {
  max-width: 710px;
  margin: 1rem 0 .85rem;
}

.hero-utility-links {
  display: flex;
  max-width: 710px;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .6rem;
  margin: 0 0 1rem;
  font-size: .82rem;
  font-weight: 850;
}

.hero-utility-links a {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  padding: .35rem .72rem;
  color: #642c3d;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(100, 44, 61, .2);
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.hero-utility-links a:hover {
  background: #fff;
  border-color: rgba(100, 44, 61, .42);
  transform: translateY(-1px);
}

.storybook-hero-visual {
  width: min(46vw, 650px);
}

.trust-link {
  color: inherit;
  text-decoration: none;
  transition: background .22s ease, transform .22s ease;
}

.trust-link:hover {
  background: #fff8ef;
  transform: translateY(-2px);
}

.trust-link b {
  color: var(--wine);
  font-size: 1rem;
}

.mobile-action > span {
  display: grid;
  gap: .02rem;
  line-height: 1.25;
}

.mobile-action strong {
  font-size: .82rem;
}

.mobile-action small {
  color: rgba(255, 255, 255, .88);
  font-size: .62rem;
  font-weight: 650;
}

body.high-contrast .hero-action,
body.senior-friendly .hero-action {
  border: 2px solid #000;
}

body.high-contrast .hero-action-help,
body.senior-friendly .hero-action-help {
  background: #700020;
}

body.high-contrast .hero-action-support,
body.senior-friendly .hero-action-support {
  background: #07564e;
}

body.high-contrast .hero-utility-links a,
body.senior-friendly .hero-utility-links a {
  color: #000;
  background: #fff;
  border: 2px solid #000;
}

@media (max-width: 1180px) {
  .storybook-hero-visual {
    width: min(44vw, 570px);
  }
}

@media (max-width: 1100px) {
  .hero-copy h1 {
    max-width: 16ch;
  }

  .storybook-hero-visual {
    width: min(92vw, 720px);
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: calc(5.7rem + env(safe-area-inset-bottom));
  }

  .topbar-inner {
    width: min(100% - 1rem, var(--max));
  }

  .topbar-meta:last-child {
    width: 100%;
    justify-content: space-between;
    gap: .45rem;
  }

  .topbar-meta:last-child .topbar-dot {
    display: none;
  }

  .topbar-guide-link {
    display: none;
  }

  .topbar-link,
  .topbar-phone {
    font-size: .72rem;
  }

  .topbar-phone {
    min-height: 1.9rem;
    padding-inline: .5rem;
  }

  .access-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .access-toggle[aria-expanded="true"] {
    color: #fff;
    background: var(--support);
    border-color: var(--support);
  }

  .access-tools {
    padding: 2rem .5rem .55rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(1rem) scale(.985);
    visibility: hidden;
    transition: opacity .2s ease, transform .24s var(--warm-ease), visibility .2s step-end;
  }

  .access-tools::before {
    position: absolute;
    top: .38rem;
    left: 50%;
    color: #4e383c;
    content: "閱讀顯示設定";
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .access-tools.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
    transition: opacity .2s ease, transform .24s var(--warm-ease), visibility 0s;
  }

  .hero {
    padding-top: 3.1rem !important;
    padding-bottom: 3.7rem !important;
  }

  .hero-grid {
    gap: 2.4rem;
  }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 12vw, 3.35rem);
    line-height: 1.2;
  }

  .hero-lead {
    margin-bottom: 1rem;
    font-size: 1.02rem;
    line-height: 1.78;
  }

  .hero-primary-actions {
    grid-template-columns: 1fr;
  }

  .hero-action {
    min-height: 6.7rem;
    padding: .95rem 1rem;
  }

  .hero-action strong {
    font-size: 1.08rem;
  }

  .hero-assurance {
    display: grid;
    gap: .3rem;
    margin-block: .85rem 1.1rem;
  }

  .perspective-control {
    margin-top: .7rem;
    padding: .42rem;
    border-radius: 21px 18px 23px 19px;
  }

  .perspective-label {
    margin: .3rem .48rem .55rem;
    font-size: .74rem;
  }

  .perspective-tab {
    min-height: 3.75rem;
  }

  .perspective-panel {
    padding: .85rem .7rem .65rem;
  }

  .hero-utility-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
  }

  .hero-utility-links a {
    justify-content: center;
    padding-inline: .55rem;
    text-align: center;
  }

  .hero-utility-links a:last-child {
    grid-column: 1 / -1;
  }

  .hero-pills {
    margin-top: .2rem;
  }

  .hero-trust-note {
    font-size: .74rem;
  }

  .storybook-hero-visual {
    width: min(92vw, 520px);
  }

  .trust-link:hover {
    transform: none;
  }

  .mobile-actions {
    right: .55rem;
    bottom: max(.55rem, env(safe-area-inset-bottom));
    left: .55rem;
  }

  .mobile-action {
    min-height: 4.15rem;
  }
}

@media (max-width: 370px) {
  .topbar-link[href*="anti-fraud"] {
    display: none;
  }

  .hero-utility-links {
    grid-template-columns: 1fr;
  }

  .hero-utility-links a:last-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-action,
  .hero-utility-links a,
  .access-tools {
    transition: none !important;
  }
}
