/* Page-specific styles that are not shared shell or component-isolated concerns. */

.sw-hub-page {
  gap: 2rem;
}

.sw-hub-list-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sw-hub-list-section > .sw-screen-state-shell {
  --sw-screen-state-min-height: 0;
  --sw-screen-state-padding-block: 0;
  --sw-screen-state-card-width: min(100%, 36rem);
}

.sw-hub-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 54 / 0.04);
}

.sw-home-state-section {
  --home-state-border: rgb(20 181 154 / 0.12);
}

.sw-home-state-section-error {
  --home-state-border: rgb(207 102 102 / 0.14);
}

.sw-home-state-section-empty {
  --home-state-border: rgb(77 91 173 / 0.12);
}

.sw-home-state-section > .sw-screen-state-shell,
.sw-home-state-section .sw-screen-state-shell {
  --sw-screen-state-min-height: 0;
  --sw-screen-state-padding-block: 0;
  --sw-screen-state-card-width: min(100%, 62rem);
  --sw-screen-state-copy-max-width: 34rem;
}

.sw-home-state-section .sw-screen-state-card {
  position: relative;
  overflow: hidden;
  gap: 1.15rem;
  padding: clamp(1.3rem, 2vw, 1.7rem);
  border: 1px solid var(--home-state-border);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: 0 14px 30px rgb(0 0 54 / 0.05);
}

.sw-home-state-section .sw-screen-state-copy {
  align-items: flex-start;
  text-align: left;
  max-width: 34rem;
}

.sw-home-state-section .sw-screen-state-actions {
  justify-content: flex-start;
}

.sw-home-state-section .sw-screen-state-description {
  max-width: 32rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.sw-home-state-section .sw-hub-empty-icon {
  width: 4.2rem;
  height: 4.7rem;
  border-radius: 1.35rem;
  background: color-mix(in srgb, var(--brand-primary-soft) 55%, white);
  border: 1px solid var(--home-state-border);
  box-shadow: none;
}

.sw-home-survey-toggle-button {
  min-height: 2.5rem;
  padding-inline: 1rem !important;
  border-radius: 999px !important;
  border: 1px solid rgb(0 0 54 / 0.08) !important;
  background: rgb(255 255 255 / 0.82) !important;
  color: var(--text-primary) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.sw-home-survey-toggle-button:hover,
.sw-home-survey-toggle-button:focus-visible {
  background: rgb(255 255 255 / 0.96) !important;
  border-color: rgb(20 181 154 / 0.22) !important;
  color: var(--brand-secondary) !important;
}

/* ═══════════════════════════════════════════════════════
   Home V2 — The Digital Curator
   ═══════════════════════════════════════════════════════ */

@keyframes sw-v2-enter {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sw-v2-page {
  --sw-v2-hero-pad-top: clamp(4.5rem, 10vw, 8.5rem);
  --sw-v2-hero-pad-bottom: clamp(2.5rem, 5vw, 4rem);
  --sw-v2-section-pad-y: clamp(3rem, 6vw, 5rem);
  --sw-v2-first-section-pad-top: clamp(2rem, 4vw, 3.25rem);
  gap: 0;
  width: 100vw;
  max-width: none;
  padding-inline: 0;
  align-items: stretch;
  margin-inline: calc(50% - 50vw);
}

/* ── Hero ── */
html {
  scroll-behavior: smooth;
}

.sw-v2-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(68vh, 36rem);
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding: var(--sw-v2-hero-pad-top, clamp(5rem, 12vw, 10rem))
    var(--app-pad-inline) var(--sw-v2-hero-pad-bottom, clamp(3rem, 6vw, 5rem));
}

.sw-v2-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 42rem;
  animation: sw-v2-enter 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sw-v2-hero-title,
.sw-v2-hero-title.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.sw-v2-hero-subtitle,
.sw-v2-hero-subtitle.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--brand-primary);
}

.sw-v2-hero-intro {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.sw-v2-hero-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.sw-v2-btn-primary {
  border-radius: 0.375rem !important;
  padding: 0.8rem 1.75rem !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
}

/* ── Sections shared ── */
.sw-v2-section {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding: var(--sw-v2-section-pad-y, clamp(3.5rem, 7vw, 6rem))
    var(--app-pad-inline);
  animation: sw-v2-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sw-v2-page > .sw-v2-hero + .sw-v2-section {
  padding-top: var(--sw-v2-first-section-pad-top, clamp(3.5rem, 7vw, 6rem));
}

.sw-v2-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.sw-v2-section-title,
.sw-v2-section-title.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.5rem + 1.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.sw-v2-section-subtitle {
  margin: 0;
  max-width: 36rem;
  line-height: 1.65;
}

/* ── Surveys section ── */
.sw-v2-surveys-section {
  position: relative;
  scroll-margin-top: 2rem;
}

.sw-v2-surveys-section::before,
.sw-v2-responses-section::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--surface-subtle);
  z-index: -1;
}

/* ── Survey card grid ── */
.sw-v2-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.sw-v2-card-link:first-child .sw-v2-card {
  border-left: 3px solid var(--v2-card-accent);
}

.sw-v2-card-link,
.sw-v2-card-link:link,
.sw-v2-card-link:visited {
  color: inherit;
  text-decoration: none;
  display: block;
  border-radius: 1rem;
}

.sw-v2-card-link:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 1rem;
}

.sw-v2-card {
  --v2-card-accent: var(--brand-primary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  min-height: 13rem;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 54 / 0.04);
  transition:
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.sw-v2-card-link:hover .sw-v2-card {
  transform: translateY(-0.15rem);
  background: color-mix(in srgb, var(--surface) 96%, var(--brand-primary));
  box-shadow: 0 8px 24px rgb(0 0 54 / 0.06);
}

.sw-v2-card-skeleton {
  pointer-events: none;
}

.sw-v2-card-complete {
  background: color-mix(in srgb, var(--surface) 94%, var(--brand-primary));
}

.sw-v2-card-progress {
  --v2-card-accent: var(--brand-secondary);
}

.sw-v2-card-new {
  --v2-card-accent: var(--brand-primary);
}

.sw-v2-card-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sw-v2-card-badge-new,
.sw-v2-card-badge-complete {
  background: rgb(20 181 154 / 0.14);
  color: rgb(10 107 91);
}

.sw-v2-card-badge-progress {
  background: rgb(22 142 211 / 0.14);
  color: rgb(10 87 138);
}

.sw-v2-card-title,
.sw-v2-card-title.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.18;
}

.sw-v2-card-link:hover .sw-v2-card-title {
  color: var(--v2-card-accent);
}

.sw-v2-card-description {
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sw-v2-card-action {
  margin-top: auto;
  padding-top: 0.5rem;
}

.sw-v2-card-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--v2-card-accent);
  transition: gap 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-v2-card-link:hover .sw-v2-card-action-link {
  gap: 0.6rem;
}

.sw-v2-card-toggle {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

/* ── Split section (Using Navigator) ── */
.sw-v2-split-section {
  display: flex;
  flex-direction: column;
  max-width: 90rem;
}

.sw-v2-split-copy {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 38rem;
}

.sw-v2-split-title,
.sw-v2-split-title.mud-typography,
.sw-v2-responses-title,
.sw-v2-responses-title.mud-typography,
.sw-v2-about-title,
.sw-v2-about-title.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.5rem + 1.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.sw-v2-split-paragraph {
  margin: 0;
  max-width: 34rem;
  line-height: 1.7;
}

/* ── Responses section ── */
.sw-v2-responses-section {
  position: relative;
}

.sw-v2-responses-subtitle {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  line-height: 1.65;
}

.sw-v2-responses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.sw-v2-responses-card {
  display: grid;
  grid-template-columns: 3rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.35rem;
  align-items: start;
}

.sw-v2-responses-icon-wrap {
  grid-row: 1 / 3;
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  background: rgb(20 181 154 / 0.1);
  display: grid;
  place-items: center;
}

.sw-v2-responses-icon {
  color: var(--brand-primary);
  font-size: 1.35rem !important;
}

.sw-v2-responses-card-title,
.sw-v2-responses-card-title.mud-typography {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  align-self: end;
}

.sw-v2-responses-card-copy {
  margin: 0;
  grid-column: 2;
  line-height: 1.55;
  font-size: 0.88rem;
}

.sw-v2-responses-footer {
  margin: clamp(1.5rem, 2vw, 2rem) 0 0;
  max-width: 36rem;
  line-height: 1.65;
}

/* ── About section ── */
.sw-v2-about-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.sw-v2-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.sw-v2-about-copy {
  margin: 0;
  max-width: 38rem;
  line-height: 1.7;
}

/* ── Staggered card entrance ── */
.sw-v2-card-grid .sw-v2-card-link {
  animation: sw-v2-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sw-v2-card-grid .sw-v2-card-link:nth-child(1) {
  animation-delay: 0.05s;
}
.sw-v2-card-grid .sw-v2-card-link:nth-child(2) {
  animation-delay: 0.1s;
}
.sw-v2-card-grid .sw-v2-card-link:nth-child(3) {
  animation-delay: 0.15s;
}
.sw-v2-card-grid .sw-v2-card-link:nth-child(4) {
  animation-delay: 0.2s;
}
.sw-v2-card-grid .sw-v2-card-link:nth-child(5) {
  animation-delay: 0.25s;
}
.sw-v2-card-grid .sw-v2-card-link:nth-child(6) {
  animation-delay: 0.3s;
}

/* ── Inner page hero ── */
.sw-v2-hero-inner {
  min-height: min(42vh, 22rem);
}

.sw-v2-hero-title-inner,
.sw-v2-hero-title-inner.mud-typography {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

/* ── v2 callout ── */
.sw-v2-callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  margin-top: 0.5rem;
}

.sw-v2-callout-important {
  background: rgb(255 193 7 / 0.08);
  border-left: 3px solid rgb(255 160 0);
}

.sw-v2-callout-important .sw-v2-callout-icon {
  color: rgb(255 160 0);
}

.sw-v2-callout-insight {
  background: rgb(20 181 154 / 0.08);
  border-left: 3px solid var(--brand-primary);
}

.sw-v2-callout-insight .sw-v2-callout-icon {
  color: var(--brand-primary);
}

.sw-v2-callout-icon {
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.sw-v2-callout-copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sw-v2-callout-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.sw-v2-callout-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgb(0 0 54 / 0.7);
}

.sw-v2-callout-body a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ── v2 prose list ── */
.sw-v2-prose-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 34rem;
}

.sw-v2-prose-list > li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.7;
  font-size: 0.95rem;
  color: rgb(0 0 54 / 0.7);
}

.sw-v2-prose-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--brand-primary);
}

.sw-v2-prose-list > li strong {
  color: var(--text-primary);
}

/* ── v2 link list ── */
.sw-v2-link-list > li::before {
  background: var(--brand-primary);
}

.sw-v2-link-list a,
.sw-v2-link-list a:link,
.sw-v2-link-list a:visited {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 150ms ease;
}

.sw-v2-link-list a:hover {
  color: var(--text-primary);
}

/* ── v2 inline link ── */
.sw-v2-inline-link {
  color: var(--brand-primary) !important;
  font-weight: 600;
  text-underline-offset: 0.15em;
}

/* ── Responsive ── */

@media (max-width: 768px) {

.sw-v2-page {
    --sw-v2-hero-pad-top: clamp(3rem, 8vw, 4.5rem);
    --sw-v2-hero-pad-bottom: clamp(2rem, 5vw, 3rem);
    --sw-v2-section-pad-y: clamp(2.5rem, 6vw, 4rem);
    --sw-v2-first-section-pad-top: clamp(1.75rem, 5vw, 2.75rem);
  }

  .sw-v2-hero {
    min-height: auto;
    padding-block: var(--sw-v2-hero-pad-top) var(--sw-v2-hero-pad-bottom);
  }

  .sw-v2-hero-title,
.sw-v2-hero-title.mud-typography {
    font-size: clamp(3rem, 12vw, 4.5rem);
  }

  .sw-v2-hero-title-inner,
.sw-v2-hero-title-inner.mud-typography {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .sw-v2-responses-grid {
    grid-template-columns: 1fr;
  }

  .sw-v2-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .sw-v2-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
