/* Home page (templates/landing.html, static/waxdofus.js): the hero's frame and buttons, the sections below the hero,
   the footer and the account dialog. The hero scene, its content column and the WAX 3.7 section: home-hero.css
   (loaded after this file). Shared look (tokens, header, fields, focus): wax-site.css. */

.home-main { display: block; }

/* ---- hero frame (the scene itself: home-hero.css) ---- */
.portal-main { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.home-main .portal-main { height: min(560px, 61svh); min-height: 400px; }
.portal-hero { display: flex; flex-direction: column; align-items: center; width: min(940px, calc(100% - 40px)); padding: 24px 0; text-align: center; }
.portal-hero h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.portal-logo { width: min(470px, 70%); max-height: 215px; height: auto; object-fit: contain; filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.5)); }
.portal-hero > p { max-width: 680px; margin: 0; color: #f3f1f8; font: 700 18px/1.45 var(--wx-display); text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72); }
.portal-hero > p.portal-mac-hint, .home-main .home-hero .portal-hero > p.portal-mac-hint { margin: 10px 0 0; font: 500 12.5px/1.45 var(--wx-font); opacity: 0.8; }
.portal-online { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--wx-teal-line); border-radius: 999px; background: rgba(12, 22, 30, 0.6); color: var(--wx-text-2); font-size: 12px; white-space: nowrap; }
.portal-online strong { color: var(--wx-teal); font-size: 13px; }
.portal-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.developer-jump { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; color: #dcd6ec; font-size: 12.5px; text-underline-offset: 4px; }
.developer-jump:hover { color: #fff; text-decoration: underline; }
.developer-jump > span { color: var(--wx-teal); font-size: 18px; line-height: 1; }

/* the hero's buttons (waxdofus.js swaps primary/secondary for the Mac download): same look as wax-site.css .wx-btn */
.portal-button, .form-submit, .secondary-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 800 14px/1.2 var(--wx-font);
  text-align: center;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.portal-button-primary, .form-submit { border-color: #a6ece4; background: linear-gradient(180deg, #9ae2dd, #74cbc8); color: #0a2224; }
.portal-button-primary:hover, .form-submit:hover { color: #061a1b; filter: brightness(1.06); }
.portal-button-secondary, .secondary-submit { border-color: var(--wx-line-3); background: rgba(14, 12, 28, 0.72); color: #fff; }
.portal-button-secondary:hover, .secondary-submit:hover { color: #fff; border-color: var(--wx-teal-line); background: rgba(30, 28, 52, 0.9); }
.portal-button.is-disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- launch-week promotions (shop_promo_home.go, vote_event.go): one copy per language, CSS shows <html lang>'s ---- */
.home-promo { position: relative; border-top: 1px solid var(--wx-line-2); background: radial-gradient(40% 120% at 10% 50%, rgba(128, 212, 210, 0.14), rgba(128, 212, 210, 0) 70%), radial-gradient(50% 140% at 90% 50%, rgba(154, 95, 224, 0.22), rgba(154, 95, 224, 0) 70%), linear-gradient(180deg, #0f1222, #121228); }
.home-promo-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; width: min(1100px, calc(100% - 48px)); margin: auto; padding: 34px 0; }
.home-promo-art { position: relative; width: 120px; height: 120px; }
.home-promo-art::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(170, 104, 240, 0.4), rgba(170, 104, 240, 0)); }
.home-promo-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55)); }
.home-promo-badge { position: absolute; top: -6px; right: -12px; min-width: 46px; padding: 5px 11px; border-radius: 999px; background: linear-gradient(180deg, #9ae2dd, #74cbc8); color: #0a2224; font: 800 18px/1.2 var(--wx-font); text-align: center; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(128, 212, 210, 0.16); }
.home-promo [data-lang] { display: none; }
html[lang="fr"] .home-promo .home-promo-text[data-lang="fr"], html[lang="en"] .home-promo .home-promo-text[data-lang="en"], html[lang="es"] .home-promo .home-promo-text[data-lang="es"] { display: block; }
html[lang="fr"] .home-promo .home-promo-cta[data-lang="fr"], html[lang="en"] .home-promo .home-promo-cta[data-lang="en"], html[lang="es"] .home-promo .home-promo-cta[data-lang="es"] { display: inline-flex; }
.home-promo-text { min-width: 0; }
.home-promo-kicker { display: block; color: var(--wx-gold); font-size: 11.5px; font-weight: 800; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; }
.home-promo-text h2 { margin: 6px 0 10px; font-size: 30px; line-height: 1.15; text-shadow: 0 0 26px rgba(170, 104, 240, 0.35); }
.home-promo-text p { max-width: 64ch; margin: 0; color: var(--wx-text-2); font-size: 15px; line-height: 1.65; }
.home-promo-text .home-promo-until { margin-top: 8px; color: var(--wx-teal); font-size: 13.5px; font-weight: 700; }
.home-promo-cta { white-space: nowrap; }
.home-promo + .home-promo { border-top-color: var(--wx-line); }

/* ---- notes from the developer ---- */
.developer-notes { border-top: 1px solid var(--wx-line-2); background: radial-gradient(50% 60% at 100% 0%, rgba(126, 64, 156, 0.18), rgba(126, 64, 156, 0) 70%), linear-gradient(180deg, #0e1222, #0b0e1b); }
.developer-inner { width: min(1100px, calc(100% - 48px)); margin: auto; padding: 56px 0 72px; }
.developer-heading { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--wx-line-2); }
.developer-kicker { display: block; color: var(--wx-teal); font-size: 11.5px; font-weight: 800; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; }
.developer-heading h2 { margin: 8px 0; font-size: 34px; line-height: 1.2; text-shadow: 0 0 26px rgba(170, 104, 240, 0.3); }
.developer-heading > p { margin: 0; color: var(--wx-muted); font-size: 13.5px; }
.developer-layout { display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 320px); gap: 56px; align-items: start; }
.developer-letter { min-width: 0; color: var(--wx-text-2); font-size: 15.5px; line-height: 1.9; }
.developer-letter p { margin: 0 0 22px; }
.developer-letter p:first-child { color: var(--wx-text); font-size: 17.5px; line-height: 1.8; }
.developer-letter .developer-closing { margin-top: 30px; color: var(--wx-text); }
.developer-letter .developer-signature { margin-bottom: 0; color: var(--wx-violet); font: 700 24px/1.3 var(--wx-display); letter-spacing: 0.08em; text-shadow: 0 0 22px rgba(170, 104, 240, 0.45); }
.developer-media { position: sticky; top: calc(var(--header-height) + 28px); padding: 20px; border: 1px solid var(--wx-line-2); border-radius: var(--wx-radius); background: var(--wx-glass); box-shadow: var(--wx-shadow); }
.developer-media h3 { margin: 0 0 14px; font-size: 15px; line-height: 1.4; }
.developer-trailer { display: block; }
.trailer-image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--wx-line-accent); border-radius: var(--wx-radius-sm); background: #0c0b18; }
.trailer-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.developer-trailer:hover .trailer-image img { transform: scale(1.03); }
.trailer-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 52px; height: 40px; padding-left: 3px; border-radius: 8px; background: #df3630; color: #fff; font-size: 20px; transform: translate(-50%, -50%); box-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.trailer-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; color: var(--wx-violet); font-size: 13px; font-weight: 600; }
.developer-trailer:hover .trailer-caption { color: var(--wx-violet-hi); text-decoration: underline; text-underline-offset: 4px; }

/* ---- footer ---- */
.portal-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 72px; padding: 16px max(24px, calc((100vw - var(--wx-max)) / 2)); border-top: 1px solid var(--wx-line-2); background: linear-gradient(180deg, rgba(12, 11, 26, 0.96), rgba(9, 9, 20, 1)); }
.by-wax { display: inline-flex; align-items: center; gap: 10px; color: var(--wx-text); font: 700 13px var(--wx-display); letter-spacing: 0.06em; }
.by-wax img { width: 47px; height: 32px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(160, 96, 230, 0.35)); }
.portal-footer p { margin: 0; color: var(--wx-muted); font-size: 12px; text-align: center; }
.discord-link { display: inline-flex; align-items: center; gap: 8px; justify-self: end; min-height: 38px; padding: 0 16px; border: 1px solid rgba(140, 150, 255, 0.45); border-radius: 999px; background: rgba(88, 101, 242, 0.14); color: #e8eaff; font-size: 12.5px; font-weight: 700; }
.discord-link:hover { color: #fff; background: rgba(88, 101, 242, 0.3); }
.discord-link img { flex: 0 0 18px; width: 18px; height: 18px; }
.discord-link.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- account dialog (waxdofus.js) ---- */
.account-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(4, 3, 12, 0.76); backdrop-filter: blur(6px); }
.account-dialog { position: fixed; inset: 0; z-index: 1001; width: min(470px, calc(100% - 24px)); max-height: calc(100svh - 24px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid var(--wx-line-accent); border-radius: var(--wx-radius); background: linear-gradient(165deg, #241c3e 0%, #16152a 45%, #101624 100%); color: var(--wx-text); box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6), 0 0 50px rgba(150, 90, 230, 0.22); }
.dialog-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; padding: 0; border: 1px solid var(--wx-line-2); border-radius: 50%; background: rgba(14, 12, 28, 0.8); color: var(--wx-text); font-size: 22px; line-height: 1; cursor: pointer; }
.dialog-close:hover { border-color: var(--wx-line-accent); background: var(--wx-violet-bg); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 60px; margin: 0; padding: 8px 54px 8px 8px; border-bottom: 1px solid var(--wx-line-2); }
.auth-tab { border: 0; border-radius: 10px; background: transparent; color: var(--wx-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-tab:hover { color: var(--wx-text); }
.auth-tab.is-active { background: var(--wx-violet-bg); color: var(--wx-violet-hi); box-shadow: inset 0 0 0 1px rgba(201, 155, 255, 0.35); }
.tab-panel, .signed-in { padding: 28px 30px 22px; }
.panel-heading { margin-bottom: 22px; }
.panel-heading h2, .signed-in h2 { margin: 0 0 6px; font-size: 25px; line-height: 1.2; }
.panel-heading p, .signed-copy { margin: 0; color: var(--wx-muted); font-size: 13.5px; }
.signed-copy strong { color: var(--wx-text); }
.account-form, .verification-form { display: grid; gap: 14px; }
.account-form label { display: grid; gap: 7px; }
.account-form label > span { color: var(--wx-text-2); font-size: 12.5px; font-weight: 700; }
.account-form small { color: var(--wx-muted); font-size: 11.5px; line-height: 1.45; }
.account-form button:not(.form-submit) { min-height: 40px; border: 1px solid var(--wx-line-3); border-radius: 10px; background: transparent; color: var(--wx-text-2); font-weight: 600; cursor: pointer; }
.account-form button:not(.form-submit):hover { border-color: var(--wx-teal-line); color: var(--wx-text); }
#registration-captcha { min-height: 78px; }
.form-submit { width: 100%; margin-top: 2px; }
.form-link { justify-self: center; font-size: 13px; font-weight: 700; }
.form-message { margin: 0; padding: 10px 12px; border-radius: var(--wx-radius-sm); font-size: 12.5px; }
.registration-safety { border-left: 3px solid var(--wx-gold); background: var(--wx-gold-bg); color: #f6e2b4; line-height: 1.5; }
.form-message.is-error { border: 1px solid rgba(242, 162, 166, 0.45); background: var(--wx-bad-bg); color: #ffd3d5; }
.security-note { margin: 0; padding: 14px 30px 17px; border-top: 1px solid var(--wx-line-2); color: var(--wx-muted); font-size: 11.5px; text-align: center; }
.dialog-kicker { margin: 0 0 7px; color: var(--wx-teal); font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.character-list { display: grid; gap: 8px; margin: 20px 0; }
.character-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 13px; border: 1px solid var(--wx-line-2); border-radius: var(--wx-radius-sm); background: var(--wx-sunken); }
.character-row strong { font-size: 13.5px; }
.character-row span { color: var(--wx-muted); font-size: 12.5px; }
.empty-characters { color: var(--wx-muted); font-size: 13.5px; }
.signed-actions { display: grid; gap: 9px; }

/* ---- smaller screens ---- */
@media (max-width: 900px) {
  .developer-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 30px; }
  .home-promo-inner { grid-template-columns: auto minmax(0, 1fr); gap: 24px; }
  .home-promo-cta { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 650px) {
  .home-main .portal-main { height: auto; min-height: 0; }
  .home-main .portal-hero { width: calc(100% - 32px); padding: 22px 0 24px; }
  .home-main .portal-logo { width: min(330px, 90%); max-height: 135px; }
  .home-main .portal-hero > p { max-width: 34ch; font-size: 14px; line-height: 1.5; }
  .home-main .portal-ctas { gap: 10px; margin-top: 16px; }
  .home-main .portal-button { width: min(320px, 100%); min-height: 44px; font-size: 13.5px; }
  .developer-jump { margin-top: 18px; font-size: 12px; }
  .home-promo-inner { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; width: calc(100% - 36px); padding: 28px 0; text-align: center; }
  .home-promo-art { width: 96px; height: 96px; }
  .home-promo-text h2 { font-size: 24px; }
  .home-promo-text p { max-width: 38ch; font-size: 14px; }
  .home-promo-cta { grid-column: auto; justify-self: center; width: min(320px, 100%); }
  .developer-inner { width: calc(100% - 32px); padding: 38px 0 48px; }
  .developer-heading { margin-bottom: 24px; padding-bottom: 20px; }
  .developer-heading h2 { font-size: 27px; }
  .developer-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .developer-letter { font-size: 15px; line-height: 1.8; }
  .developer-letter p:first-child { font-size: 16.5px; }
  .developer-media { position: static; padding: 16px; }
  .developer-media h3 { font-size: 17px; }
  .portal-footer { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 16px; }
  .portal-footer > p { grid-row: 2; grid-column: 1 / -1; text-align: left; font-size: 11.5px; }
  .tab-panel, .signed-in { padding: 25px 20px 20px; }
  .security-note { padding-inline: 20px; }
}
@media (max-height: 700px) and (min-width: 651px) {
  .home-main .portal-main { height: 56svh; min-height: 330px; }
  .home-main .portal-logo { max-height: 140px; }
  .home-main .portal-hero > p { font-size: 16px; }
  .home-main .portal-ctas { margin-top: 12px; }
  .developer-jump { margin-top: 12px; }
}
@media (max-height: 700px) and (max-width: 650px) {
  .home-main .portal-hero { padding: 12px 0 16px; }
  .home-main .portal-logo { max-height: 95px; }
  .home-main .portal-online { min-height: 0; padding: 6px 10px; }
  .home-main .portal-ctas { margin-top: 12px; }
  .developer-jump { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .trailer-image img { transition: none; }
  .developer-trailer:hover .trailer-image img { transform: none; }
}
