/* roganreilly.com — Loch & Gorse
   Gorse yellow is used ONLY for buttons that lead to the contact form. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --mist: #F4F7F8;
  --white: #FFFFFF;
  --loch: #163E4F;
  --slate: #33424A;
  --moss: #3F6B4A;
  --gorse: #F2C230;
  --gorse-deep: #E0AE14;   /* hover state of gorse buttons */
  --haze: #E3ECEF;         /* quiet tinted bands */
  --line: #D3DEE2;         /* hairlines and panel borders */
  --field: #5E7078;        /* form field borders */
  --on-loch: #F4F7F8;
  --on-loch-soft: #C9D8DE;
  --error: #A12622;

  --font: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --step-0: 1.125rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);

  --gutter: 1rem;
  --max: 72rem;
  --measure: 65ch;
  --space-section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --radius: 6px;
}

@media (min-width: 40em) {
  :root { --gutter: 2rem; }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--slate);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0;
  color: var(--loch);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: var(--step-2); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); line-height: 1.3; }

p, ul, ol, dl { margin: 0; }

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

a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.on-loch :focus-visible { outline-color: var(--gorse); }

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

.flow > * + * { margin-top: 1rem; }

.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--loch);
  color: var(--on-loch);
  font-weight: 700;
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.75rem; outline-color: var(--gorse); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* Contact buttons: the only place Gorse is used */
.btn-contact {
  background: var(--gorse);
  border-color: var(--gorse);
  color: var(--loch);
}
.btn-contact:hover { background: var(--gorse-deep); border-color: var(--gorse-deep); }

.btn-quiet {
  background: transparent;
  border-color: var(--loch);
  color: var(--loch);
}
.btn-quiet:hover { background: var(--loch); color: var(--on-loch); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.text-link { font-weight: 700; color: var(--loch); }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}

/* Logo: the tagline inside it stays readable at these heights */
.brand {
  display: inline-block;
  padding-block: 0.25rem;
  border-radius: 4px;
}
.brand img { display: block; width: auto; height: 3.5rem; }
@media (min-width: 40em) { .brand img { height: 4rem; } }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  padding: 0;
  list-style: none;
}
.nav a:not(.btn) {
  display: inline-block;
  padding-block: 0.7rem;
  color: var(--loch);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--line); }
.nav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--moss); }

@media (max-width: 39.99em) {
  .brand { width: 100%; }
  .nav { width: 100%; justify-content: space-between; gap: 0.25rem 0.75rem; font-size: 1rem; }
  .nav ul { gap: 0 0.9rem; }
  .nav .btn { padding-inline: 0.9rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--space-section); }

.section-tint { background: var(--haze); }

.on-loch {
  background: var(--loch);
  color: var(--on-loch);
}
.on-loch h2, .on-loch h3 { color: var(--on-loch); }
.on-loch a:not(.btn) { color: var(--on-loch); }

.section-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.section-head > * + * { margin-top: 0.75rem; }

/* ---------- Home: hero ---------- */

.hero { padding-top: clamp(3rem, 2rem + 5vw, 6.5rem); }

.hero h1 { max-width: 16ch; }

.hero-sub {
  max-width: 58ch;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
}

.hills {
  display: block;
  margin-bottom: -1px;
  width: 100%;
  height: clamp(48px, 7vw, 110px);
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
}

/* ---------- Home: sound familiar ---------- */

.familiar { padding-top: clamp(1.5rem, 1rem + 2vw, 3rem); }

.pains {
  display: grid;
  gap: 1.25rem 3rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 48em) { .pains { grid-template-columns: 1fr 1fr; } }

.pains li {
  position: relative;
  padding-left: 1.75rem;
  max-width: 34rem;
}
.pains li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.9rem;
  height: 2px;
  background: #8FB1BF;
}

.reassure {
  max-width: 44ch;
  margin-top: 3rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--on-loch);
}

/* ---------- Home: services summary ---------- */

.service-grid {
  display: grid;
  gap: 2.5rem 3.5rem;
}
@media (min-width: 48em) { .service-grid { grid-template-columns: 1fr 1fr; } }

.service-summary {
  padding-top: 1.25rem;
  border-top: 2px solid var(--moss);
}
.service-summary p { margin-top: 0.6rem; max-width: 52ch; }

/* ---------- Home: how it works (a real sequence) ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 2rem;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.75rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--loch);
  color: var(--on-loch);
  font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.25rem - 1px);
  top: 2.75rem;
  bottom: -1.75rem;
  width: 2px;
  background: var(--line);
}
.steps strong { display: block; color: var(--loch); font-size: var(--step-1); line-height: 1.3; margin-bottom: 0.35rem; }

@media (min-width: 60em) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .steps li { padding-left: 0; padding-top: 3.75rem; }
  .steps li::before { top: 0; }
  .steps li:not(:last-child)::after {
    left: 3.25rem;
    right: -1.25rem;
    top: calc(1.25rem - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* ---------- Home: why charities work with me ---------- */

.reasons {
  display: grid;
  gap: 2rem 3.5rem;
}
@media (min-width: 48em) { .reasons { grid-template-columns: 1fr 1fr; } }
.reasons dt { color: var(--loch); font-weight: 700; font-size: var(--step-1); }
.reasons dd { margin: 0.35rem 0 0; max-width: 46ch; }

/* ---------- Home: recent work ---------- */

.feature {
  display: grid;
  gap: 1rem 3.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--moss);
}
@media (min-width: 48em) { .feature { grid-template-columns: 1fr 1.4fr; } }
.feature h3 { font-size: var(--step-2); }
.feature h3 a { color: var(--loch); text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.note { font-style: italic; }

/* ---------- Closing call to action (every page) ---------- */

.cta-band .wrap { max-width: var(--max); }
.cta-band h2 { max-width: 22ch; }
.cta-band p { max-width: 52ch; margin-top: 1rem; color: var(--on-loch-soft); font-size: var(--step-1); line-height: 1.5; }

/* ---------- Inner page intro ---------- */

.page-intro { padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem); }
.page-intro p { max-width: 58ch; margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; }

/* ---------- Services page ---------- */

.service {
  display: grid;
  gap: 1rem 3rem;
  padding-block: 2.25rem;
  border-top: 2px solid var(--moss);
}
.service:last-of-type { padding-bottom: 0; }
@media (min-width: 48em) { .service { grid-template-columns: 1fr 13rem; } }

.service-wide { grid-template-columns: 1fr; }

.service .for { margin-top: 0.5rem; font-size: var(--step-1); line-height: 1.45; }

.ticks { margin-top: 1.25rem; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li + li { margin-top: 0.5rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--moss);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.price {
  align-self: start;
  color: var(--loch);
  font-size: var(--step-1);
  font-weight: 700;
}
@media (min-width: 48em) { .price { text-align: right; padding-top: 0.2rem; } }

.plans {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 48em) { .plans { grid-template-columns: 1fr 1fr; } }

.plan {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.plan .price { margin-top: 0.35rem; text-align: left; padding-top: 0; }
.plan p:last-child { margin-top: 0.75rem; }

.terms { margin-top: 1.25rem; }

/* FAQ disclosures */
.faq { max-width: 48rem; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 1.1rem 2.5rem 1.1rem 0;
  color: var(--loch);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 1rem;
  height: 2px;
  background: var(--moss);
  transition: transform 0.2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq .answer { padding-bottom: 1.25rem; max-width: var(--measure); }
.faq details[open] .answer { animation: reveal 0.25s ease-out; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-0.35rem); }
  to { opacity: 1; transform: none; }
}

/* ---------- Work page ---------- */

.case {
  display: grid;
  gap: 2rem 3.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--moss);
}
@media (min-width: 48em) { .case { grid-template-columns: 1fr 1fr; } }
.case h2 { font-size: var(--step-2); }
.case h3 { margin-bottom: 0.25rem; }
.case .spaced { margin-top: 2rem; }

/* ---------- About page ---------- */

.about {
  display: grid;
  gap: 2rem 4rem;
  align-items: start;
}
@media (min-width: 48em) { .about { grid-template-columns: minmax(14rem, 22rem) 1fr; } }
.about img {
  width: 100%;
  max-width: 22rem;
  border-radius: 8px;
  background: var(--haze);
}
.about .flow > * + * { margin-top: 1.25rem; }
.about .lead { color: var(--loch); font-size: var(--step-2); font-weight: 700; line-height: 1.2; }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  gap: 3rem 4rem;
  align-items: start;
}
@media (min-width: 56em) { .contact-grid { grid-template-columns: 2fr 1fr; } }

.form { max-width: 40rem; }
.field + .field, .field + fieldset, fieldset + .field { margin-top: 1.5rem; }

.form label, .form legend {
  display: block;
  color: var(--loch);
  font-weight: 700;
}
.optional { font-weight: 400; color: var(--slate); }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  background: var(--white);
  color: var(--slate);
  border: 2px solid var(--field);
  border-radius: var(--radius);
  font: inherit;
  line-height: 1.4;
}
.form textarea { min-height: 10rem; resize: vertical; }
.form ::placeholder { color: #66777F; opacity: 1; }

.form fieldset { margin: 1.5rem 0 0; padding: 0; border: 0; }
.checks { margin-top: 0.5rem; display: grid; gap: 0.25rem; }
.check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--slate);
  font-weight: 400;
  cursor: pointer;
}
/* Needs '.form' in front so it beats '.form label { display: block }' above */
.form .check { display: flex; align-items: center; font-weight: 400; color: var(--slate); }
.check input {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  accent-color: var(--loch);
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: var(--error);
  font-weight: 700;
}
.has-error input, .has-error textarea { border-color: var(--error); }

.form-submit { margin-top: 2rem; }
.form-small { margin-top: 1rem; font-size: 1rem; }

/* Honeypot: off-screen for everyone, ignored by assistive tech */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  max-width: 40rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-left: 6px solid var(--moss);
  border-radius: var(--radius);
  font-size: var(--step-1);
  line-height: 1.5;
}
.notice-error { border-left-color: var(--error); }
.notice h2 { font-size: var(--step-1); color: var(--error); }
.notice ul { margin-top: 0.5rem; padding-left: 1.25rem; font-size: var(--step-0); }
.notice a { color: var(--error); font-weight: 700; }

.aside {
  padding-top: 1.25rem;
  border-top: 2px solid var(--moss);
}
.aside h2 { font-size: var(--step-1); }
.aside p { margin-top: 0.5rem; }
.aside a { font-weight: 700; }

/* ---------- Privacy / plain text pages ---------- */

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-1); margin-top: 2.25rem; }
.prose p { margin-top: 0.6rem; }
.prose .updated { margin-top: 0; font-style: italic; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 3rem; }
.site-footer .wrap {
  display: grid;
  gap: 1.75rem 3rem;
}
@media (min-width: 48em) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; }
}
.footer-logo { display: block; width: auto; height: 3.5rem; }
.footer-email { display: inline-block; margin-top: 1rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  list-style: none;
}
.footer-links a { display: inline-block; padding-block: 0.6rem; }

/* On the home page the closing band and footer share Loch; a hairline separates them */
.site-footer.joined { padding-top: 0; }
.site-footer.joined .wrap { border-top: 1px solid #2D5567; padding-top: 3rem; }

/* ---------- Motion preferences ---------- */

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

.flush-top { padding-top: 0; }

@media (max-width: 47.99em) {
  .about img { max-width: 15rem; }
}

/* ---------- Health check highlight ----------
   Gorse is used only here (one box on Home and Services) and on contact buttons. */

.highlight {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  background: var(--gorse);
  color: var(--loch);
  border-radius: 8px;
}
.highlight h2 { color: var(--loch); max-width: 22ch; }
.highlight p { max-width: 60ch; }
.highlight .flow > * + * { margin-top: 1rem; }
.highlight .ticks li::before { border-color: var(--loch); }
.highlight .price { color: var(--loch); }

/* A contact button sitting on Gorse can't also be Gorse, so it turns Loch */
.highlight .btn-contact {
  background: var(--loch);
  border-color: var(--loch);
  color: var(--on-loch);
}
.highlight .btn-contact:hover { background: #0E2C39; border-color: #0E2C39; }

.health-home { padding-block: var(--space-section) 0; }
@media (min-width: 56em) {
  .health-home .highlight {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 1rem 3.5rem;
    align-items: start;
  }
}

.service-highlight {
  display: grid;
  gap: 1rem 3rem;
  margin-bottom: 2.25rem;
}
.service-highlight:has(+ .health-note) { margin-bottom: 0; }
.health-note { margin: 0.75rem 0 2.25rem; }
@media (min-width: 48em) { .service-highlight { grid-template-columns: 1fr 13rem; } }
.service-highlight .for { margin-top: 0.5rem; font-size: var(--step-1); line-height: 1.45; }
.service-highlight .actions { grid-column: 1 / -1; margin-top: 0.5rem; }

.small-print { margin-top: 1.25rem; font-size: 1rem; }
.terms + .terms { margin-top: 0.5rem; }
.paying .reasons { margin-top: 1.5rem; }
.terms, .small-print { max-width: var(--measure); }
.health-home .highlight > .flow { margin-top: 1rem; }
@media (min-width: 56em) { .health-home .highlight > .flow { margin-top: 0; } }
