/* Bayside Singers Member Portal — design tokens and base styles
   Spec section 9: accessibility, branding. Base font 20px, never below 18px.
   Touch targets >= 48px. Full-width primary buttons on phones. */

@font-face {
  font-family: "Baloo 2";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/baloo2-extrabold.woff2") format("woff2");
}

@font-face {
  font-family: "Carlito";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/carlito-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Carlito";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/carlito-bold.woff2") format("woff2");
}

:root {
  /* Brand colors — spec 9.2 */
  --color-navy: #171c26;
  --color-white: #ffffff;
  --color-medium-blue: #537fa6;
  --color-sky-blue: #6ca6d9;
  --color-teal: #1c8c8c;
  --color-coral: #f25538;
  --color-blush: #efaf9e;

  --color-bg: var(--color-white);
  --color-text: var(--color-navy);
  --color-border: #d9dee5;
  --color-focus: var(--color-teal);

  --font-heading: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Carlito", "Segoe UI", system-ui, sans-serif;

  --font-size-base: 20px;
  --font-size-small: 18px; /* never below this, per spec 9.1 */
  --font-size-large: 24px;
  --font-size-h1: 34px;
  --font-size-h2: 28px;
  --font-size-h3: 22px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;

  --touch-target-min: 48px;
  --radius: 12px;
  --radius-large: 16px;

  --max-content-width: 640px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--color-medium-blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Layout shell */

.page {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 var(--space-3) var(--space-6);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-navy);
  color: var(--color-white);
}

.app-header a {
  color: var(--color-white);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--font-size-large);
  text-decoration: none;
}

.app-header__logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-small);
}

.app-header__actions a {
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-primary:hover { background: #0f1420; }

.btn-secondary {
  background: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-accent {
  background: var(--color-coral);
  color: var(--color-white);
}

.btn-full {
  display: flex;
  width: 100%;
}

.btn-large {
  min-height: 64px;
  font-size: var(--font-size-large);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */

label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: var(--touch-target-min);
  padding: var(--space-2);
  font-size: 1rem;
  font-family: var(--font-body);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
}

.field {
  margin-bottom: var(--space-4);
}

.field-hint {
  font-size: var(--font-size-small);
  color: #4b5563;
  margin-top: var(--space-1);
}

/* Cards and sections */

.card {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.card-decorative {
  background: var(--color-sky-blue);
  color: var(--color-navy);
  border: none;
}

.section-title {
  margin-top: var(--space-5);
}

/* Navigation tiles (Home page) */

.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 104px;
  padding: var(--space-3);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-large);
  text-decoration: none;
  color: var(--color-navy);
  font-weight: 700;
  font-size: var(--font-size-large);
  text-align: center;
}

.tile:hover {
  border-color: var(--color-medium-blue);
}

.tile-icon {
  font-size: 32px;
}

/* Status badges */

.badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: 999px;
  font-size: var(--font-size-small);
  font-weight: 700;
}

.badge-coral {
  background: var(--color-coral);
  color: var(--color-white);
}

.badge-teal {
  background: var(--color-teal);
  color: var(--color-white);
}

.badge-neutral {
  background: var(--color-border);
  color: var(--color-navy);
}

/* Lists */

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.list-row:last-child {
  border-bottom: none;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-sky-blue);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Utility */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.text-small {
  font-size: var(--font-size-small);
}

.text-muted {
  color: #4b5563;
}

.center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .app-header {
    padding: var(--space-3) var(--space-4);
  }
}
