/* Eagle Eye Acupuncture, draft 1.
   Palette from Keith's 2021 brand sheet; element accents from his moodboard. See DESIGN.md. */

@font-face { font-family: "Fraunces Text"; src: url(fonts/fraunces-text.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces Display"; src: url(fonts/fraunces-display.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Jost"; src: url(fonts/jost-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* brand sheet */
  --navy: #00233F;
  --red: #D31636;
  --teal: #BCDAD9;
  --teal-strong: #5E9A98; /* pale teal deepened, for small dots that must show on cream */
  --apricot: #F1A76C;
  --cream: #FBEFE5;
  --white: #FFFFFF;
  /* moodboard: the barley/forest green (darkened for text), the ochre and indigo circles */
  --wood: #3E5A2E;
  --ochre: #C69014;
  --indigo: #15153A;

  --serif: "Fraunces Text", Georgia, "Times New Roman", serif;
  --display: "Fraunces Display", Georgia, "Times New Roman", serif;
  --caps: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  /* each page sets its element; default is Wood */
  --el: var(--wood);
}

/* The Five Elements in the order of the generating cycle, one per page */
[data-element="wood"]  { --el: var(--wood); }
[data-element="fire"]  { --el: var(--red); }
[data-element="earth"] { --el: var(--ochre); }
[data-element="metal"] { --el: var(--teal); }
[data-element="water"] { --el: var(--indigo); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font: 400 1.0625rem/1.65 var(--serif);
  font-variant-numeric: oldstyle-nums;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--navy); color: var(--cream); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }

.caps {
  font: 500 .78rem/1.4 var(--caps);
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 9vw, 4.25rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); }

/* ---------- header ---------- */
.site-head { padding: 1rem 0 0; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 56px; height: 56px; }
.brand-name { font: 800 1.2rem/1.1 var(--display); }
.head-call { margin: 0; }
.head-phone { font: 500 .9rem/1 var(--caps); letter-spacing: .08em; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: .2rem; }

.nav { width: 100%; border-top: 1px solid rgba(0, 35, 63, .18); border-bottom: 1px solid rgba(0, 35, 63, .18); margin-top: .25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 0; text-decoration: none; font: 500 .74rem/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; }
.nav a::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; border: 1.5px solid var(--dot); background: transparent; }
.nav a[aria-current="page"]::before { background: var(--dot); }
.nav a[aria-current="page"] { color: var(--navy); }
.nav li:nth-child(1) a { --dot: var(--wood); }
.nav li:nth-child(2) a { --dot: var(--red); }
.nav li:nth-child(3) a { --dot: var(--ochre); }
.nav li:nth-child(4) a { --dot: var(--teal-strong); }
.nav li:nth-child(5) a { --dot: var(--indigo); }

/* ---------- page head: an element circle behind the title, after the moodboard's accent circles ---------- */
.page-head { --circle: clamp(4.5rem, 20vw, 12rem); position: relative; padding: clamp(2.5rem, 9vw, 5rem) 0; isolation: isolate; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; z-index: -1;
  width: var(--circle); aspect-ratio: 1; border-radius: 50%;
  background: var(--el);
  right: max(var(--gutter), calc((100% - 72rem) / 2 + var(--gutter))); top: 50%; transform: translateY(-50%);
}
.page-head h1 { margin: 0; max-width: min(14ch, calc(100% - var(--circle) - 1rem)); }

/* ---------- home hero ---------- */
.hero { position: relative; padding: clamp(2rem, 7vw, 5rem) 0 clamp(2.5rem, 7vw, 5rem); isolation: isolate; }
.hero .wrap { display: grid; gap: 1.5rem; align-items: center; }
.hero-mark { width: min(62vw, 300px); height: auto; margin: 0 auto; }
.hero .kicker { color: var(--navy); margin: 0 0 1.25rem; }
.hero .display {
  font: 800 clamp(1.7rem, 6.4vw, 3rem)/1.15 var(--display);
  margin: 0 0 1.25rem; max-width: 20ch;
}
.hero .lede { max-width: 34rem; font-size: 1.1rem; margin: 0 0 1.75rem; }
@media (min-width: 52rem) {
  .hero .wrap { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
  .hero-mark { order: 2; width: 100%; max-width: 380px; }
}

.button {
  display: inline-block; background: var(--red); color: var(--white);
  font: 500 .85rem/1.3 var(--caps); letter-spacing: .12em; text-transform: uppercase;
  padding: 1rem 1.4rem; border-radius: 999px; text-decoration: none;
}
.button:hover { background: var(--navy); color: var(--cream); }

/* ---------- bands ---------- */
.band { padding: clamp(2.5rem, 8vw, 5rem) 0; position: relative; isolation: isolate; }
.band--white { background: var(--white); }
.band--teal { background: var(--teal); }

.first-big::first-line { font-family: var(--display); font-weight: 800; }
.prose--center { margin-inline: auto; }
.big-para { font-size: clamp(1.1rem, 3.6vw, 1.3rem); line-height: 1.6; }

/* photo with an element circle overlapping one corner, as the moodboard does */
.figure { position: relative; margin: 0; isolation: isolate; }
.figure img { border-radius: 2px; width: 100%; }
.figure::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  width: 20%; aspect-ratio: 1; border-radius: 50%; background: var(--el);
  right: -4%; bottom: -5%;
}
.figure--left::after { right: auto; left: -4%; }

.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--wide-text { grid-template-columns: 1.3fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}

.about-line { font: 800 clamp(1.4rem, 5vw, 2.1rem)/1.25 var(--display); margin: 0 0 1.5rem; }
.more { font: 500 .8rem/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; }

/* home: the four other pages, one per element */
.paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgba(0, 35, 63, .15); border: 1px solid rgba(0, 35, 63, .15); }
@media (min-width: 40rem) { .paths { grid-template-columns: 1fr 1fr; } }
.paths a {
  display: flex; align-items: center; gap: 1rem; padding: 1.5rem 1.25rem; background: var(--cream);
  font: 800 clamp(1.3rem, 4.5vw, 1.7rem)/1.2 var(--display); text-decoration: none; min-height: 5.5rem;
}
.paths a::before { content: ""; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--dot); }
.paths a:hover { background: var(--white); color: var(--navy); }

/* ---------- fees ---------- */
.fees { display: grid; gap: 1.25rem; margin: 2rem 0; }
@media (min-width: 52rem) { .fees { grid-template-columns: 1.6fr 1fr; } }
.fee-card { background: var(--white); padding: clamp(1.25rem, 4vw, 2rem); border-top: 6px solid var(--el); }
.fee-card h3 { margin-bottom: .4em; }
.fee-card dl { margin: 1.25rem 0 0; }
.fee-card dt { font: 500 .8rem/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; margin-top: 1.25rem; }
.fee-card dd { margin: .2rem 0 0; }
.fee-card .price { font: 800 2rem/1.1 var(--display); color: var(--red); font-variant-numeric: lining-nums; }
.terms { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 52rem) { .terms { grid-template-columns: 1fr 1fr; } }
.terms h3 { font-size: 1.2rem; }

/* ---------- faq ---------- */
.q-list { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid rgba(0, 35, 63, .2); }
.q-list li { border-bottom: 1px solid rgba(0, 35, 63, .2); }
.q-list a { display: block; padding: .9rem 0; text-decoration: none; font: 800 1.1rem/1.35 var(--display); }
.q-list a::after { /* a small down chevron, drawn so it needs no glyph and adds nothing for screen readers */
  content: ""; display: inline-block; width: .42em; height: .42em; margin: 0 0 .22em .55em;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(45deg);
}
.qa { padding: clamp(2rem, 6vw, 3.5rem) 0; border-top: 1px solid rgba(0, 35, 63, .2); scroll-margin-top: 1rem; }
.qa:first-child { border-top: 0; padding-top: 0; }
.qa h2 { font-size: clamp(1.45rem, 5vw, 2.2rem); max-width: 26ch; }

/* ---------- pets ---------- */
.pets { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.5rem; }
.pets figure { margin: 0; }
.pets img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* ---------- contact ---------- */
.contact { background: var(--navy); color: var(--cream); padding: clamp(3rem, 9vw, 6rem) 0; position: relative; overflow: hidden; isolation: isolate; }
.contact::before {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  --sun: clamp(14rem, 60vw, 30rem);
  width: var(--sun); aspect-ratio: 1; background: var(--red);
  right: calc(var(--sun) * -.2); bottom: calc(var(--sun) * -.6);
}
.contact h2 { color: var(--cream); }
.contact :focus-visible, .site-foot :focus-visible { outline-color: var(--cream); }
.contact .phone { font: 800 clamp(2.2rem, 10vw, 4rem)/1 var(--display); margin: .25rem 0 1.5rem; font-variant-numeric: lining-nums; }
.contact .phone a { text-decoration: none; border-bottom: 3px solid var(--apricot); }
.contact .phone a:hover { color: var(--apricot); }
.contact .button { background: var(--apricot); color: var(--navy); }
.contact .button:hover { background: var(--cream); color: var(--navy); }
.contact p { max-width: 34rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--navy); color: var(--cream); padding: 2.5rem 0 3rem; border-top: 1px solid rgba(251, 239, 229, .15); }
.site-foot .wrap { display: grid; gap: 1.5rem; justify-items: start; }
.site-foot img { width: 72px; height: auto; }
.site-foot .caps { color: var(--apricot); margin: 0; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-foot a { font: 500 .74rem/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.site-foot a:hover { color: var(--apricot); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
