/* ==========================================
   Design tokens
   ========================================== */

:root {
  --navy: #14263d;
  --navy-light: #233e60;
  --blue: #086b78;
  --teal: #087f8c;
  --gold: #ffd166;
  --muted: #526177;
  --border: #dce5ec;
  --surface: #f3f7fb;
  --white: #ffffff;
  --radius: 20px;
}

/* ==========================================
   Base styles
   ========================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--navy);
  background: #fbfcfe;
  line-height: 1.65;
}

a {
  color: var(--blue);
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

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

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.35rem;
}

section {
  padding: 76px 0;
  scroll-margin-top: 24px;
}

section h2 {
  text-wrap: balance;
}

section:not(.hero):not(.contact) .eyebrow {
  color: var(--teal);
}

#pricing h2::after,
#designs h2::after,
#care-plan-heading::after,
#questionnaire-heading::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #e5aa35);
}

/* ==========================================
   Layout and utilities
   ========================================== */

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.narrow {
  max-width: 850px;
}

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

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 750px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ==========================================
   Buttons
   ========================================== */

.button {
  display: inline-block;
  padding: 13px 21px;
  border: 1px solid var(--teal);
  border-radius: 11px;
  background: var(--teal);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 14px rgb(8 127 140 / 12%);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

/* :where() keeps this rule easy to override for themed buttons. */
.button:where(:not(:disabled)):hover {
  transform: translateY(-2px);
  background: #066773;
  border-color: #066773;
  box-shadow: 0 9px 20px rgb(8 127 140 / 20%);
}

.button-secondary {
  background: transparent;
  color: var(--navy);
}

.button-secondary:where(:not(:disabled)):hover {
  background: #e3eaf4;
  border-color: var(--navy);
  color: var(--navy);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

/* ==========================================
   Skip link
   ========================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 12px;
  background: var(--white);
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================
   Header and navigation
   ========================================== */

.site-header {
  border-top: 5px solid var(--teal);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 4px 24px rgb(20 38 61 / 5%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-block: 22px;
}

.brand {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  position: relative;
  padding-block: 6px;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

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

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

/* ==========================================
   Hero
   ========================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 110px 0;
  background:
    radial-gradient(
      ellipse at 95% 10%,
      rgb(45 212 191 / 22%),
      transparent 45%
    ),
    linear-gradient(120deg, #112238 0%, #1c3b59 65%, #175661 100%);
  color: var(--white);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -100px;
  border: 70px solid rgb(255 209 102 / 12%);
}

.hero::after {
  width: 280px;
  height: 280px;
  right: 8%;
  bottom: -180px;
  border: 45px solid rgb(94 234 212 / 13%);
}

.hero .eyebrow {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid rgb(255 209 102 / 45%);
  border-radius: 999px;
  background: rgb(255 209 102 / 10%);
  color: var(--gold);
}

.hero h1 {
  max-width: 900px;
  text-wrap: balance;
}

.hero-intro {
  max-width: 700px;
  font-size: 1.2rem;
  color: #dce8f3;
}

.hero .small {
  color: #dce8f3;
}

.hero .button {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}

.hero .button:where(:not(:disabled)):hover {
  background: #ffdc89;
  border-color: #ffdc89;
}

.hero .button-secondary {
  background: rgb(255 255 255 / 7%);
  border-color: #b8d2e2;
  color: var(--white);
  box-shadow: none;
}

.hero .button-secondary:where(:not(:disabled)):hover {
  background: rgb(255 255 255 / 15%);
  border-color: var(--white);
  box-shadow: none;
}

.hero a:focus-visible {
  outline-color: var(--gold);
}

/* ==========================================
   Shared cards and grids
   ========================================== */

.pricing-grid,
.care-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 32px rgb(20 38 61 / 6%);
}

.card .small {
  margin-top: 18px;
  margin-bottom: 0;
}

/* ==========================================
   Pricing
   ========================================== */

#pricing {
  background:
    radial-gradient(
      ellipse at 0% 100%,
      rgb(8 127 140 / 6%),
      transparent 55%
    ),
    var(--white);
}

.pricing-grid .card {
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--teal);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pricing-grid .card:nth-child(2) {
  border-top-color: #e5aa35;
}

.pricing-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgb(20 38 61 / 10%);
}

.price {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
}

.feature-list {
  padding-left: 22px;
  margin-bottom: 26px;
}

.feature-list li + li {
  margin-top: 10px;
}

.feature-list li::marker {
  color: var(--teal);
}

/* ==========================================
   Starter designs
   ========================================== */

.designs {
  background: linear-gradient(135deg, #edf5f7, #f1f2fb);
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.design-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgb(20 38 61 / 7%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.design-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgb(20 38 61 / 12%);
}

.design-preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 240px;
  padding: 28px;
}

.design-preview::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  top: -70px;
  right: -60px;
  border: 30px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  pointer-events: none;
}

.design-preview h3 {
  margin-bottom: 20px;
  font-size: 1.85rem;
}

.design-preview .eyebrow {
  font-size: 0.7rem;
}

.local-preview {
  background: linear-gradient(135deg, #dcefe0, #b9ddc8);
  color: #173e2a;
}

.professional-preview {
  background: linear-gradient(135deg, #dce8fa, #b8ccec);
  color: #20395d;
}

.personal-preview {
  background: linear-gradient(135deg, #fbe2ec, #efbfd3);
  color: #653149;
}

.preview-label {
  padding: 8px 13px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: rgb(255 255 255 / 45%);
  font-size: 0.85rem;
  font-weight: 700;
}

.design-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  padding: 26px;
}

.design-content p {
  flex: 1;
  color: var(--muted);
}

.demo-link-label {
  color: inherit;
}

.design-note {
  margin-top: 24px;
  margin-bottom: 0;
}

/* ==========================================
   Website Care Plan
   ========================================== */

#website-care-plan {
  background: var(--white);
}

.care-price {
  color: #076b77;
  font-size: 1.5rem;
  font-weight: 700;
}

.care-grid {
  margin-bottom: 24px;
}

.care-card {
  background: linear-gradient(145deg, #ffffff, #f2f8fa);
}

.care-card ul,
.care-terms ul {
  padding-left: 22px;
  margin-bottom: 0;
}

.care-card li + li,
.care-terms li + li {
  margin-top: 16px;
}

.care-card p:last-child {
  margin-top: 20px;
  margin-bottom: 0;
}

.care-terms {
  border-left: 5px solid var(--teal);
}

.care-action {
  margin-top: 26px;
}

/* ==========================================
   Contact
   ========================================== */

.contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #14263d, #175661);
  color: var(--white);
}

.contact h2 {
  max-width: 800px;
}

.contact p {
  max-width: 700px;
  color: #dce5f3;
}

.contact .button {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.contact .button:where(:not(:disabled)):hover {
  background: #ffdc89;
  border-color: #ffdc89;
  color: var(--navy);
}

.contact a:focus-visible {
  outline-color: var(--gold);
}

/* ==========================================
   Questionnaire and form controls
   ========================================== */

.questionnaire {
  background: linear-gradient(145deg, #f0f7f8, #f4f5fb);
}

.notice {
  padding: 16px 20px;
  margin-bottom: 26px;
  border: 1px solid #aacfd3;
  border-radius: 10px;
  background: #e5f3f4;
}

.questionnaire-form {
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 40px rgb(20 38 61 / 8%);
}

.field {
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #98a7bb;
  border-radius: 8px;
  background: #fcfdff;
  color: var(--navy);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  background: var(--white);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.field-hint {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-submit {
  margin-top: 28px;
}

.form-status {
  margin: 20px 0 0;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

/* ==========================================
   Footer
   ========================================== */

.site-footer {
  padding: 26px 0;
  border-top: 4px solid var(--teal);
  background: #102136;
  color: #cedae7;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* ==========================================
   Responsive layouts
   ========================================== */

@media (max-width: 850px) {
  .design-grid {
    grid-template-columns: 1fr;
  }

  .design-preview {
    min-height: 200px;
  }
}

@media (max-width: 650px) {
  section {
    padding: 54px 0;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-logo {
    width: 210px;
  }

  .site-nav {
    gap: 12px 18px;
  }

  .hero {
    padding: 72px 0;
  }

  .hero::before {
    right: -240px;
  }

  .hero .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero .button {
    width: 100%;
  }

  .pricing-grid,
  .care-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px;
  }
}

/* ==========================================
   Reduced-motion accessibility
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .site-nav a,
  .site-nav a::after,
  .pricing-grid .card,
  .design-card {
    transition: none;
  }

  .button:where(:not(:disabled)):hover,
  .pricing-grid .card:hover,
  .design-card:hover {
    transform: none;
  }
}

/* ==========================================
   Public template library
   ========================================== */

.template-library {
  min-height: 60vh;
  background: linear-gradient(135deg, #edf5f7, #f1f2fb);
}

.template-tools {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.template-results {
  margin-bottom: 24px;
  color: var(--muted);
}

.template-empty {
  margin-top: 24px;
}

/* Override the card's display:flex when search hides it. */
.template-library [hidden] {
  display: none;
}

.site-nav a[aria-current="page"] {
  color: var(--teal);
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (max-width: 650px) {
  .template-tools {
    grid-template-columns: 1fr;
  }
}

.template-card-title {
  margin-bottom: 18px;
  font-size: 1.35rem;
  letter-spacing: normal;
}
/* ==========================================
   Dashboard sign-in link
   ========================================== */

.site-nav {
  align-items: center;
}

.site-nav a.sign-in-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--teal);
  border-radius: 10px;
  background: var(--teal);
  color: var(--white);
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgb(8 127 140 / 12%);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

/* Remove the standard navigation underline from this button. */
.site-nav a.sign-in-link::after {
  content: none;
}

.site-nav a.sign-in-link:hover {
  border-color: #066773;
  background: #066773;
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a.sign-in-link {
    transition: none;
  }
}
