/* Elena McCarthy, dental hygienist. Static site stylesheet. */

:root {
  /* Palette taken from Elena's existing product page */
  --clay: #F8F8F8;        /* off white, page background */
  --rose: #D0C9C7;        /* rose taupe, hero and products */
  --mist: #D0E3E9;        /* powder blue, contact */
  --sage: #A7BCB3;        /* sage, secondary */
  --sand: #B7A592;        /* sand, secondary */
  --blue: #6DA5C1;        /* steel blue accent, decorative */
  --blue-deep: #3D7894;   /* steel blue for text, links and focus */
  --eucalyptus: #474543;  /* warm charcoal, headings and buttons */
  --ink-soft: #555350;    /* body text */
  --myrrh: #3D7894;       /* accent alias */
  --white: #FFFFFF;
  --line: rgba(71, 69, 67, 0.18);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space: clamp(5rem, 11vw, 9rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--clay);
  color: var(--eucalyptus);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--myrrh);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; }

p { margin: 0 0 1.1em; max-width: 62ch; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--eucalyptus);
}

.muted { color: var(--ink-soft); }

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--eucalyptus);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-solid { background: var(--eucalyptus); color: var(--white); }
.btn-solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-line { background: transparent; color: var(--eucalyptus); }
.btn-line:hover { background: var(--eucalyptus); color: var(--white); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--myrrh); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 248, 248, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4.75rem;
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.brand-role {
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.nav a:not(.btn):hover { color: var(--eucalyptus); }
.nav .btn { padding: 0.65rem 1.2rem; font-size: 0.9rem; }

/* Hero */

.hero { background: var(--rose); padding: clamp(3rem, 7vw, 6rem) 0 var(--space); }
.services { padding-top: var(--space); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}

.hero h1 {
  font-size: clamp(2.9rem, 6.6vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.hero h1 span { display: block; white-space: nowrap; }

.hero .lead { margin-bottom: 2.25rem; max-width: 36ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-location {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 44ch;
}
.hero-location strong { color: var(--eucalyptus); font-weight: 500; }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
}
.hero-figure figcaption {
  margin-top: 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Services overview */

.services { padding-bottom: var(--space); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head p { margin: 0; }

.service-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.service {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.service-img {
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1.6rem;
}
.service-img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.service:hover .service-img img { transform: scale(1.025); }
.service h3 { margin-bottom: 0.75rem; }
.service p { color: var(--ink-soft); margin-bottom: 1.25rem; }
.service .text-link { align-self: flex-start; }

/* Hygiene detail */

.hygiene {
  background: var(--white);
  padding: var(--space) 0;
}

.hygiene-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
}

.hygiene h2 { margin-bottom: 1.75rem; }

.treatments {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.treatments li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.treatments .t-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
}
.treatments .t-note { color: var(--ink-soft); font-size: 0.98rem; }

.hygiene-cta { margin-top: 2.5rem; }

/* Products ritual */

.products {
  background: var(--rose);
  color: var(--eucalyptus);
  padding: var(--space) 0;
}
.products .muted { color: var(--ink-soft); }
.products .lead { color: var(--eucalyptus); }

.products .section-head { margin-bottom: clamp(3rem, 6vw, 5rem); }

.ritual-bar {
  display: grid;
  grid-template-columns: 4.5fr 2.5fr 2fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 0.9rem;
}
.ritual-bar span {
  height: 10px;
  background: var(--blue);
  border-radius: 1px;
  transform-origin: left center;
}
.ritual-bar span:nth-child(2) { background: #8FA89E; }
.ritual-bar span:nth-child(3) { background: #A08A72; }

.ritual-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 4.5fr 2.5fr 2fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.step-time {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--myrrh);
  margin-bottom: 0.35rem;
}
.ritual-steps h3 { margin-bottom: 1rem; color: var(--eucalyptus); }
.ritual-steps p { color: var(--eucalyptus); font-size: 1rem; }

.ingredients {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--eucalyptus);
}
.ingredients-label {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.products-foot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.products-foot-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 0;
  color: var(--eucalyptus);
}


/* About and video */

.about { padding: var(--space) 0; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.about h2 { margin-bottom: 1.75rem; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--mist);
  border-radius: 2px;
  overflow: hidden;
}
.video-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--eucalyptus);
}
.video-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.3s ease;
}
.video-button:hover img { opacity: 1; }
.video-play {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(248, 248, 248, 0.94);
  display: grid;
  place-items: center;
}
.video-play svg { width: 1.4rem; height: 1.4rem; margin-left: 4px; fill: var(--eucalyptus); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.video-caption strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--eucalyptus); display: block; }

/* Contact */

.contact {
  background: var(--mist);
  padding: var(--space) 0;
}

.contact h2 { margin-bottom: 1.5rem; max-width: 12ch; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.contact-list li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-list .c-label { color: var(--ink-soft); font-size: 0.95rem; }
.contact-list .c-value {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 300;
  line-height: 1.3;
  text-decoration: none;
}
.contact-list a.c-value:hover { color: var(--myrrh); }
.contact-list .c-sub { display: block; font-family: var(--sans); font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.3rem; }

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--eucalyptus); }

/* The one orchestrated moment: the ritual bar fills in when it comes into view */

.js .ritual-bar span { transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .ritual-bar span:nth-child(2) { transition-delay: 0.5s; }
.js .ritual-bar span:nth-child(3) { transition-delay: 0.85s; }
.js .ritual-bar.in span { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .ritual-bar span { transform: none; transition: none; }
  .service-img img { transition: none; }
}

/* Responsive */

@media (max-width: 960px) {
  .hero-grid,
  .section-head,
  .hygiene-grid,
  .about-grid,
  .contact-grid,
  .products-foot { grid-template-columns: 1fr; }

  .hero-grid { align-items: start; }
  .hero-figure { max-width: 520px; }
  .section-head p { max-width: 60ch; }

  .ritual-steps { grid-template-columns: 1fr; gap: 3rem; }
  .ritual-bar { gap: 4px; }
  .step-time { margin-bottom: 1rem; }
}

@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .service-pair { grid-template-columns: 1fr; gap: 3.5rem; }
  .treatments li { grid-template-columns: 1fr; gap: 0.35rem; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 1.3rem; }
  .nav .btn { padding: 0.55rem 0.95rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
