/*
  home.css: the look of the home page.

  This is the site's original look from Stage 1. On 15 Nov 2026 the owner
  chose to keep it for the home page. The booking page and every other page
  use site.css instead. The two files never load on the same page, so the
  same names (.status, .note, .wrap) can look different in each.

  The colors and feel come from the Smash Pickleball logo: deep violet,
  lavender, wide italic capitals, and small four-point sparkles.
  Sizes are written for a phone first, then widened for bigger screens.

  Spacing is written the long way (padding-top, margin-left) on purpose,
  and rows laid out with flex are spaced with margins, not "gap". Older
  iPhones skip the shorter modern spellings and flex "gap", which would
  leave the page cramped and off-centre there.
*/

/* ---------- 1. Colors and other shared values ---------- */

:root {
  --ink-950: #0d0717;
  --ink-900: #140a24;
  --ink-800: #1d1035;
  --ink-700: #2a1750;
  --violet-700: #4a2494;
  --violet-600: #5b2fb0;
  --violet-500: #7444d6;
  --lilac-400: #a98bea;
  --lilac-300: #c4b0f4;
  --lilac-200: #ddd0fa;
  --lilac-100: #efe8fd;
  --paper: #faf8ff;
  --white: #ffffff;

  --text: #1c1330;
  --text-soft: #554a6e;
  --line: #e2d9f6;
  --open: #37d39a;
  --closed: #b9aed0;
  --practice: #ffc53d;

  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 10px 30px rgba(20, 10, 36, 0.1);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Basics ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--violet-600);
}

a:hover {
  color: var(--violet-700);
}

svg {
  display: block;
  max-width: 100%;
}

/* A clear outline for people who move around with the keyboard: dark violet
   on the light parts of the page, lavender on the dark parts. */
:focus-visible {
  outline: 3px solid var(--violet-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--lilac-300);
}

/* The space either side is 1rem, but never more than 5% of the screen each
   side, so very large text on a small phone doesn't eat the room in between. */
.wrap {
  width: calc(100% - 2rem);
  width: calc(100% - min(2rem, 10vw));
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}

/* Hidden above the page, then moved up by its own full height as well, so
   however tall large text makes it, none of it shows until a keyboard user
   reaches it. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  transform: translateY(-100%);
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-small);
  background: var(--white);
  color: var(--ink-900);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
  transform: none;
}

/* ---------- 3. Small shared pieces ---------- */

/* The little spaced-out label above a heading, like "PICKLEBALL" in the logo. */
.eyebrow {
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--violet-600);
}

.eyebrow--on-dark {
  display: flex;
  align-items: center;
  color: var(--lilac-300);
}

/* The thin rule beside the label, as in the logo. */
.eyebrow--on-dark::after {
  content: "";
  width: 3rem;
  height: 1px;
  margin-left: 0.75rem;
  background: currentColor;
  opacity: 0.6;
}

.note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--violet-600);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--violet-700);
  color: var(--white);
  transform: translateY(-1px);
}

.button--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  background: var(--lilac-300);
  color: var(--ink-900);
}

.button--small:hover {
  background: var(--lilac-200);
  color: var(--ink-900);
}

/* ---------- 4. Practice banner ---------- */

.practice-banner {
  padding: 0.5rem 1rem;
  background: repeating-linear-gradient(-45deg, var(--practice) 0 16px, #ffb300 16px 32px);
  color: #1c1330;
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- 5. Header ---------- */

.site-header {
  background: var(--ink-900);
  color: var(--white);
}

/* The row may wrap onto two lines, so very small phones and people who use
   large text never get a page that scrolls sideways. Each item's top margin
   keeps the two lines apart when it wraps. The top padding is smaller by the
   same amount, so a single line sits exactly where it always did. */
.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.35rem;
  padding-bottom: 0.85rem;
}

.site-header__row > * {
  margin-top: 0.5rem;
}

/* The right margin keeps the name and the buttons a little apart. */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  margin-right: 1rem;
  line-height: 1;
  text-decoration: none;
}

.wordmark__top {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lilac-300);
}

.wordmark__bottom {
  margin-top: 0.3rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--lilac-300);
}

/* The owner's own logo, once uploaded, in place of the name in letters. It
   keeps its shape and never grows past the header's height, or past part of
   a narrow screen when the visitor uses very large text. */
.wordmark--logo {
  justify-content: center;
  min-height: 2.75rem;
}

.wordmark__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 7rem;
  max-width: min(7rem, 35vw);
  max-height: 2.75rem;
  max-height: min(2.75rem, 14vw);
}

/* With very large text the Book button moves under My booking, at the
   right, instead of running past the edge of the screen. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.site-nav > * + * {
  margin-left: 0.25rem;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-small);
  color: var(--lilac-200);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* ---------- 6. Hero (the big opening panel) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 2.75rem;
  padding-bottom: 3.25rem;
  background:
    radial-gradient(circle at 88% 8%, rgba(116, 68, 214, 0.55), transparent 52%),
    radial-gradient(circle at 0% 110%, rgba(91, 47, 176, 0.5), transparent 48%),
    linear-gradient(160deg, var(--ink-950), var(--ink-800));
  color: var(--white);
}

/* On a phone the ball peeks in from the top corner, small and faint, so it
   never fights with the headline. Wider screens give it room (see section 9). */
.hero__art {
  position: absolute;
  top: 0.25rem;
  right: -2.25rem;
  width: 11rem;
  opacity: 0.5;
  pointer-events: none;
}

.hero__content {
  position: relative;
}

/* The last size line stops the title growing past 19% of the screen width,
   so with very large text "SMASH." still fits a small phone. At ordinary
   text sizes the clamp() size is always the smaller one, so nothing changes. */
.hero__title {
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-size: clamp(2.6rem, 12vw, 5.75rem);
  font-size: min(clamp(2.6rem, 12vw, 5.75rem), 19vw);
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero__title-accent {
  display: inline-block;
  color: var(--lilac-300);
}

/* Lavender fading to white across the letters, like the logo. This sits after
   the two plain color rules above so that it wins. Browsers that can't do it
   simply show the plain lavender. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark__top,
  .hero__title-accent {
    background-image: linear-gradient(100deg, #f4eeff 0%, var(--lilac-300) 45%, var(--lilac-400) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Italic letters lean past their box; this keeps the last one from being cut off. */
    padding-right: 0.12em;
  }
}

.hero__lead {
  max-width: 32rem;
  margin-top: 1.1rem;
  font-size: 1.1rem;
  color: var(--lilac-200);
}

.status {
  display: inline-flex;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(196, 176, 244, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
}

.status__dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--closed);
}

.status--open .status__dot {
  background: var(--open);
  box-shadow: 0 0 0 4px rgba(55, 211, 154, 0.22);
}

.actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Each button fills its grid cell, so they end up the same height. */
.actions li {
  display: flex;
}

.action {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 5.25rem;
  padding: 1rem 3rem 1rem 1.25rem;
  /* With very large text the side padding stops growing at a share of the
     screen, so the button's name keeps its room. Same size as ever otherwise. */
  padding-right: min(3rem, 15vw);
  padding-left: min(1.25rem, 6.25vw);
  border: 1px solid rgba(196, 176, 244, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

/* The arrow on the right edge of each big button. */
.action::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  right: min(1.25rem, 6.25vw);
  top: 50%;
  width: 0.65rem;
  width: min(0.65rem, 3.25vw);
  height: 0.65rem;
  height: min(0.65rem, 3.25vw);
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.8;
}

.action:hover {
  border-color: var(--lilac-300);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  transform: translateY(-2px);
}

.action--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #e3d7fc, var(--lilac-400));
  color: var(--ink-900);
  box-shadow: 0 12px 30px rgba(116, 68, 214, 0.35);
}

.action--primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #f0e9fe, var(--lilac-300));
  color: var(--ink-900);
}

.action__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-size: min(1.35rem, 12vw);
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.action__note {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ---------- 7. Page sections ---------- */

.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section--tint {
  background: var(--lilac-100);
}

.section__title {
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink-800);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.section__cta {
  margin-top: 1.5rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.75rem;
}

/* Courts */

/* minmax(0, 1fr) lets a card shrink to the screen, so a long word or a big
   price wraps instead of pushing the page wider than the phone. */
.court-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

/* The owner's photo of the courts, once uploaded: above the court cards, in
   the same rounded white frame as them, the full width of the column. It is
   shown wide, trimming the top and bottom of a taller photo: 16 by 9 on a
   phone, and a lower banner (3 by 1) on wider screens, so on a computer the
   court cards stay close below it. The admin pages preview both shapes.
   Older phones show the whole photo instead. */
.court-photo {
  margin: 0 0 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--lilac-100);
  box-shadow: var(--shadow);
}

.court-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* A card measures its own width ("cqi" below is one hundredth of it), so with
   very large text its drawing, spacing, name and price stop growing at a share
   of the card. The price may then move onto a second line, at the right,
   instead of squeezing the court's name. At ordinary text sizes everything
   fits on one line at the same sizes as ever. */
.court {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.6rem 1.25rem 1.1rem;
  padding-left: min(1.25rem, 6.25vw);
  padding-right: min(1.25rem, 6.25vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

/* Each part's top margin keeps a moved price apart from the name above it.
   The card's top padding is smaller by the same amount, so a one-line card
   sits exactly where it always did. */
.court > * {
  margin-top: 0.5rem;
}

.court__icon {
  flex: none;
  width: 2.75rem;
  width: min(2.75rem, 18cqi);
  height: auto;
}

/* The name's own share of the line: the price moves down before the name
   gets narrower than this. */
.court__text {
  flex: 1 1 4em;
  flex-basis: min(4em, 45%);
  min-width: 0;
  margin-left: 1rem;
  margin-left: min(1rem, 6.6cqi);
  margin-right: 1rem;
  margin-right: min(1rem, 6.6cqi);
}

.court__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-size: min(1.3rem, 8.5cqi);
  font-weight: 900;
  font-style: italic;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--ink-800);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.court__about {
  font-size: 0.95rem;
  color: var(--text-soft);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

/* On one line the name takes up all the spare room, so this margin is zero;
   on a line of its own it pushes the price to the right. */
.court__price {
  flex: none;
  margin-left: auto;
  text-align: right;
}

.court__amount {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-size: min(1.6rem, 10.5cqi);
  font-weight: 900;
  line-height: 1.1;
  color: var(--violet-600);
}

.court__unit {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* Opening hours */

.hours__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #d5c8f1;
}

.hours__row dt {
  font-weight: 700;
}

.hours__row dd {
  margin-left: 1rem;
  text-align: right;
}

.hours__row--closed dd {
  color: var(--text-soft);
}

/* The numbered steps */

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 2.5rem;
  padding-left: 3.5rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--violet-600);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
}

/* Contact details */

.contact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact__row {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
}

.contact__row + .contact__row {
  border-top: 1px solid var(--line);
}

.contact__row dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.contact__row dd {
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.contact__extra {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* ---------- 8. Footer ---------- */

.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  background: var(--ink-950);
  color: var(--lilac-200);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--lilac-300);
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

/* A long email address or business name wraps instead of widening the page. */
.site-footer__business {
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.site-footer__name {
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer__todo {
  max-width: 28rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(255, 197, 61, 0.7);
  border-radius: var(--radius-small);
  color: #ffe2a0;
}

.site-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1.5rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-footer__fine {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(196, 176, 244, 0.2);
  color: var(--lilac-300);
  font-size: 0.85rem;
}

/* ---------- 9. Wider screens ---------- */

@media (min-width: 40rem) {
  .court-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact__row {
    grid-template-columns: 9rem 1fr;
    align-items: baseline;
  }
}

/* Tablets. The ball grows, but stays small enough to clear the headline. */
@media (min-width: 48rem) {
  .court-photo img {
    aspect-ratio: 3 / 1;
  }

  .site-nav > * + * {
    margin-left: 0.5rem;
  }

  .hero {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .hero__art {
    top: 1.5rem;
    right: 1rem;
    width: 17rem;
    opacity: 0.9;
  }

  .actions {
    grid-template-columns: 1.25fr 1fr;
    max-width: 40rem;
    margin-top: 2.25rem;
  }

  .section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }

  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Laptops and desktops: room for the ball at full size. */
@media (min-width: 62rem) {
  .hero__art {
    right: max(1rem, calc(50% - 34rem));
    width: 25rem;
  }
}

/* ---------- 10. People who prefer less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- 11. Printing ---------- */

/* Printers leave out background colors, so the dark panels would print as
   pale text on white paper. On paper everything becomes plain dark text. */
@media print {
  .practice-banner,
  .site-nav,
  .skip-link,
  .hero__art {
    display: none;
  }

  .site-header,
  .hero,
  .site-footer,
  .section--tint,
  .button,
  .action,
  .action--primary,
  .status,
  .steps li::before {
    background: none;
    box-shadow: none;
  }

  .site-header,
  .hero,
  .site-footer,
  .button,
  .action,
  .steps li::before,
  .wordmark__top,
  .wordmark__bottom,
  .eyebrow--on-dark,
  .hero__title-accent,
  .hero__lead,
  .site-footer a,
  .site-footer__name,
  .site-footer__fine,
  .site-footer__todo {
    color: var(--text);
  }

  .steps li::before {
    border: 2px solid var(--text);
  }

  .action::after {
    display: none;
  }

  .court,
  .contact {
    box-shadow: none;
  }
}
