/* DMH K9 — site styles
   Mobile-first. The mockups are 390px (mobile) and 1440px (desktop);
   type and spacing scale between the two, layout switches at 900px. */

:root {
  --orange: #F36F25;
  --orange-dark: #C4521A;
  --black: #000000;
  --bone: #F6F1ED;
  --ink: #141413;
  --muted: #C9C2BB;
  --line: #333333;

  --serif: Georgia, "Times New Roman", serif;
  --display: Sancreek, Georgia, serif;
  --sans: Barlow, Arial, sans-serif;

  /* 20px at 390, 72px at 1440, then content stays 1296px wide */
  --pad: max(clamp(20px, 5vw, 72px), calc((100vw - 1296px) / 2));
  --section-y: clamp(56px, 6.6667vw, 96px);
  --col-gap: clamp(40px, 5.5556vw, 80px);

  --fs-body: clamp(17px, 15.886px + 0.2857vw, 20px);
  --fs-quote: clamp(19px, 17.886px + 0.2857vw, 22px);
  --fs-label: clamp(13px, 12.257px + 0.1905vw, 15px);
  --fs-link: clamp(15px, 14.257px + 0.1905vw, 17px);
  --fs-h2: clamp(30px, 24.057px + 1.5238vw, 46px);
  --fs-h2-wide: clamp(34px, 29.543px + 1.1429vw, 46px);
  --fs-h3: clamp(24px, 21.771px + 0.5714vw, 30px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  background: var(--bone);
  color: var(--ink);
}

main { flex: 1 0 auto; }

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

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
}

p {
  font-size: var(--fs-body);
  line-height: 1.55;
}

a { color: var(--orange); }
a:hover { color: var(--orange-dark); }

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

@media (max-width: 899.98px) {
  .d-only { display: none !important; }
  br.d-br { display: none; }
}

@media (min-width: 900px) {
  .m-only { display: none !important; }
}

/* ---------- Shared pieces ---------- */

.label {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

.quote {
  font-size: var(--fs-quote);
  font-style: italic;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--black);
  background: var(--orange);
  padding: 16px 24px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.btn:hover { color: var(--black); background: #FF8640; }

.btn--outline {
  color: var(--bone);
  background: transparent;
  border: 2px solid var(--bone);
  padding: 14px 22px;
}

.btn--outline:hover { color: var(--black); background: var(--bone); }

.link-rule {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: var(--fs-link);
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid var(--orange);
  padding-bottom: 4px;
}

.link-rule:hover { color: var(--orange-dark); }

.on-black .link-rule { color: var(--bone); }
.on-black .link-rule:hover { color: var(--orange); }

@media (min-width: 900px) {
  .btn { font-size: 18px; padding: 18px 36px; }
  .btn--outline { padding: 16px 34px; }
}

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

.site-header {
  position: relative;
  z-index: 10;
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black);
}

.brand {
  display: flex;
  align-items: center;
  height: 44px;
}

.brand img { height: 32px; width: auto; }

.menu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px var(--pad) 28px;
  background: var(--black);
  border-top: 1px solid var(--line);
}

.site-nav.is-open { display: flex; }

.site-nav a {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  padding: 16px 0;
}

.site-nav a:hover { color: var(--orange); }

.site-nav a.btn {
  margin-top: 12px;
  padding: 16px 24px;
  color: var(--black);
}

.site-nav a.btn:hover { color: var(--black); }

/* Without JavaScript the menu button can't open anything, so show the links. */
html:not(.js) .site-header { height: auto; flex-wrap: wrap; padding-top: 10px; }
html:not(.js) .menu-toggle { display: none; }
html:not(.js) .site-nav { position: static; display: flex; width: 100%; border-top: 0; padding: 0 0 20px; }

@media (min-width: 900px) {
  .site-header,
  html:not(.js) .site-header { height: 88px; flex-wrap: nowrap; padding-top: 0; }

  .brand { height: 56px; }
  .brand img { height: 44px; }

  .menu-toggle { display: none; }

  .site-nav,
  .site-nav.is-open,
  html:not(.js) .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    width: auto;
    padding: 0;
    background: none;
    border-top: 0;
  }

  .site-nav a { padding: 0; }

  .site-nav a.btn {
    margin-top: 0;
    font-size: 17px;
    padding: 14px 26px;
  }
}

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

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px var(--pad);
  background: var(--black);
}

.footer-links {
  order: -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-links a {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
}

.footer-links a:hover { color: var(--orange); }
.footer-links a.accent { color: var(--orange); }
.footer-links a.accent:hover { color: #FF8640; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-brand img { height: 24px; width: auto; flex-shrink: 0; }

.footer-brand p {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

@media (min-width: 900px) {
  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px var(--pad);
  }

  .footer-links {
    order: 0;
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

  .footer-brand {
    gap: 24px;
    padding-top: 0;
    border-top: 0;
  }

  .footer-brand img { height: 32px; }

  .footer-brand p {
    font-family: var(--sans);
    font-size: 15px;
    line-height: normal;
  }
}

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

.hero {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  background: var(--black);
}

.hero-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%; /* zoomed and anchored to the top so the dog sits lower */
  object-fit: cover;
  object-position: 50% 85%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 35%, rgba(0,0,0,0.1) 62%, rgba(0,0,0,0.78) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px var(--pad);
}

.hero h1 {
  margin-bottom: auto;
  padding-bottom: 48px;
  font-size: clamp(40px, 28.114px + 3.0476vw, 72px);
  line-height: 1.05;
  color: var(--bone);
}

.hero .rule {
  width: 64px;
  height: 5px;
  flex-shrink: 0;
  background: var(--orange);
}

.hero-sub {
  font-size: clamp(17px, 14.4px + 0.6667vw, 24px);
  line-height: 1.45;
  color: var(--bone);
}

.hero .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.hero .btn-row .btn { flex: 1; }

@media (min-width: 900px) {
  .hero {
    min-height: clamp(620px, 75vh, 820px);
  }

  .hero-img img {
    height: 100%;
    object-position: 50% 70%;
  }

  .hero::after { background: rgba(0,0,0,0.5); }

  .hero-inner {
    gap: 24px;
    padding: 64px var(--pad) 80px;
  }

  .hero h1 {
    max-width: 900px;
    letter-spacing: 0.01em;
  }

  .hero .rule {
    width: 96px;
    height: 6px;
  }

  .hero-sub {
    max-width: 760px;
    line-height: 1.4;
  }

  .hero .btn-row {
    gap: 16px;
    margin-top: 8px;
  }

  .hero .btn-row .btn { flex: none; }
}

/* ---------- Home: the name ---------- */

.name {
  padding: var(--section-y) var(--pad);
  background: var(--bone);
}

.name-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.name-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.name h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  color: var(--ink);
}

.name-head img {
  width: 104px;
  height: 140px;
  flex-shrink: 0;
  object-fit: contain;
}

.name-badge img {
  width: 520px;
  height: auto;
}

@media (min-width: 900px) {
  .name {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--col-gap);
    align-items: center;
  }

  .name-text { gap: 24px; }

  .name h2 { line-height: 1.1; }

  .name-badge {
    display: flex;
    justify-content: center;
  }
}

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

.home-services {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.3333vw, 48px);
  padding: var(--section-y) var(--pad);
  background: var(--black);
}

.home-services-head,
.home-services-title {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-services h2 {
  font-size: var(--fs-h2-wide);
  line-height: 1.1;
  color: var(--bone);
}

.home-services-intro {
  font-size: clamp(16px, 14.886px + 0.2857vw, 19px);
  line-height: 1.5;
  color: var(--muted);
}

.service-cards {
  display: grid;
  gap: 22px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 3px solid var(--orange);
}

.service-card h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 18.514px + 0.381vw, 24px);
  font-weight: 600;
  line-height: normal;
  text-transform: none;
  color: var(--bone);
}

.service-card p {
  font-size: clamp(15px, 14.257px + 0.1905vw, 17px);
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 640px) {
  .service-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (min-width: 900px) {
  .home-services-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }

  .home-services-title { gap: 16px; }

  .home-services-intro { max-width: 520px; }

  .service-card {
    gap: 12px;
    padding-top: 20px;
  }
}

@media (min-width: 1100px) {
  .service-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Home: contact ---------- */

.home-contact {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: var(--section-y) var(--pad);
  background: var(--bone);
  color: var(--black);
}

.home-contact-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-contact h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
}

.home-contact-text p { line-height: 1.5; }

.home-contact h2 .line { display: block; }

.home-contact h2 .line + .line { margin-top: 24px; }

.details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-contact .details { margin-top: 8px; }

.detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.detail .label { font-size: clamp(13px, 12.629px + 0.0952vw, 14px); }

.detail a.big {
  font-family: var(--serif);
  font-size: clamp(24px, 21.771px + 0.5714vw, 30px);
  font-weight: 600;
  text-decoration: none;
  color: var(--black);
}

.detail a.big.email { font-size: clamp(22px, 19.029px + 0.7619vw, 30px); }

.detail a.big:hover { color: var(--orange-dark); }

.detail p:not(.label) {
  line-height: 1.45;
  color: var(--black);
}

@media (min-width: 900px) {
  .home-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--col-gap);
  }

  .home-contact-text {
    align-items: flex-start;
    gap: 20px;
  }

  /* Size the heading to its column so the first line stays on one line */
  .home-contact-text { container-type: inline-size; }

  .home-contact h2 {
    font-size: min(var(--fs-h2), max(34px, 7.45cqi));
    line-height: 1.1;
  }

  .home-contact h2 .line + .line { margin-top: 0; }

  .home-contact-text p { max-width: 560px; }

  .home-contact-text .btn { margin-top: 8px; }

  .home-contact .details {
    justify-content: center;
    gap: 28px;
    margin-top: 0;
  }

  .detail { gap: 6px; }
}

/* ---------- Page heads (About, Services, Contact, Members) ---------- */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 48px var(--pad) 0;
}

.page-head h1 {
  font-size: clamp(36px, 25.6px + 2.6667vw, 64px);
  line-height: 1.05;
  color: var(--ink);
}

.page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-head-row img {
  width: 84px;
  height: 112px;
  flex-shrink: 0;
  object-fit: contain;
}

@media (min-width: 900px) {
  .page-head {
    gap: 16px;
    padding-top: 72px;
  }
}

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

.story {
  padding: 28px var(--pad) 56px;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 608 / 820;
  object-fit: cover;
  object-position: 50% 60%;
}

.trainer {
  padding: var(--section-y) var(--pad);
  background: var(--black);
  color: var(--bone);
}

.trainer-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.trainer-title {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trainer h2 {
  font-size: var(--fs-h2-wide);
  line-height: 1.1;
}

.trainer h3 {
  font-size: var(--fs-h3);
  line-height: 1.15;
}

.chapter {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trainer-photo {
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 350 / 440;
  object-fit: cover;
  object-position: 50% 20%;
}

.trainer-photo.suit { object-position: 50% 30%; }

@media (min-width: 900px) {
  .story {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--col-gap);
    align-items: start;
    padding: 48px var(--pad) 96px;
  }

  .prose { gap: 20px; }

  .trainer {
    display: grid;
    grid-template-columns: minmax(0, 560fr) minmax(0, 656fr);
    gap: var(--col-gap);
    align-items: start;
  }

  .trainer-photos {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .trainer-photo {
    max-width: none;
    aspect-ratio: 560 / 700;
  }

  .trainer-body { gap: 40px; }

  .trainer-title { gap: 16px; }

  .chapter { gap: 18px; }
}

/* ---------- Closing band ---------- */

.band {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 56px var(--pad);
  background: var(--bone);
  color: var(--black);
}

.band.on-black {
  background: var(--black);
  color: var(--bone);
}

.band h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
}

@media (min-width: 900px) {
  .band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 72px var(--pad);
  }

  .band h2 { line-height: 1.1; }

  .band .btn { flex-shrink: 0; }
}

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

.services-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 48px var(--pad) 8px;
}

.services-head-title {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.services-head h1 {
  font-size: clamp(40px, 31.086px + 2.2857vw, 64px);
  line-height: 1.05;
  color: var(--ink);
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px var(--pad) 56px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 3px solid var(--orange);
}

.service img {
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 260;
  object-fit: cover;
}

.service img.pos-40 { object-position: 50% 40%; }

.service .link-rule { font-size: clamp(15px, 14.629px + 0.0952vw, 16px); }

.service-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service h2 {
  font-size: clamp(28px, 23.543px + 1.1429vw, 40px);
  line-height: 1.12;
  color: var(--ink);
}

@media (min-width: 900px) {
  .services-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    padding: 72px var(--pad) 56px;
  }

  .services-head-title { gap: 16px; }

  .services-intro { max-width: 560px; }

  .service-list {
    gap: 56px;
    padding: 0 var(--pad) 96px;
  }

  .service {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
    padding-top: 56px;
  }

  .service img { aspect-ratio: 612 / 420; }

  .service:nth-child(even) img { order: 2; }

  .service-text {
    gap: 18px;
    justify-content: center;
  }

  .service h2 { line-height: 1.1; }
}

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

.contact-head {
  padding-bottom: 24px;
}

.contact-head h1 {
  font-size: clamp(34px, 22.857px + 2.8571vw, 64px);
  line-height: 1.08;
}

.contact-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 8px var(--pad) 48px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form[hidden] { display: none; }

.form .btn { font-size: 18px; padding: 18px 36px; }

.form-row {
  display: grid;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background-color: #FFFFFF;
  border: 2px solid var(--muted);
  border-radius: 0;
}

.field textarea {
  height: 140px;
  padding: 14px 16px;
  line-height: normal;
  resize: vertical;
}

.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%23141413' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M2 2l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--orange);
}

/* Honeypot: hidden from people, visible to bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form .btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-error {
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background: #FFFFFF;
  border: 2px solid var(--orange);
}

.form-error[hidden] { display: none; }

.form-error:focus { outline: 0; }

.form-error a {
  color: var(--ink);
  font-weight: 600;
}

.form-done {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  border-top: 3px solid var(--orange);
}

.form-done[hidden] { display: none; }

.form-done:focus { outline: 0; }

.form-done p {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: bold;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: var(--black);
}

.contact-details .detail { gap: 6px; }

.contact-details .detail .label { font-size: 15px; }

.contact-details .detail a.big,
.contact-details .detail a.big.email {
  font-size: clamp(20px, 18.514px + 0.381vw, 24px);
}

.contact-details .detail p:not(.label) { font-size: 18px; }

.follow {
  display: flex;
  gap: 24px;
}

.follow a {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid var(--orange);
  padding-bottom: 3px;
}

.follow a:hover { color: var(--orange-dark); }

.contact-hand {
  align-self: flex-end;
  width: 210px;
  height: 280px;
  margin-top: 12px;
  object-fit: contain;
}

@media (min-width: 900px) {
  .contact-head { padding-bottom: 48px; }

  .contact-head h1 { line-height: 1.05; }

  .contact-head p { max-width: 820px; }

  .contact-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: clamp(48px, 6.6667vw, 96px);
    align-items: start;
    padding: 0 var(--pad) 96px;
  }

  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form .btn { align-self: flex-start; }
}

/* ---------- Members placeholder ---------- */

.placeholder {
  padding-bottom: var(--section-y);
}
