/* M Club Perth – light "Paddock" theme */
:root {
  --ink: #141B2D;
  --text: #46506A;
  --muted: #5A6378;
  --line: #E4E7EE;
  --soft: #F5F7FA;
  --tint: #EEF4FB;
  --white: #FFFFFF;
  --red: #E7222E;
  --red-dark: #C41A25;
  --blue: #16588E;
  --sky: #81C4FF;
  --green: #1F8A4C;
  --radius: 16px;
  --radius-lg: 20px;
  --head: 'Archivo', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #0B2E4F; text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.1; margin: 0; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(40px, 6vw, 76px); letter-spacing: -1.5px; }
h2 { font-weight: 800; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.8px; }
h3 { font-weight: 700; font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; font-family: var(--body); line-height: 1.2; text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #26304A; color: #fff; }
.btn-ghost { border-color: #C9CFDA; color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--tint); color: var(--ink); }
.btn-danger { background: transparent; border-color: #F0B3B7; color: var(--red-dark); }
.btn-danger:hover { background: #FDECEE; color: var(--red-dark); }
.btn-block { width: 100%; }
.link-arrow { font-weight: 600; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; }
.brand img { height: 54px; width: auto; }
.nav-panel { display: flex; align-items: center; gap: 28px; }
.main-nav { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--ink); }
.header-actions { display: flex; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav-panel { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 16px 24px 24px; gap: 16px; box-shadow: 0 12px 24px rgba(20,27,45,.08); }
  .nav-panel.open { display: flex; }
  .main-nav { flex-direction: column; gap: 0; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-actions .btn { flex: 1; }
}

/* Flash messages */
.flashes { padding-top: 20px; }
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 10px; font-weight: 500; }
.flash-success { background: #E8F6EE; color: #145C33; }
.flash-error { background: #FDECEE; color: #9B1520; }
.flash-info { background: var(--tint); color: #0E3F67; }

/* Sections */
.section { padding: 96px 0 0; }
.section-soft { background: var(--soft); padding: 88px 0; margin-top: 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--blue); background: var(--tint); padding: 8px 14px; border-radius: 999px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.lead { font-size: 18px; color: var(--text); line-height: 1.65; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.stripes { display: flex; height: 4px; }
.stripes span { flex: 1; }
.stripes span:nth-child(1) { background: var(--sky); }
.stripes span:nth-child(2) { background: var(--blue); }
.stripes span:nth-child(3) { background: var(--red); }
.bar { width: 40px; height: 4px; margin-bottom: 18px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 64px; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.hero-copy h1 { margin: 22px 0 0; }
.hero-copy .lead { margin: 22px 0 0; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-photo { flex: 1 1 540px; min-width: 0; height: 560px; border-radius: var(--radius-lg); object-fit: cover; object-position: 50% 60%; }
@media (max-width: 700px) { .hero { padding-top: 36px; gap: 32px; } .hero-photo { height: 340px; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.stat { background: var(--soft); border-radius: var(--radius); padding: 24px; }
.stat b { display: block; font-family: var(--head); font-weight: 800; font-size: 40px; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--text); }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.card-body { padding: 28px; }
.card-body p:last-child { margin-bottom: 0; }
.card-photo { width: 100%; height: 220px; object-fit: cover; }
.card-soft { background: var(--soft); border: 0; }
.card p { color: var(--text); font-size: 15px; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius-lg); width: 100%; height: 480px; object-fit: cover; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split img { height: 320px; } }

/* Events */
.event-list { display: grid; gap: 14px; }
.event { display: flex; gap: 22px; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.event-date { flex: 0 0 72px; text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 6px; font-family: var(--head); }
.event-date b { display: block; font-size: 28px; line-height: 1; }
.event-date span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.event h3 { font-size: 20px; margin-bottom: 4px; }
.event .meta { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.event p { color: var(--text); font-size: 15px; margin: 0; }

/* Sponsors wall */
.logo-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.logo-wall a, .logo-wall div { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; height: 110px; padding: 18px; }
.sponsor-logo { max-height: 70px; max-width: 100%; width: auto; object-fit: contain; }
.sponsor-logo-text { font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--ink); text-align: center; line-height: 1.2; }
@media (max-width: 1000px) { .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-family: var(--head); font-weight: 700; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 26px; font-weight: 400; color: var(--blue); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--text); margin: 0 0 18px; max-width: 760px; }

/* Banner CTA */
.cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; padding: 48px; border-radius: 24px; background: var(--ink); color: #fff; }
.cta h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); }
.cta p { color: #B8C0D0; margin: 10px 0 0; }
@media (max-width: 600px) { .cta { padding: 32px 24px; } }

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #C9CFDA; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,88,142,.15); }
textarea { min-height: 130px; resize: vertical; }
input[type=file] { font-size: 14px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { margin-top: 4px; width: 18px; height: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card { max-width: 560px; margin: 56px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; }
.form-card.wide { max-width: 760px; }
.form-card h1 { font-size: 36px; margin-bottom: 8px; }
.form-card .lead { font-size: 16px; margin-bottom: 24px; }
@media (max-width: 600px) { .form-card { padding: 24px; margin-top: 28px; border: 0; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Members area / admin layout */
.app { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 40px; padding-bottom: 40px; align-items: flex-start; }
.side-nav { flex: 0 0 230px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 100px; }
.side-nav a { padding: 11px 14px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 15px; }
.side-nav a:hover { background: var(--soft); text-decoration: none; }
.side-nav a.active { background: var(--ink); color: #fff; }
.app-main { flex: 999 1 560px; min-width: 0; }
.app-main > h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 8px; }
.app-main > .lead { margin-bottom: 28px; }
@media (max-width: 860px) {
  .side-nav { flex: 1 1 100%; flex-direction: row; overflow-x: auto; position: static; gap: 6px; padding-bottom: 6px; }
  .side-nav a { white-space: nowrap; background: var(--soft); }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.panel h2 { font-size: 22px; margin-bottom: 14px; }
.panel-dark { background: var(--ink); color: #fff; border: 0; }
.panel-dark h2, .panel-dark h3 { color: #fff; }
.stack { display: grid; gap: 20px; }

/* Member card */
.member-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 18px; max-width: 420px; position: relative; overflow: hidden; }
.member-card .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.member-card .top img { height: 42px; width: auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .3px; }
.pill-green { background: #2FA65A; color: #fff; }
.pill-amber { background: #F2B53A; color: #1E1500; }
.pill-grey { background: #D9DDE5; color: #2A3247; }
.pill-red { background: #FADADD; color: #9B1520; }
.pill-blue { background: var(--tint); color: var(--blue); }
.qr-box { align-self: center; background: #fff; border-radius: 16px; padding: 14px; width: 236px; height: 236px; display: flex; align-items: center; justify-content: center; }
.qr-box img, .qr-box svg { width: 100%; height: 100%; }
.member-card .name { font-family: var(--head); font-weight: 700; font-size: 22px; }
.member-card .sub { color: #B8C0D0; font-size: 14px; }
.live-clock { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #B8C0D0; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #2FA65A; box-shadow: 0 0 0 0 rgba(47,166,90,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,166,90,.7); } 70% { box-shadow: 0 0 0 10px rgba(47,166,90,0); } 100% { box-shadow: 0 0 0 0 rgba(47,166,90,0); } }
.card-stripes { position: absolute; top: 0; left: 0; right: 0; }

/* Discount cards */
.deal { display: flex; flex-direction: column; gap: 12px; }
.deal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.deal-logo { height: 56px; display: flex; align-items: center; }
.deal-logo .sponsor-logo { max-height: 56px; max-width: 160px; }
.deal-offer { font-family: var(--head); font-weight: 800; font-size: 26px; color: var(--red); line-height: 1.1; }
.deal-how { background: var(--tint); color: #0E3F67; border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.code { font-family: ui-monospace, Menlo, monospace; background: #fff; border: 1px dashed var(--blue); padding: 2px 8px; border-radius: 6px; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar input[type=search] { max-width: 320px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; }

/* Verify page */
.verify { max-width: 460px; margin: 40px auto; text-align: center; border-radius: 24px; padding: 36px 28px; }
.verify.ok { background: #E8F6EE; border: 2px solid #2FA65A; }
.verify.bad { background: #FDECEE; border: 2px solid var(--red); }
.verify .icon { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.verify.ok .icon { background: #2FA65A; }
.verify.bad .icon { background: var(--red); }
.verify h1 { font-size: 30px; margin-bottom: 14px; }
.verify dl { text-align: left; background: #fff; border-radius: 14px; padding: 16px 20px; margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.verify dt { color: var(--muted); font-size: 14px; }
.verify dd { margin: 0; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 110px; border-top: 1px solid var(--line); padding: 48px 0 32px; background: #fff; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand img { height: 50px; width: auto; margin-bottom: 10px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 280px; }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-links a, .footer-social a { color: var(--ink); }
.footer-base { margin-top: 32px; font-size: 13px; color: var(--muted); }

/* Print the membership card cleanly */
@media print { .site-header, .site-footer, .side-nav, .no-print { display: none !important; } }
