/* ==========================================================================
   Affordable Care Huon Valley — stylesheet
   ========================================================================== */

:root {
  /* Brand palette — drawn from the Affordable Care logo (blues) */
  --navy: #16305c;
  --navy-soft: #1f4a85;
  --blue: #2265b0;
  --blue-light: #4f8fd1;
  --sky: #d8ebfb;
  --sky-soft: #eef6fd;

  /* Neutrals — warm off-white base, matching a friendly care-industry feel */
  --bg: #fbfaf6;
  --bg-alt: #f2f5f8;
  --card: #ffffff;
  --border: #dfe3ea;
  --foreground: #16283f;
  --muted-foreground: #55677e;

  --radius: 0.9rem;
  --radius-sm: 0.6rem;
  --shadow: 0 8px 24px -12px rgba(22, 48, 92, 0.18);
  --shadow-lg: 0 20px 48px -16px rgba(22, 48, 92, 0.28);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

section[id] { scroll-margin-top: 84px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--navy-soft); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px -12px rgba(22, 48, 92, 0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.65rem 1.5rem;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 86px; width: auto; }

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  margin: 0 auto;
}
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
  position: relative;
}
.nav a:hover { color: var(--navy); }

.header-actions {
  display: none;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.phone-link svg { width: 16px; height: 16px; color: var(--blue); }
.phone-link:hover { color: var(--blue); }

.nav-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 1.25rem;
  width: min(260px, calc(100vw - 2.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem 1.25rem 1.1rem;
  transform-origin: top right;
  transform: scale(0.92) translateY(-6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s step-end;
  z-index: 200;
}
.mobile-nav.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0s;
}
.mobile-nav a {
  padding: 0.65rem 0;
  font-weight: 500;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}
.mobile-nav .btn { margin-top: 0.75rem; }
.mobile-nav .phone-link { padding-top: 0.75rem; border-bottom: none; }

@media (min-width: 1024px) {
  .nav { display: flex; }
  .header-actions { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
  min-height: 620px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(100deg, rgba(11, 24, 46, 0.93) 0%, rgba(11, 24, 46, 0.78) 30%, rgba(11, 24, 46, 0.35) 58%, rgba(11, 24, 46, 0.05) 78%, rgba(11, 24, 46, 0) 100%),
    url("../assets/background1.png");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.hero-inner { max-width: 960px; }
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}
.hero .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.hero .btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.hero-serving {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.hero-serving-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-right: 0.2rem;
}
.chip {
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .hero { min-height: 0; }
}

/* ---------- Section shell ---------- */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: var(--navy);
  margin: 0 0 0.9rem;
  line-height: 1.2;
}
.section-sub { color: var(--muted-foreground); font-size: 1.05rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2.5rem;
}
.about-copy p { color: var(--muted-foreground); font-size: 1.05rem; }
.about-cards {
  display: grid;
  gap: 1.25rem;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.about-card p { color: var(--muted-foreground); font-size: 0.96rem; }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
  .about-cards { grid-template-columns: 1fr; }
}

/* ---------- Services (flip cards) ---------- */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.services-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-top: 2rem;
}

.service-card {
  height: 280px;
  perspective: 1400px;
  cursor: pointer;
  border-radius: var(--radius);
}
.service-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.service-card:hover .service-card-inner,
.service-card.is-flipped .service-card-inner,
.service-card:focus-visible .service-card-inner {
  transform: rotateY(180deg);
}

.service-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.service-face-front {
  background-color: var(--navy);
  background-image: var(--service-image);
  background-size: cover;
  background-position: center bottom;
  box-shadow: var(--shadow);
}
.service-card-1 .service-face-front { --service-image: url("../assets/services/PersonalCare7x9.png"); }
.service-card-2 .service-face-front { --service-image: url("../assets/services/SocialSupport7x9.png"); }
.service-card-3 .service-face-front { --service-image: url("../assets/services/Respite7x9.png"); }
.service-card-4 .service-face-front { --service-image: url("../assets/services/Transport7x9.png"); }
.service-card-5 .service-face-front { --service-image: url("../assets/services/DomesticAssistance7x9.png"); }
.service-card-6 .service-face-front { --service-image: url("../assets/services/HomeMaintenance7x9.png"); }
.service-card-7 .service-face-front { --service-image: url("../assets/services/Gardening7x9.png"); }

.service-face-back {
  transform: rotateY(180deg);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.6rem 1.75rem;
  display: flex;
  flex-direction: column;
}
.service-face-back h3 {
  font-size: 1.02rem;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.service-face-back > p { color: var(--muted-foreground); font-size: 0.88rem; margin-bottom: 0.9rem; }
.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  overflow-y: auto;
}
.service-list li {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  padding-left: 1.1rem;
  position: relative;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(7) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 320px;
  }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service-card:nth-child(7) {
    grid-column: 2;
    max-width: none;
  }
}

/* ---------- Why / Local / Certifications ---------- */
.why-section { background: var(--navy); color: #fff; }
.why-grid {
  display: grid;
  gap: 2.5rem;
}
.why-section .eyebrow { color: var(--sky); }
.why-section .section-title { color: #fff; }
.why-copy p { color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; }
.why-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
}
.why-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  font-size: 0.98rem;
}
.why-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--blue-light);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  padding: 3px;
}
.why-section .btn-primary { background: #fff; color: var(--navy); }
.why-section .btn-primary:hover { background: var(--sky); }

.cert-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 2rem;
  align-self: start;
}
.cert-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 1.1rem;
}
.cert-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }
.cert-list li {
  font-size: 0.94rem;
  padding-left: 1.2rem;
  position: relative;
  color: rgba(255, 255, 255, 0.88);
}
.cert-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue-light);
  font-weight: 700;
}
.cert-note { font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }

@media (min-width: 900px) {
  .why-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 0;
}
.stars { color: var(--blue-light); letter-spacing: 0.15em; margin-bottom: 0.9rem; font-size: 0.95rem; }
.testimonial-card blockquote {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  color: var(--foreground);
  line-height: 1.55;
}
.testimonial-card figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

@media (min-width: 720px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}
.contact-info {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--blue-light);
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.contact-info-item span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.15rem;
}
.contact-info-item a,
.contact-info-item p {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}
.contact-info-item a:hover { color: var(--sky); }
.contact-serving {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.1rem;
  margin-top: 0.2rem;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row-half {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 480px) {
  .form-row-half { grid-template-columns: 1fr 1fr; }
}
.form-row label { font-size: 0.86rem; font-weight: 600; color: var(--navy); }
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--foreground);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--blue-light);
  outline-offset: 1px;
  border-color: var(--blue);
}
.form-row textarea { resize: vertical; }
.form-note {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 1.2em;
  color: var(--blue);
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 340px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: #0f2140; color: rgba(255, 255, 255, 0.85); }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding: 4rem 1.5rem 3rem;
}
.footer-logo {
  height: 58px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); max-width: 320px; }
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1rem;
}
.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.6rem;
}
.footer-col a:hover { color: #fff; }
.footer-col p span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.1rem;
}
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom-inner p { margin: 0; }

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
}

/* ---------- Mobile call FAB ---------- */
.call-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.call-fab svg { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .call-fab { display: none; }
}
