/* TrueLink Offers locale hubs
 * Scope: /en/offers/ and /offers/tw/ only.
 * Contract: content first, light theme, checkout is the source of truth for
 * destination eligibility, price, tax/duty, stock, and delivery estimates.
 */

html[data-tl-offers-role="hub"] .tl-ai-help-icon { display: none; }

.of-hub-skip {
  position: fixed;
  z-index: 100000;
  top: 0.5rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: var(--of-panel);
  color: var(--of-on-panel-strong);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--of-dur-fast) var(--of-ease);
}

html[data-tl-offers-module] a.of-hub-skip { color: var(--of-on-panel-strong); }
.of-hub-skip:focus { transform: translateY(0); }
.of-hub-skip:focus-visible { outline: var(--of-ring-w) solid var(--of-cta); outline-offset: var(--of-ring-off); }

.oh-hero {
  box-sizing: border-box;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.25rem;
  align-items: center;
}

.oh-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.1rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--of-accent);
}

.oh-rule { width: 34px; height: 1px; background: var(--of-cta); }

.oh-hero h1 {
  margin: 0 0 1rem;
  color: var(--of-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.1rem, 4.6vw, 3.05rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.oh-hero h1 em { color: var(--of-accent); font-style: italic; }
.oh-lede { max-width: 46ch; margin: 0 0 0.75rem; color: var(--of-muted); font-size: 1.05rem; line-height: 1.65; }
.oh-credit { margin: 0 0 1.5rem; color: var(--of-muted); font-size: 0.85rem; }
.oh-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.oh-btn-ghost,
.of-hub-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.05rem;
  border: 1px solid var(--of-line);
  border-radius: 10px;
  background: var(--of-surface);
  color: var(--of-accent);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--of-dur-fast) var(--of-ease), background-color var(--of-dur-norm) var(--of-ease), border-color var(--of-dur-norm) var(--of-ease);
}

html[data-tl-offers-module] a.oh-btn-ghost,
html[data-tl-offers-module] a.of-hub-link { color: var(--of-accent); }
.oh-btn-ghost:hover, .of-hub-link:hover { border-color: var(--of-accent); background: var(--of-accent-soft); transform: translateY(-1px); }
.oh-btn-ghost:focus-visible, .of-hub-link:focus-visible { outline: var(--of-ring-w) solid var(--of-ring); outline-offset: var(--of-ring-off); }

.oh-art {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--of-line);
  border-radius: 18px;
  background: var(--of-surface);
  box-shadow: 0 1px 2px var(--of-shadow-navy), 0 8px 24px var(--of-shadow-navy);
}

.oh-art svg { display: block; width: 100%; height: auto; }

.of-hub-trust {
  margin: 0 0 2.75rem;
  padding: 1.2rem 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  align-items: start;
  border-top: 1px solid var(--of-line);
  border-bottom: 1px solid var(--of-line);
}

.of-hub-trust h2,
.of-hub-method h2,
.oh-topics h2,
.oh-section-head h2 {
  margin: 0;
  color: var(--of-ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
}

.of-hub-trust h2 { font-size: 1.3rem; }
.of-hub-trust-copy { display: grid; gap: 0.75rem; }
.of-hub-trust-copy p { margin: 0; color: var(--of-muted); font-size: 0.94rem; line-height: 1.65; }

.of-hub-editions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.of-hub-edition {
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--of-line);
  border-radius: 999px;
  background: var(--of-surface);
  color: var(--of-accent);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.of-hub-edition[aria-current="page"] { border-color: var(--of-accent); box-shadow: inset 0 0 0 1px var(--of-accent); }
.of-hub-edition::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--of-trust); }
.of-hub-edition:hover { background: var(--of-accent-soft); }
.of-hub-edition:focus-visible { outline: var(--of-ring-w) solid var(--of-ring); outline-offset: var(--of-ring-off); }

.of-hub-assurance {
  padding: 0.8rem 0.95rem;
  border-left: 3px solid var(--of-trust);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--of-trust) 7%, var(--of-surface));
}

.oh-topics {
  box-sizing: border-box;
  margin: 0 0 2.75rem;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--of-line);
  border-radius: 16px;
  background: var(--of-surface);
}

.oh-topics h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.oh-topics p { max-width: 58ch; margin: 0; color: var(--of-muted); font-size: 0.95rem; line-height: 1.65; }
.oh-topics-copy { min-width: 0; flex: 1 1 24rem; }

.of-hub-method { margin: 0 0 3rem; }
.of-hub-method > header { margin-bottom: 1.25rem; }
.of-hub-method h2 { margin-bottom: 0.35rem; font-size: 1.55rem; }
.of-hub-method > header p { max-width: 68ch; margin: 0; color: var(--of-muted); }
.of-hub-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--of-line); list-style: none; counter-reset: hub-step; }
.of-hub-step { min-width: 0; padding: 1.25rem 1.15rem 0.2rem 0; counter-increment: hub-step; }
.of-hub-step + .of-hub-step { padding-left: 1.15rem; border-left: 1px solid var(--of-line); }
.of-hub-step::before { content: '0' counter(hub-step); display: block; margin-bottom: 0.6rem; color: var(--of-accent); font-weight: 800; letter-spacing: 0.08em; }
.of-hub-step strong { display: block; margin-bottom: 0.35rem; color: var(--of-ink); }
.of-hub-step p { margin: 0; color: var(--of-muted); font-size: 0.9rem; line-height: 1.6; }

.oh-section-head { margin: 0 0 1.5rem; }
.oh-section-head h2 { margin: 0 0 0.4rem; font-size: 1.55rem; }
.oh-section-head p { max-width: 70ch; margin: 0; color: var(--of-muted); }

.of-chips { margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.of-chip {
  min-height: 44px;
  padding: 0.52rem 0.95rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--of-line);
  border-radius: 999px;
  background: var(--of-surface);
  color: var(--of-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--of-dur-fast) var(--of-ease), background-color var(--of-dur-fast) var(--of-ease);
}

html[data-tl-offers-module] a.of-chip { color: var(--of-muted); }
html[data-tl-offers-module] a.of-chip:hover,
html[data-tl-offers-module] a.of-chip:focus-visible { color: var(--of-ink); text-decoration: none; }
.of-chip:hover { background: var(--of-accent-soft); transform: translateY(-1px); }
.of-chip:focus-visible { outline: var(--of-ring-w) solid var(--of-ring); outline-offset: var(--of-ring-off); }
.of-chip.is-active { border-color: var(--of-accent); color: var(--of-ink); box-shadow: inset 0 0 0 1px var(--of-accent); }
.of-chip-hidden, .of-search-hidden { display: none; }

.oh-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
.oh-card {
  box-sizing: border-box;
  min-width: 0;
  padding: 1.35rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  gap: 0.7rem;
  border: 1px solid var(--of-line);
  border-radius: 16px;
  background: var(--of-surface);
  color: inherit;
  box-shadow: 0 1px 2px var(--of-shadow-navy);
  text-decoration: none;
  transition: transform var(--of-dur-fast) var(--of-ease), box-shadow var(--of-dur-norm) var(--of-ease), border-color var(--of-dur-norm) var(--of-ease);
}

.oh-card[data-tl-featured="1"] { grid-column: span 3; padding: 1.55rem 1.5rem 1.35rem; }
.oh-card[data-tl-policy="1"] { grid-column: 1 / -1; }
.oh-card:hover, .oh-card:focus-visible { border-color: var(--of-accent); box-shadow: 0 12px 28px var(--of-shadow-navy); transform: translateY(-3px); }
.oh-card:focus-visible { outline: var(--of-ring-w) solid var(--of-ring); outline-offset: var(--of-ring-off); }
.oh-kicker { display: flex; align-items: center; gap: 0.5rem; color: var(--of-muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.oh-kicker .oh-angles { margin-left: auto; font-weight: 700; }
.oh-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; }
.oh-dot-green { background: var(--of-trust); }
.oh-dot-navy { background: var(--of-accent); }
.oh-dot-gold { background: var(--of-cta); }
.oh-tile { box-sizing: border-box; width: 52px; height: 52px; padding: 11px; flex: none; border-radius: 12px; background: var(--of-accent-soft); color: var(--of-accent); }
.oh-tile svg { display: block; width: 30px; height: 30px; }
.oh-card h3 { margin: 0; color: var(--of-ink); font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.oh-card[data-tl-featured="1"] h3 { font-size: 1.35rem; }
.oh-card p { margin: 0; flex: 1; color: var(--of-muted); font-size: 0.92rem; line-height: 1.6; }
.oh-more { display: inline-flex; align-items: center; gap: 6px; color: var(--of-accent); font-size: 0.88rem; font-weight: 700; }
.oh-more svg { width: 14px; height: 14px; transition: transform var(--of-dur-fast) var(--of-ease); }
.oh-card:hover .oh-more svg { transform: translateX(3px); }
.oh-faq { margin-top: 2.75rem; }
.of-cta-bar .of-cta-disclosure a { color: var(--of-on-panel-muted); text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
  .oh-rise { animation: ohRise 0.28s var(--of-ease) both; }
  .oh-rise-2 { animation-delay: 0.06s; }
  .oh-rise-3 { animation-delay: 0.12s; }
  .oh-grid.of-filtering .oh-card:not(.of-chip-hidden) { animation: ofChipRise 0.22s var(--of-ease) both; }
  @keyframes ohRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes ofChipRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .of-hub-skip, .oh-card, .oh-btn-ghost, .of-hub-link, .of-chip, .oh-more svg { transition: none; }
  .oh-card:hover, .oh-btn-ghost:hover, .of-hub-link:hover, .of-chip:hover { transform: none; }
}

@media (max-width: 920px) {
  .oh-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.25rem; }
  .oh-art { max-width: 620px; }
  .oh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oh-card, .oh-card[data-tl-featured="1"], .oh-card[data-tl-policy="1"] { grid-column: span 1; }
}

@media (max-width: 720px) {
  .of-hub-trust { grid-template-columns: 1fr; }
  .of-hub-steps { grid-template-columns: 1fr; }
  .of-hub-step { padding: 1rem 0; }
  .of-hub-step + .of-hub-step { padding-left: 0; border-top: 1px solid var(--of-line); border-left: 0; }
}

@media (max-width: 600px) {
  .oh-hero { padding-right: 1rem; padding-left: 1rem; }
  .oh-grid { grid-template-columns: 1fr; }
  .oh-topics { padding: 1.25rem; }
  .of-hub-trust { padding-right: 0; padding-left: 0; }
  .of-hub-editions { display: grid; grid-template-columns: 1fr; }
  .of-hub-edition { width: 100%; box-sizing: border-box; border-radius: 10px; }
  .of-search-input { font-size: 1rem; }
}
