/* Hughes Family Services — marketing site
   Colors from the official HFS and HFS AI logos. */

:root {
  --navy: #012758;
  --navy-deep: #041738;
  --navy-mid: #023a70;
  --gold: #c3954a;
  --gold-ink: #8a5a16;
  --gold-soft: #d4ae6e;
  --cream: #f6f3ec;
  --cream-dark: #ece6d8;
  --paper: #fbfaf7;
  --ink: #1b2430;
  --muted: #5a6573;
  --line: rgba(1, 39, 88, 0.12);
  --teal: #2db8b0;
  --teal-bright: #5ed9d0;
  --teal-text: #8ee8e1;
  --peach: #ffe1b5;
  --spark: #fa8c2b;
  --white: #ffffff;
  --ai-muted: #c5d0dc;
  --shadow: 0 16px 40px rgba(1, 39, 88, 0.1);
  --radius: 16px;
  --header-h: 5.75rem;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ease: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--navy-mid); }

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

.panel-ai a:focus-visible,
.btn-ai:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--teal-bright);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--white);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}

.brand:hover { color: var(--navy); }

.brand-mark {
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--navy);
}

.brand-tagline {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* ---------- Hero split ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.panel {
  display: flex;
  position: relative;
  overflow: hidden;
}

.panel-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 36rem;
  padding: clamp(2.25rem, 4.6vw, 4.75rem) clamp(1.6rem, 4.2vw, 4.25rem);
}

.panel-billing {
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(195, 149, 74, 0.11), transparent 55%),
    var(--cream);
  color: var(--ink);
  justify-content: stretch;
}

.panel-billing .panel-inner {
  margin-right: auto;
}

.panel-ai {
  background:
    radial-gradient(700px 460px at 85% 10%, rgba(45, 184, 176, 0.22), transparent 58%),
    radial-gradient(480px 360px at 15% 90%, rgba(250, 140, 43, 0.1), transparent 55%),
    var(--navy-deep);
  color: var(--white);
}

.panel-ai .panel-inner {
  margin-left: auto;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.panel-ai .eyebrow {
  color: var(--teal-bright);
}

.panel h2,
.about h2,
.books h2,
.contact h2 {
  margin: 0 0 1rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.panel-billing h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.35rem + 2.1vw, 3.15rem);
  font-weight: 600;
  color: var(--navy);
  max-width: 18ch;
}

.panel-ai h2 {
  font-family: var(--font);
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  max-width: 16ch;
}

.lead {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 38ch;
}

.panel-ai .lead {
  color: var(--ai-muted);
}

.panel-mark {
  margin: 0 0 1.15rem;
}

.panel-mark img {
  width: clamp(8.25rem, 14vw, 10.5rem);
  height: auto;
  aspect-ratio: 1;
}

.panel-billing .panel-mark img {
  filter: drop-shadow(0 10px 22px rgba(1, 39, 88, 0.1));
}

.panel-ai .panel-mark img {
  border-radius: 50%;
  filter: drop-shadow(0 10px 28px rgba(45, 184, 176, 0.28));
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.benefits li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.45;
}

.panel-billing .benefits li { color: var(--ink); }
.panel-ai .benefits li { color: #e8eef4; }

.benefit-icon {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(1, 39, 88, 0.07);
  color: var(--navy);
}

.benefit-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.panel-ai .benefit-icon {
  background: rgba(45, 184, 176, 0.14);
  color: var(--teal-bright);
}

.actions {
  margin: 0;
  padding-top: 2rem;
}

@media (min-width: 900px) {
  .panel { min-height: calc(100vh - var(--header-h)); }
  .panel-inner { flex: 1; }
  .actions { margin-top: auto; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease), color var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-billing {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(1, 39, 88, 0.2);
}

.btn-billing:hover,
.btn-billing:focus-visible {
  background: var(--navy-mid);
  color: var(--white);
}

.btn-ai {
  background: var(--teal);
  color: var(--navy-deep);
  box-shadow: 0 8px 22px rgba(45, 184, 176, 0.28);
}

.btn-ai:hover,
.btn-ai:focus-visible {
  background: var(--teal-bright);
  color: var(--navy-deep);
}

.btn-ai-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-ai-outline:hover,
.btn-ai-outline:focus-visible {
  background: var(--navy);
  color: var(--white);
}

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

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) 1.5rem;
}

.section-head { max-width: 38rem; margin-bottom: 2.25rem; }

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.about { background: var(--paper); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}

.about-photo {
  margin: 0;
  position: relative;
  isolation: isolate;
  padding: 0 0.85rem 0.85rem 0;
}

.about-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  border-radius: 20px;
  object-fit: cover;
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}

.about-photo::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 0;
  bottom: 0;
  border: 2px solid var(--gold);
  border-radius: 22px;
  z-index: 0;
  pointer-events: none;
}

.about-copy h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 1.3rem + 1.5vw, 2.6rem);
  color: var(--navy);
  max-width: 18ch;
}

.about-copy p { margin: 0 0 1rem; color: var(--ink); }
.about-copy p:last-child { margin-bottom: 0; color: var(--muted); }

/* ---------- Books ---------- */

.books {
  background:
    linear-gradient(180deg, #efebe3 0%, #e8e2d5 100%);
}

.books h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 1.3rem + 1.5vw, 2.6rem);
  color: var(--navy);
}

.book-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(1, 39, 88, 0.08);
  border: 1px solid rgba(1, 39, 88, 0.06);
  transition: transform var(--ease), box-shadow var(--ease);
}

.book-card:hover,
.book-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(1, 39, 88, 0.14);
  color: inherit;
}

.book-card img,
.bundle-art img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #d9d3c7;
}

.bundle-art {
  position: relative;
}

.bundle-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.book-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.15rem 1.3rem;
  flex: 1;
}

.book-body h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--navy);
  font-weight: 700;
}

.book-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.book-meta {
  margin-top: auto !important;
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.price {
  font-weight: 800;
  color: var(--navy) !important;
  font-size: 1.05rem !important;
}

.cta-text {
  font-weight: 700;
  font-size: 0.88rem !important;
  color: var(--navy) !important;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.contact { background: var(--paper); }

.contact h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 1.3rem + 1.5vw, 2.6rem);
  color: var(--navy);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.contact p { color: var(--muted); }

.contact-email {
  margin: 1.25rem 0 0.35rem !important;
}

.contact-email a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  word-break: break-word;
}

.contact-email a:hover { text-decoration: underline; }

.contact-place {
  margin: 0 !important;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy) !important;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0;
}

.contact-actions .btn { width: 100%; }

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

.site-footer {
  background: var(--navy-deep);
  color: #c5d0dc;
  padding: 1.75rem 1.5rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--paper);
  border-radius: 50%;
}

.footer-name {
  margin: 0;
  color: var(--white);
  font-weight: 700;
}

.footer-brand p { margin: 0; font-size: 0.88rem; }

.copyright {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
  :root { --header-h: auto; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 1.1rem 0.7rem;
  }
  .brand-tagline { font-size: 0.74rem; }

  .site-nav ul {
    justify-content: flex-start;
    gap: 0.1rem 0.95rem;
  }

  .hero { grid-template-columns: 1fr; }

  .panel-inner,
  .panel-ai .panel-inner {
    max-width: 40rem;
    margin: 0;
  }

  .about-grid,
  .contact-grid,
  .book-grid {
    grid-template-columns: 1fr;
  }

  .about-photo { padding: 0; }
  .about-photo img { max-width: 20rem; }
  .about-photo::after { display: none; }

  .contact-actions { align-items: flex-start; }
  .contact-actions .btn { width: auto; min-width: 16rem; }
}

@media (max-width: 560px) {
  .brand-tagline { display: none; } /* shown later? keep if it wraps ok - actually useful, try keeping */

  .brand-mark { width: 3rem; height: 3rem; }

  .panel-inner {
    padding: 2.25rem 1.2rem 2.5rem;
  }

  .contact-actions .btn { width: 100%; min-width: 0; }

  .footer-inner { align-items: flex-start; }
}

/* Keep the tagline on small screens — it is the point of the header.
   Only hide if it would collide; wrapping is fine. */
@media (max-width: 560px) {
  .brand-tagline { display: block; }
}


@media (max-width: 599px) {
  .book-card {
    flex-direction: row;
    align-items: stretch;
  }
  .book-card > img,
  .bundle-art {
    flex: 0 0 7.35rem;
    width: 7.35rem;
    max-width: 7.35rem;
  }
  .book-card > img,
  .bundle-art img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 11rem;
    object-fit: cover;
  }
  .bundle-badge {
    top: 0.4rem;
    left: 0.4rem;
    font-size: 0.58rem;
    padding: 0.22rem 0.42rem;
    letter-spacing: 0.06em;
  }
  .book-body {
    padding: 0.85rem 0.95rem 0.95rem;
    gap: 0.3rem;
  }
  .book-body h3 { font-size: 1rem; }
  .book-body p { font-size: 0.85rem; }
  .book-meta { padding-top: 0.5rem; }
  .bundle-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover,
  .book-card:hover { transform: none; }
}

::selection {
  background: var(--navy);
  color: var(--white);
}

.panel-ai ::selection {
  background: var(--teal);
  color: var(--navy-deep);
}
