/* Prima Fitness. Colours and typefaces matched to logo.png */
:root {
  --blush: #fff4ff;      /* logo background */
  --oxblood: #4b0707;    /* logo lettering */
  --cocoa: #3e1008;      /* logo dancer */
  --mat: #f2d9df;        /* the pink Pilates mat */
  --mauve: #7a5a63;      /* secondary text */
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));  /* full-bleed section, content held to --max */

  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --display: "Belleza", "Optima", "Candara", sans-serif;  /* the "FITNESS" lettering */
  --body: var(--display);

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 72rem;
}

/* Sections alternate between the logo's colours and the logo inverted */
:root, .theme-light {
  --bg: var(--blush);
  --fg: var(--oxblood);
  --fg-soft: var(--cocoa);
  --fg-muted: var(--mauve);
  --line: rgba(75, 7, 7, .22);
  --hover: var(--cocoa);
  --card: var(--mat);
}
.theme-dark {
  --bg: var(--oxblood);
  --fg: var(--blush);
  --fg-soft: rgba(255, 244, 255, .78);
  --fg-muted: rgba(255, 244, 255, .65);
  --line: rgba(255, 244, 255, .22);
  --hover: var(--mat);
  --card: var(--blush);
}
.theme-light, .theme-dark { background: var(--bg); color: var(--fg); }

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.15; }
h1, h3 { font-family: var(--display); }
p { margin: 0 0 1em; max-width: 36em; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--fg); color: var(--bg);
  padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Stadium frame, the shape of the mat */
.frame { border-radius: 999px; object-fit: cover; width: 100%; }

.script {
  font-family: var(--script);
  font-size: clamp(3.6rem, 2.4rem + 5vw, 7rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: .35em;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.brand img { width: clamp(7.5rem, 6rem + 6vw, 10.5rem); border-radius: .35rem; }  /* the logo in its original blush box */
.site-header ul { display: flex; gap: clamp(.9rem, 2.5vw, 2.25rem); list-style: none; margin: 0; padding: 0; align-items: center; }
.site-header nav a {
  font-family: var(--display); font-size: 1.05rem; text-decoration: none;
  padding: .25rem 0; border-bottom: 1px solid transparent;
}
.site-header nav a:hover { border-bottom-color: currentColor; }
.site-header nav a.nav-book {
  background: var(--fg); color: var(--bg);
  padding: .45rem 1.1rem; border-radius: 999px; border: 0;
}
.site-header nav a.nav-book:hover { background: var(--hover); }

/* Motto band under the top bar: words in the logo's script, Pilates / ballerina / dumbbell icons between */
.motto {
  margin: 0; max-width: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .35rem clamp(.6rem, 2vw, 1.6rem);
  padding: .9rem var(--gutter);
  background: var(--mat); color: var(--oxblood);
  font-family: var(--script); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.2;
}
/* Icons are cut-outs (from 1.jpg and the logo) used as masks, so they take the text colour */
.motto-icon {
  flex: none; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.motto-pilates { --icon: url(img/icon-pilates.png); height: .85em; width: 1.87em; }
.motto-ballerina { --icon: url(img/icon-ballerina.png); height: 1.4em; width: 1.05em; }
.motto-dumbbell { --icon: url(img/icon-dumbbell.png); height: .8em; width: 1.43em; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  font-family: var(--display); font-size: 1.05rem; text-decoration: none;
  padding: .8rem 1.6rem; border-radius: 999px; border: 1px solid var(--fg);
  transition: background-color .2s, color .2s;
}
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: var(--hover); border-color: var(--hover); }
.btn-line:hover { background: var(--fg); color: var(--bg); }

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad-x) clamp(3.5rem, 8vw, 7rem);
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 4vw, 4rem); align-items: start;
}
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); letter-spacing: -.005em; max-width: 16ch; margin-top: -.25em; }  /* lines the capitals up with the top of the image */
.ticks.offer { grid-template-columns: repeat(2, max-content); gap: .5rem 2.5rem; margin-top: 1.25rem; font-size: 1.3em; }
.lede { font-size: 1.2em; margin-top: 1.25rem; color: var(--fg-soft); max-width: 28em; }

.hero-media, .pair { position: relative; margin: 0; padding: 0 0 12% 0; }
.frame-tall { aspect-ratio: 5 / 8; width: 78%; margin-left: auto; }
.frame-small {
  position: absolute; left: 0; bottom: 0; width: 42%; aspect-ratio: 5 / 8;
  border: 6px solid var(--bg);
}
/* The main hero image is a graphic with text, so it is shown whole rather than in the stadium frame */
.hero-graphic { width: 86%; border-radius: 1.5rem; }
.hero .frame-small { left: auto; right: 0; width: 36%; aspect-ratio: 4 / 5; border-radius: 1.5rem; }  /* a pill would crop her pointe shoes */

/* Classes */
.classes { padding: clamp(3.5rem, 8vw, 7rem) var(--pad-x); }

.feature {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
}
.feature h3 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: 1rem; }
.feature-flip > img { order: 2; }
/* Two landscape photos, staggered so only a sliver of mat overlaps */
.pair-wide { margin: 0; display: grid; }
.pair-wide img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1.5rem; }
.pair-wide img:first-child { width: 88%; }
.pair-wide img:last-child { width: 66%; margin: -5% 0 0 auto; border: 6px solid var(--bg); position: relative; }
.photo-square { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 1.5rem; }
.when { font-family: var(--display); color: var(--fg-muted); margin-top: 1.5rem; }

.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.ticks li { display: flex; gap: .8rem; align-items: baseline; }
.ticks li::before {
  content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--fg); transform: translateY(-.1em);
}

.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.more article {
  background: var(--card); color: var(--oxblood); border-radius: 999px;
  padding: clamp(2.5rem, 4vw, 3.5rem) clamp(1.75rem, 3vw, 2.75rem);
  text-align: center;
}
.more h3 { font-size: 1.5rem; margin-bottom: .75rem; }
.more p { margin: 0 auto; font-size: .95em; color: var(--mauve); max-width: 22em; }

/* Personal Training and Pre/Postnatal: text beside a landscape photo */
.service {
  padding: clamp(3.5rem, 8vw, 7rem) var(--pad-x);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.service-flip > img { order: -1; }
.service p { font-size: 1.15em; }
.service .script { font-size: clamp(3.2rem, 2.2rem + 3vw, 5rem); }
.service .btn { display: inline-block; margin-top: .75rem; }
.photo-wide { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1.5rem; }
.service .photo-portrait { justify-self: center; max-width: 24rem; }

/* Memberships: intro and photo, then price cards */
.memberships { padding: clamp(3.5rem, 8vw, 7rem) var(--pad-x); }
.memberships-head {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.memberships-head p { font-size: 1.15em; }
.photo-portrait { width: 100%; max-width: 22rem; justify-self: end; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.5rem; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.plan { background: var(--card); color: var(--oxblood); border-radius: 1.5rem; padding: 1.75rem 1.75rem 2rem; }
.plan h3 { font-size: 1.4rem; margin-bottom: .9rem; }
.price { font-family: var(--display); font-size: 2.6rem; line-height: 1; margin: 0; }
.term { color: var(--mauve); font-size: .95rem; margin: .4rem 0 1rem; }
.plan p:last-child { margin: 0; color: var(--cocoa); font-size: .95em; }
.plans-note { margin: 1.25rem 0 0; color: var(--fg-muted); font-size: .95rem; }
.plans-sub { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem; }

/* Schedule: weekly calendar, start times aligned across days */
.schedule {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}
.schedule-head, .week { max-width: var(--max); margin-left: auto; margin-right: auto; }
.schedule-head { display: grid; grid-template-columns: auto 1fr; gap: 1rem 3rem; align-items: end; }
.schedule-intro { margin-bottom: 1.6em; opacity: .85; }
.schedule-intro p { margin: 0; }
.schedule-note { max-width: var(--max); margin: 1.25rem auto 0; text-align: right; opacity: .85; }  /* right edge lines up with the calendar */

.week {
  --rule: rgba(255, 244, 255, .35);
  display: grid;
  grid-template-columns: 4.5rem repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(5, minmax(4.5rem, auto));
  border: 1px solid var(--rule); border-radius: 1.25rem; overflow: hidden;
}
/* One line across the whole week at each start time */
.hline { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
.times, .day { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; }
/* Explicit columns, so the full-width row lines don't push days out of place */
.times { grid-column: 1; }
.day:nth-of-type(2) { grid-column: 2; } .day:nth-of-type(3) { grid-column: 3; } .day:nth-of-type(4) { grid-column: 4; }
.day:nth-of-type(5) { grid-column: 5; } .day:nth-of-type(6) { grid-column: 6; } .day:nth-of-type(7) { grid-column: 7; }
.day:nth-of-type(8) { grid-column: 8; }
.times span { font-size: .85rem; opacity: .7; padding: .7rem 0 0 .8rem; }
.s1 { grid-row: 2; } .s2 { grid-row: 3; } .s3 { grid-row: 4; } .s4 { grid-row: 5; } .s5 { grid-row: 6; }

.day { border-left: 1px solid var(--rule); padding: 0 .4rem .4rem; }
.day h3 { font-size: 1.1rem; padding: .6rem 0 .9rem; text-align: center; }
.day.is-today { background: rgba(255, 244, 255, .1); }
.day.is-today h3::after {
  content: "Today"; display: block; font-size: .75rem; opacity: .75; margin-top: .15rem;
}

.event {
  background: var(--card); color: var(--oxblood);
  border-radius: 1rem; padding: .7rem .8rem .8rem; margin: .35rem 0;
  align-self: start;
}
.event p { margin: 0; }
.ev-time { font-size: .85rem; color: var(--mauve); }
.ev-name { font-size: 1.05rem; line-height: 1.25; margin: .15rem 0 .3rem; }
.ev-where { font-size: .85rem; color: var(--mauve); }
.none { grid-row: 2; text-align: center; font-size: .9rem; opacity: .55; margin: .9rem 0 0; }
.soon {
  display: inline-block; font-size: .7rem; line-height: 1.4; margin-top: .3rem;
  border: 1px solid currentColor; border-radius: 999px; padding: .05rem .5rem;
}

/* Below this width seven columns get too narrow: list the days instead */
@media (max-width: 56rem) {
  .week { display: block; }
  .times, .hline { display: none; }
  .day {
    display: grid; grid-template-columns: 7rem 1fr; grid-template-rows: none; column-gap: 1rem;
    padding: .5rem .75rem; border-left: 0;
  }
  .day + .day { border-top: 1px solid var(--rule); }
  .day h3 { grid-column: 1; grid-row: 1 / span 3; text-align: left; padding: .9rem 0; }
  .day h3::after { text-align: left; }
  .event, .none { grid-column: 2; grid-row: auto; }
  .none { text-align: left; margin: 1rem 0; }
}

/* Book */
.book {
  padding: clamp(3.5rem, 8vw, 7rem) var(--pad-x);
  display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.book .frame { aspect-ratio: 5 / 7; max-width: 22rem; object-position: 60% 50%; }
.book p { font-size: 1.15em; }
.small { font-size: .95rem; color: var(--fg-muted); }

/* Footer */
.site-footer {
  padding: 3rem var(--gutter);
  display: grid; justify-items: center; text-align: center; gap: .25rem;
}
.site-footer img { width: 11rem; margin-bottom: 1rem; }
.site-footer p { margin: 0; }
.site-footer .small { color: rgba(255, 244, 255, .65); margin-top: .5rem; }

/* Six menu links don't fit beside the logo below this width: centre the logo and wrap the links */
@media (max-width: 64rem) {
  .site-header { flex-wrap: wrap; justify-content: center; padding-top: .5rem; padding-bottom: .5rem; }
  .site-header ul { flex-wrap: wrap; justify-content: center; gap: .35rem 1.1rem; }
  .site-header nav a { white-space: nowrap; }
}

/* Tablet */
@media (max-width: 60rem) {
  .more { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .more article { border-radius: 4rem; }
}

/* Phone */
@media (max-width: 44rem) {
  .hero, .feature, .book, .service, .memberships-head { grid-template-columns: 1fr; }
  .service > img { order: -1; }
  .photo-portrait { justify-self: start; max-width: 18rem; }
  .ticks.offer { grid-template-columns: 1fr; }
  .hero h1 { margin-top: 0; }
  .hero-media, .pair { max-width: 24rem; width: 100%; margin: 0 auto; }
  .feature-flip > img { order: 0; }
  .book .frame { max-width: 16rem; margin: 0 auto; }
  .schedule-head { grid-template-columns: 1fr; }
  .schedule-intro { margin-bottom: 1.25em; }
  .day { grid-template-columns: 5.5rem 1fr; padding-left: .5rem; padding-right: .5rem; }
}
