/* Ochtendlicht Yoga: styles. Phone first; wider screens come later in this file. */

/* Colours: change them here and the whole page follows. */
:root {
  --page: #faf6ef;    /* warm cream: page background */
  --band: #f1e7d6;    /* sand: header, class cards, quote */
  --text: #3b2f26;    /* dark warm brown: all text */
  --accent: #7a4e1d;  /* deep ochre: links and buttons */
  --on-accent: #ffffff;
  --line: #d9c9b0;    /* soft dividing lines */
  --field: #ffffff;   /* inside of form fields */
  --field-edge: #8c7a63; /* edge of form fields, dark enough to see */

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

/* Gentle scrolling to the form, unless someone has asked their device for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Headings */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.25;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

/* Keyboard: a clear ring around whatever the Tab key has reached. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Leave a little room above a heading when a link jumps to it. */
h2 {
  scroll-margin-top: 1.5rem;
}

/* Page width and spacing */

header,
main > section,
footer {
  padding: 2.5rem 1.25rem;
}

header > *,
main > section > *,
footer > * {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

main > section + section {
  border-top: 1px solid var(--line);
}

/* Header */

header {
  background: var(--band);
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

header p {
  font-size: 1.25rem;
}

.button,
button {
  display: inline-block;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent; /* shows as an edge in high-contrast modes */
  border-radius: 2rem;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

header .button {
  margin-top: 0.5rem;
}

/* Photos */

.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

header .photo {
  margin-top: 2.5rem;
}

section .photo {
  margin-bottom: 2.5rem;
}

/* Classes */

.grid {
  display: grid;
  gap: 1rem;
}

.class {
  background: var(--band);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.class h3 {
  margin-top: 0;
}

.class p:last-child {
  margin-bottom: 0;
}

/* Before your first class */

.questions {
  gap: 1.75rem 2.5rem;
}

.questions h3 {
  margin-top: 0;
}

.questions p {
  margin-bottom: 0;
}

/* Prices */

.prices {
  padding-left: 1.25rem;
}

.prices li {
  margin-bottom: 0.25rem;
}

/* Quote */

figure {
  margin: 0;
}

blockquote {
  margin: 0;
  padding: 1.5rem;
  background: var(--band);
  border-left: 4px solid var(--accent);
  border-radius: 0.25rem;
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.45;
}

blockquote p {
  margin: 0;
}

figcaption {
  margin-top: 0.75rem;
}

/* Form */

form p {
  margin-bottom: 1.25rem;
}

label {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--field-edge);
  border-radius: 0.5rem;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

/* Result after sending: hidden until the address ends in #sent, #problem-check, etc. */
.form-status {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--band);
  border-left: 4px solid var(--accent);
  border-radius: 0.25rem;
  scroll-margin-top: 1.5rem;
}

.form-status:target {
  display: block;
}

/* Spam trap: kept off-screen; people never see or reach it. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.small {
  font-size: 1rem;
}

/* Footer */

footer {
  background: var(--band);
  font-size: 1rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Tablets and laptops: more room, questions in two columns. */

@media (min-width: 48rem) {
  header,
  main > section,
  footer {
    padding: 4rem 2rem;
  }

  header {
    padding-top: 5.5rem;
    padding-bottom: 4.5rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  main > section.wide > *,
  header > .photo {
    max-width: 60rem;
  }

  .questions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Laptops: the three classes side by side. */

@media (min-width: 60rem) {
  .class-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
