/* Regain Hearing - Croydon
   Built for people who are losing their hearing and are mostly over sixty: large type,
   high contrast, no motion, no carousels, and a phone number that is never more than one
   tap away. Every visual decision below is downstream of that. */

:root {
  --ink:        #0f1b2d;   /* deep navy, taken from the clinic's own header band */
  --ink-soft:   #3a4a61;
  --ink-faint:  #6b7a90;
  --paper:      #fbf9f5;   /* warm off-white; pure white glares under clinic lighting */
  --card:       #ffffff;
  --line:       #e2dbd0;
  --line-soft:  #efe9e0;

  /* The brand magenta is #e6007e, which only reaches 4.0:1 on this paper. Darkened until
     body-sized text on paper clears 4.5:1, so links do not have to be underlined-and-huge
     to be legible. */
  --accent:     #bd005e;
  --accent-dk:  #8d0046;
  --accent-tint:#fdeef5;

  --page: min(1160px, 91vw);
  --rhythm: clamp(64px, 8vw, 120px);

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;              /* deliberately larger than a default 16px page */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dk); }

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

.wrap { width: var(--page); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff;
  padding: 12px 20px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; top: 0; }

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow-l { color: rgba(255,255,255,0.62); }

/* The audiogram tick strip: a frequency axis flattened into a rule. Used once per major
   section break so the page has a motif without any decoration that must be explained. */
.ticks {
  height: 9px;
  background-image: repeating-linear-gradient(
    to right, var(--line) 0 1px, transparent 1px 13px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.masthead-in {
  width: var(--page); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 18px 0;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand b { font-weight: 400; }
.brand span { color: var(--accent); font-weight: 600; }
.brand small {
  display: block; font-family: var(--sans);
  font-size: 0.62rem; letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 2px;
}
.masthead-act { display: flex; align-items: center; gap: 14px; }
.masthead-tel {
  font-weight: 600; font-size: 1.02rem; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.masthead-tel:hover { color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  text-decoration: none; border-radius: 3px;
  border: 1.5px solid transparent;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn-sm { min-height: 46px; padding: 0 20px; font-size: 0.94rem; }
.btn-solid { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-solid:hover { background: var(--accent-dk); border-color: var(--accent-dk); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- hero ---------- */

.hero { padding: clamp(48px, 6vw, 88px) 0 0; }
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1.05fr 0.95fr; align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.5vw, 4.05rem);
  margin: 0 0 24px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede {
  font-size: 1.16rem; color: var(--ink-soft); max-width: 40ch;
}
.hero-act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* The photo columns are cropped to a fixed ratio rather than left at their natural height,
   so the picture stands level with the text beside it instead of floating in a pool of
   whitespace. */
.hero-fig { position: relative; margin: 0; }
.hero-fig img { border-radius: 4px; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hero-fig figcaption {
  font-size: 0.84rem; color: var(--ink-faint); margin-top: 12px; max-width: 38ch;
}

.rating {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
}
.rating strong { font-family: var(--serif); font-size: 2.1rem; line-height: 1; font-weight: 600; }
.rating span { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- fact band ---------- */

.band {
  background: var(--ink); color: #fff;
  margin-top: var(--rhythm);
}
.band-in {
  width: var(--page); margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 30px; padding: 40px 0;
}
.band dt {
  font-size: 0.7rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 8px; font-weight: 600;
}
.band dd { margin: 0; font-size: 1.06rem; line-height: 1.5; }
.band dd a { color: #fff; }
.band dd a:hover { color: #ffd3e6; }

/* ---------- sections ---------- */

section { padding: var(--rhythm) 0; }
section > .wrap > h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.9rem);
  max-width: 22ch;
}
.section-lede { margin-top: 20px; max-width: 62ch; color: var(--ink-soft); font-size: 1.06rem; }

/* numbered services, set as an editorial list rather than a grid of identical cards */
.services { list-style: none; margin: 46px 0 0; padding: 0; }
.services li {
  display: grid; grid-template-columns: 84px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 30px 0; border-top: 1px solid var(--line);
}
.services li:last-child { border-bottom: 1px solid var(--line); }
.services .num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 2.5rem; line-height: 1; color: var(--accent); opacity: .82;
}
.services h3 { font-size: 1.42rem; margin-bottom: 10px; }
.services p { color: var(--ink-soft); max-width: 62ch; margin: 0; }

/* the appointment walk-through */
.steps { counter-reset: step; margin: 44px 0 0; padding: 0; list-style: none; }
.steps li {
  position: relative; padding: 0 0 30px 46px; border-left: 1px solid var(--line);
  margin-left: 12px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -15px; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 0.86rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-size: 1.24rem; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); max-width: 60ch; margin: 0; }

/* ---------- split blocks ---------- */

.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 66px); align-items: center;
}
.split figure { margin: 0; }
.split img { border-radius: 4px; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.split-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hours { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 1.02rem; }
.hours th, .hours td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.hours th { font-weight: 500; color: var(--ink-soft); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.closed td { color: var(--ink-faint); }

.notes { list-style: none; padding: 0; margin: 26px 0 0; }
.notes li {
  padding: 0 0 0 26px; margin-bottom: 12px; position: relative; color: var(--ink-soft);
}
.notes li::before {
  content: ''; position: absolute; left: 0; top: 0.68em;
  width: 10px; height: 2px; background: var(--accent);
}

/* ---------- testimonial ---------- */

.quote {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  /* a <figure>, so the browser's default 40px side margins have to go or the quote sits
     indented from every other block in the section */
  padding: clamp(28px, 4vw, 46px); border-radius: 3px; margin: 40px 0 0;
}
.quote blockquote {
  margin: 0; font-family: var(--serif); font-size: clamp(1.3rem, 1rem + 1.1vw, 1.75rem);
  line-height: 1.42; color: var(--ink);
}
.quote figcaption { margin-top: 20px; font-size: 0.93rem; color: var(--ink-faint); }
.quote figcaption b { color: var(--ink-soft); font-weight: 600; }

/* ---------- fees note ---------- */

.plain {
  background: var(--accent-tint); border: 1px solid #f3cfe0;
  padding: clamp(28px, 4vw, 44px); border-radius: 3px; margin-top: 40px;
  max-width: 74ch;
}
.plain h3 { font-size: 1.4rem; margin-bottom: 12px; }
.plain p { color: var(--ink-soft); }

/* ---------- faq ---------- */

.faq { margin-top: 44px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 24px 44px 24px 0; position: relative;
  font-family: var(--serif); font-size: 1.28rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 21px;
  font-family: var(--sans); font-size: 1.7rem; font-weight: 300; color: var(--accent);
  line-height: 1;
}
.faq details[open] summary::after { content: '\2013'; }
.faq .answer { padding: 0 0 26px; color: var(--ink-soft); max-width: 68ch; }

/* ---------- closing call to action ---------- */

.cta { background: var(--ink); color: #fff; }
.cta-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.cta h2 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.9rem); max-width: 20ch; }
.cta p { color: rgba(255,255,255,0.76); max-width: 52ch; margin-top: 20px; font-size: 1.06rem; }
.cta .hero-act { margin-top: 34px; }

/* the practical details, repeated at the point of decision so nobody has to scroll back */
.cta-card { border: 1px solid rgba(255,255,255,0.22); border-radius: 3px; padding: 30px 32px; }
.cta-card dl { margin: 0; }
.cta-card dt {
  font-size: 0.68rem; letter-spacing: 0.17em; text-transform: uppercase; font-weight: 600;
  color: rgba(255,255,255,0.55); margin-bottom: 6px;
}
.cta-card dd { margin: 0 0 20px; font-size: 1rem; line-height: 1.5; }
.cta-card dd:last-child { margin-bottom: 0; }
.cta-card a { color: #fff; }
.cta-card a:hover { color: #ffd3e6; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 54px 0 60px; font-size: 0.94rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.site-footer h4 {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px; font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; color: var(--ink-soft); }
.foot-legal {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--ink-faint); font-size: 0.86rem; max-width: 78ch;
}

/* ---------- 404 ---------- */

.nf {
  width: var(--page); margin-inline: auto;
  min-height: 58vh; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(56px, 8vw, 104px) 0;
}
.nf h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem); margin: 0 0 22px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-fig { order: -1; }
  /* stacked, a tall crop would push everything else off the screen */
  .hero-fig img, .split img { aspect-ratio: 4 / 3; }
  .band-in { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .cta-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 18px; }
  .masthead-in { flex-wrap: wrap; gap: 12px; padding: 14px 0; }
  .masthead-tel { font-size: 0.98rem; }
  .brand { font-size: 1.3rem; }
  /* the hero photo sits above the headline once stacked, so it is cropped shallower and its
     caption set smaller - otherwise the h1 starts below the fold on a phone */
  .hero-fig img { aspect-ratio: 16 / 9; }
  .hero-fig figcaption { font-size: 0.8rem; margin-top: 10px; }
  .services li { grid-template-columns: 1fr; gap: 8px; }
  .services .num { font-size: 1.9rem; }
  .btn { width: 100%; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
