/* ---------- tokens ---------- */
:root {
  --ink: #131F30;
  --ink-2: #1A2C42;
  --parchment: #EFE7D3;
  --parchment-2: #F7F2E5;
  --fairway: #3A5A44;
  --brass: #BB9760;
  --brass-light: #DCC28F;
  --text-warm: #F1ECDD;
  --text-muted: #8FA3B2;
  --flag: #B2452F;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, sans-serif;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  max-width: 100%;
}

/* The hidden attribute must always win over any element's own display
   rule. Without this, any class that sets display:flex/grid on the same
   element as [hidden] will silently override the browser's built-in
   hide-this-element behavior — exactly the bug that made the live
   scorecard panel show through before JS ever touched it. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text-warm);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; }

/* ---------- shared type bits ---------- */

.wordmark {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.wordmark.small { font-size: 17px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-warm);
  background: transparent;
  border: 1px solid var(--brass);
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover {
  background: rgba(220, 194, 143, 0.08);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 2px;
}

.btn-danger-sm {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 8px 14px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--flag);
  background: transparent;
  border: 1px solid var(--flag);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-danger-sm:hover {
  background: rgba(178, 69, 47, 0.08);
}

.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid rgba(220, 194, 143, 0.18);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

/* ---------- login ---------- */

.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 64px 28px 56px;
  text-align: center;
}

.login-eyebrow {
  color: var(--flag);
  margin-bottom: 18px;
}

.login-heading {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 7vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  color: var(--text-warm);
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--parchment-2);
  border: 1px solid var(--brass);
  border-radius: 3px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.google-btn:hover { background: var(--brass-light); transform: translateY(-1px); }
.google-btn:focus-visible { outline: 2px solid var(--text-warm); outline-offset: 3px; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--text-muted);
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(220, 194, 143, 0.2);
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.email-label {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.email-input {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--text-warm);
  background: rgba(220, 194, 143, 0.06);
  border: 1px solid rgba(220, 194, 143, 0.28);
  border-radius: 3px;
  padding: 13px 14px;
}

.email-input::placeholder { color: var(--text-muted); }

.email-input:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 1px;
}

.email-btn {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--brass-light);
  border: none;
  border-radius: 3px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.email-btn:hover:not(:disabled) { background: var(--parchment-2); transform: translateY(-1px); }
.email-btn:disabled { opacity: 0.6; cursor: default; }
.email-btn:focus-visible { outline: 2px solid var(--text-warm); outline-offset: 3px; }

.login-status {
  min-height: 20px;
  margin: 16px 0 0;
  font-family: var(--body);
  font-size: 13px;
  color: var(--text-muted);
}

.sign-out-btn {
  margin-top: 12px;
  color: var(--text-muted);
  border-color: rgba(220, 194, 143, 0.28);
}

.login-fine {
  margin: 32px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- scorecard strip (signature element) ---------- */

.scorecard-strip {
  margin-top: auto;
  background: var(--parchment);
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  overflow: hidden;
}

.strip-track {
  display: flex;
  width: max-content;
}

.hole-box {
  flex: 0 0 auto;
  width: 68px;
  padding: 14px 0;
  text-align: center;
  border-right: 1px dashed rgba(58, 90, 68, 0.35);
  font-family: var(--body);
  color: var(--ink);
}

.hole-box .n {
  display: block;
  font-size: 11px;
  color: var(--fairway);
  letter-spacing: 0.08em;
}

.hole-box .p {
  display: block;
  font-size: 20px;
  font-weight: 500;
  margin-top: 4px;
}

.hole-box.out { background: rgba(58, 90, 68, 0.06); }

@media (prefers-reduced-motion: no-preference) {
  .strip-track { animation: scroll-strip 38s linear infinite; }
}

@keyframes scroll-strip {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid rgba(220, 194, 143, 0.18);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-course {
  font-family: var(--body);
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.footer-status {
  font-family: var(--body);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .login-card { padding: 48px 20px 40px; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}
