/* robbieoverson.com – see docs/SITE-GUIDE.md for the rules behind these values. */

:root {
  --bg: #333366;
  --text: #ffffff;
  --muted: #cccccc;
  --accent: #8486A5;        /* decoration only: underlines, borders, selection */
  --accent-text: #a3a5c0;   /* tint of --accent for small text: 4.8:1 on --bg */
  --divider: #cccccc22;
  --row-hover: #ffffff0d;

  /* System fonts: San Francisco (Apple), Segoe UI (Windows), Roboto (Android).
     Nothing to download, nothing sent to third parties. */
  --font-system: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-system);
  --font-body: var(--font-system);

  --pad-x: clamp(20px, 6vw, 64px);
  --section-gap: clamp(56px, 9vw, 100px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, text-decoration-color 0.25s ease;
}
a:hover { color: var(--muted); }

a:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

::selection { background: var(--accent); color: var(--text); }

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

.skip-link {
  position: absolute;
  left: 8px; top: 8px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--bg); }

.wrap { width: 100%; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* Hero */
.hero {
  position: relative;
  width: 100%;
  height: 260px;
  min-height: 200px;
  overflow: hidden;
}
.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(51,51,102,0.55) 0%,
    rgba(51,51,102,0.22) 12%,
    rgba(51,51,102,0) 26%,
    rgba(51,51,102,0) 55%,
    rgba(51,51,102,0.55) 78%,
    var(--bg) 100%);
}
.hero-text {
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: clamp(24px, 5vw, 56px) var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  animation: fadeIn 1.2s 0.4s ease both;
}
.hero-text p {
  margin: 0;
  min-width: 0;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(30,30,60,0.75);
}
.tagline { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; }
.credit { font-size: 11px; letter-spacing: 0.03em; text-align: right; }
.credit a { text-decoration: underline; text-decoration-color: var(--accent); }

/* Name */
.name {
  position: relative;
  z-index: 1;
  margin: -18px 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(30px, 7.6vw, 92px);
  letter-spacing: -0.015em;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: break-word;
  animation: riseIn 0.9s var(--ease-out) both;
}
.name span { font-weight: 700; }

/* Nav */
.nav {
  margin-top: clamp(20px, 3vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(18px, 4vw, 36px);
  animation: riseIn 0.9s 0.15s var(--ease-out) both;
}
.nav a {
  display: inline-block;
  padding: 6px 0;            /* 24px+ tap target height */
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Content */
.content {
  max-width: 1100px;
  padding-top: clamp(28px, 4vw, 40px);
  padding-bottom: var(--section-gap);
}
section + section { margin-top: var(--section-gap); }
section { scroll-margin-top: 16px; }

h2 {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.01em;
}

.about {
  margin: 0;
  max-width: 680px;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.6;
  font-weight: 300;
}
.about a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }

/* Gig list */
.gigs { list-style: none; margin: 0; padding: 0; }
.gigs a {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 16px;
  row-gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--divider);
}
.gigs a:hover { background: var(--row-hover); color: var(--text); }
.gig-when {
  grid-column: 1; grid-row: 1;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--accent-text);
  white-space: nowrap;
}
.gig-event { grid-column: 2; grid-row: 1; font-size: 16px; font-weight: 600; }
.gig-where { grid-column: 2; grid-row: 2; font-size: 14px; color: var(--muted); }

.empty { margin: 0; font-size: 16px; color: var(--muted); }

/* Contact form */
.contact-form { max-width: 560px; }
.hp { display: none; }

.field { margin: 0 0 20px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;               /* 16px stops iOS zooming on focus */
  color: var(--text);
  background: #ffffff0d;
  border: 1px solid var(--accent); /* 3.3:1 – meets 3:1 for input borders */
  border-radius: 2px;
}
/* Selected text inside fields: white highlight – the page's purple selection
   is too close to the field background to see. */
.field input::selection,
.field textarea::selection { background: var(--text); color: var(--bg); }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-color: var(--text);
}
.field [aria-invalid="true"] { border: 2px solid var(--text); }

.field-error {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--text);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.privacy { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.contact-form button {
  display: inline-block;
  min-height: 44px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  border: 2px solid var(--text);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.contact-form button:hover { background: transparent; color: var(--text); }
.contact-form button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.contact-form button:disabled { opacity: 0.7; cursor: wait; }

.form-status { margin: 16px 0 0; font-size: 16px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status:focus { outline: none; }

/* Thank-you page (no-JavaScript fallback) */
.thanks { padding-top: var(--section-gap); padding-bottom: var(--section-gap); max-width: 1100px; }
.thanks .name { margin: 0 0 clamp(32px, 5vw, 56px); }
.thanks p { font-size: clamp(18px, 2.2vw, 22px); font-weight: 300; line-height: 1.6; max-width: 680px; }
.thanks a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }

/* Wide screens */
@media (min-width: 720px) {
  .hero { height: 78vh; min-height: 460px; }
  .hero img { object-position: 60% 45%; }
  .name { margin-top: clamp(-64px, -8vw, -40px); }
}

/* Very narrow screens: stack the gig date above the event */
@media (max-width: 400px) {
  .gigs a { grid-template-columns: 1fr; }
  .gig-when, .gig-event, .gig-where { grid-column: 1; grid-row: auto; }
}

@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
