* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; color: #770000; background: #faf8f7;
  font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100svh; height: 100svh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 5; padding: 1rem; background: white; color: #770000; }
.skip-link:focus { top: 1rem; }
.portal-header { height: clamp(76px, 11svh, 112px); background: white; position: relative; z-index: 2; }
.header-content { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2vw, 30px); height: 100%; margin: auto; padding: 4px 16px; }
.club-name, .portal-name { font-size: clamp(20px, 2.4vw, 32px); font-weight: 750; line-height: 1.1; }
.club-name { padding-right: clamp(16px, 2vw, 30px); border-right: 2px solid #770000; letter-spacing: .025em; }
.portal-name { padding-left: clamp(16px, 2vw, 30px); border-left: 2px solid #770000; }
.club-logo { display: block; width: auto; height: 100%; max-height: 130px; object-fit: contain; }
main { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; position: relative; }
.hero { min-height: 0; background: #300307 url('/images/portal-stadium-v126.png') center 53% / cover no-repeat; position: relative; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 78%, #faf8f7 100%); pointer-events: none; }
.hero-copy { max-width: 1290px; margin: auto; padding: clamp(24px, 7svh, 86px) 38px 0; position: relative; z-index: 1; color: white; }
.hero h1 { font-size: clamp(48px, 9svh, 100px); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 16px; font-weight: 800; }
.hero-copy p { font-size: clamp(18px, 2.8svh, 30px); margin: 0; line-height: 1.4; text-wrap: balance; }
.app-links { width: 100%; max-width: 1230px; padding: 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: -35px auto 0; position: relative; z-index: 1; }
.app-card { color: #770000; background: white; text-decoration: none; padding: clamp(16px, 2.3svh, 26px); border: 1px solid #7700000a; border-radius: 24px; box-shadow: 0 12px 26px #420d031c; text-align: center; display: flex; flex-direction: column; align-items: center; transition: transform .18s, box-shadow .18s; }
.app-card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px #420d0329; }
.app-card:focus-visible { outline: 3px solid #770000; outline-offset: 3px; }
.app-card svg { height: clamp(40px, 6svh, 66px); width: clamp(40px, 6svh, 66px); margin-bottom: 8px; flex-shrink: 0; }
.app-card h2 { font-size: clamp(23px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.035em; margin: 4px 0 7px; }
.app-card p { color: #3f3838; font-size: clamp(16px, 1.65vw, 22px); margin: 0 0 18px; line-height: 1.35; }
.open-app { display: flex; align-items: center; justify-content: center; gap: 18px; align-self: stretch; min-height: 48px; padding: 9px 12px; border-radius: 12px; font-size: 20px; font-weight: 700; color: white; background: #770000; margin-top: auto; }
.open-app .open-arrow { font-size: 26px; font-weight: 400; }
.open-app .open-label { font: inherit; }
.open-app .open-mobile { display: none; }
.portal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 20px; width: 100%; max-width: 1460px; margin: auto; min-height: 44px; padding: 6px 26px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.portal-footer small { font-size: 14px; color: #6b5353; }
.creator { width: 108px; height: 46px; object-fit: contain; display: block; }
@media (max-width: 700px) {
  body {
    height: var(--portal-height, 100dvh);
    min-height: var(--portal-height, 100dvh);
    grid-template-rows: auto minmax(0, 1fr) calc(44px + env(safe-area-inset-bottom, 0px));
  }
  body > .portal-footer {
    height: 100%; min-height: 0; margin: 0 auto;
    padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px));
  }
  .portal-header { height: 76px; }
  .header-content { gap: 10px; padding: 5px 12px; }
  .club-name, .portal-name { font-size: 16px; }
  .club-name { padding-right: 12px; }
  .portal-name { padding-left: 12px; }
  .club-logo { height: auto; width: 116px; max-height: 66px; }
  .hero { background-position: 64% center; }
  .hero-copy { padding: clamp(18px, 4svh, 38px) 22px 0; }
  .hero h1 { font-size: clamp(32px, 6.1svh, 49px); margin-bottom: 10px; text-shadow: 0 2px 12px #28000050; }
  .hero-copy p { font-size: 16px; max-width: 290px; text-shadow: 0 1px 6px #280000; }
  .app-links { grid-template-columns: 1fr; gap: 9px; margin-top: -15px; padding: 0 16px; }
  .app-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) 95px; grid-template-rows: auto auto; column-gap: 12px; text-align: left; min-height: 82px; padding: 13px 14px; border-radius: 17px; }
  .app-card svg { grid-column: 1; grid-row: 1 / 3; width: 34px; height: 34px; margin: 0; }
  .app-card h2 { grid-column: 2; grid-row: 1; align-self: end; font-size: 21px; margin: 0 0 4px; }
  .app-card p { grid-column: 2; grid-row: 2; align-self: start; font-size: 14px; margin: 0; line-height: 1.3; }
  .open-app { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; min-height: 46px; font-size: 15px; line-height: 1.2; text-align: center; padding: 8px; gap: 0; border-radius: 10px; }
  .open-app .open-arrow { display: none; }
  .open-app .open-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .open-app .open-mobile { display: block; font: inherit; }
  .portal-footer { justify-content: center; padding: 3px 18px; padding-bottom: max(3px, env(safe-area-inset-bottom)); min-height: 38px; }
  .portal-footer small { font-size: 12px; }
  .creator { width: 92px; height: 38px; }
}
@media (max-width: 370px) {
  .portal-header { height: 67px; }
  .header-content { gap: 8px; padding-inline: 8px; }
  .club-logo { width: 100px; }
  .club-name, .portal-name { font-size: 14px; }
  .club-name { padding-right: 9px; }
  .portal-name { padding-left: 9px; }
  .hero-copy { padding-inline: 18px; }
  .hero-copy p { max-width: 230px; }
  .app-links { padding-inline: 12px; gap: 8px; }
  .app-card { grid-template-columns: 29px minmax(0, 1fr) 84px; gap: 0 9px; padding: 12px; }
  .app-card svg { width: 29px; height: 29px; }
  .app-card h2 { font-size: 19px; }
  .open-app { font-size: 14px; }
}
@media (max-height: 600px) and (min-width: 701px), (max-height: 500px) and (orientation: landscape) {
  .portal-header { height: 60px; }
  .club-logo { height: 48px; width: auto; max-height: 48px; }
  .hero-copy { padding-top: 16px; }
  .hero h1 { font-size: 34px; margin-bottom: 6px; }
  .hero-copy p { font-size: 16px; }
  .app-links { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -12px; gap: 12px; }
  .app-card { display: flex; padding: 10px; min-height: 0; border-radius: 16px; }
  .app-card svg { width: 28px; height: 28px; margin: 0 0 4px; }
  .app-card h2 { font-size: 19px; margin: 0 0 8px; align-self: center; }
  .app-card p { display: none; }
  .open-app { align-self: stretch; font-size: 15px; min-height: 40px; margin-top: auto; }
  .open-app .open-arrow { display: none; }
  .open-app .open-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .open-app .open-mobile { display: block; font: inherit; }
  .portal-footer { min-height: 32px; padding-block: 0; }
  .creator { height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .app-card { transition: none; } .app-card:hover { transform: none; } }

.club-inline, .club-name { white-space: nowrap; }

.creator-button { display: block; flex: none; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.creator-button:focus-visible { outline: 3px solid #770000; outline-offset: 3px; }
#aboutDialog { width: min(92vw, 420px); max-height: calc(100dvh - 24px); max-height: calc(var(--visible-height, 100dvh) - 24px); overflow: auto; box-sizing: border-box; margin: auto; padding: 20px; border: 1px solid #e8ded7; border-radius: 20px; background: #fff; color: #770000; box-shadow: 0 16px 50px #0003; }
#aboutDialog::backdrop { background: #0008; }
.about-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.about-heading h2 { margin: 0; font-size: 21px; }
#closeAbout { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: #f3e8e2; color: #770000; font-size: 20px; cursor: pointer; }
.creator-about { text-align: center; }
.creator-about img { display: block; width: 200px; max-width: 100%; height: auto; margin: 16px auto; }
.creator-about h3 { font-size: 20px; }
.creator-about p { line-height: 1.6; color: #3f3838; }
