/* DoneYet marketing homepage — light theme, Splitwise-inspired structure */

.home-page {
  --text: #0e0e0e;
  --background: #f7f3eb;
  --surface: #ffffff;
  --elevated: #fbf7ee;
  --muted: #756b5f;
  --muted-strong: #50463c;
  --border: #d8cebd;
  --border-strong: #c4b59a;
  --tint: #ff5a1f;
  --tint-muted: #c2410c;
  --charcoal: #2c2824;
  --ink: #1a1714;
  --olive: #3f6b4f;
  --shadow: rgba(14, 14, 14, 0.1);
  --font-display: "Montserrat", "Segoe UI", sans-serif;
  --font-ui: "Lato", "Segoe UI", sans-serif;
  --page-max: 72rem;

  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.home-page a {
  color: inherit;
  text-decoration: none;
}

.home-page a:hover {
  text-decoration: none;
}

/* —— Top bar —— */
.home-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.home-topbar-inner {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0.95rem clamp(1.1rem, 4vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.4rem;
  color: var(--text);
}

.home-brand img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
}

.home-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.home-nav-link {
  min-height: 2.65rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  color: var(--tint);
  font-weight: 650;
  font-size: 1.02rem;
}

.home-nav-link:hover {
  background: color-mix(in srgb, var(--tint) 10%, transparent);
}

.home-page a.home-nav-cta {
  min-height: 2.65rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  background: var(--tint);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.02rem;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--tint) 28%, transparent);
}

.home-page a.home-nav-cta:hover {
  filter: brightness(1.04);
  color: #ffffff !important;
}

/* —— Hero —— */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.25rem);
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #f7f3eb;
  background-image:
    linear-gradient(
      180deg,
      rgba(247, 243, 235, 0.15) 0%,
      rgba(247, 243, 235, 0.45) 55%,
      #f7f3eb 100%
    ),
    url('./auth-facets.svg');
  background-size: auto, 1200px auto;
  background-position: center top, center top;
  background-repeat: no-repeat, repeat-x;
  opacity: 0.5;
}

@media (min-width: 768px) {
  .home-hero::before {
    background-size: auto, 1500px auto;
    opacity: 0.48;
  }
}

.home-hero-inner {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.home-hero-top {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

@media (min-width: 960px) {
  .home-hero-top {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  }
}

.home-hero-copy {
  min-width: 0;
  container-type: inline-size;
  container-name: hero-copy;
  position: relative;
  z-index: 1;
}

.home-hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 6.8cqi, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.home-hero-line {
  display: block;
  white-space: nowrap;
}

.home-rotate {
  display: inline-block;
  min-width: 7.8ch;
  color: var(--tint);
}

.home-rotate-word {
  display: inline-block;
  color: var(--tint);
}

.home-rotate-word.is-swap {
  animation: home-word-swap 0.45s ease;
}

.home-rotate-icons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  width: max-content;
  margin-top: 1.15rem;
  white-space: nowrap;
}

.home-rotate-icon {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--icon-color) 22%, #fff);
  color: var(--icon-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--icon-color) 28%, transparent);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.home-rotate-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
}

.home-rotate-icon.is-active {
  opacity: 1;
  background: color-mix(in srgb, var(--icon-color) 28%, #fff);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--icon-color) 40%, transparent),
    0 8px 18px color-mix(in srgb, var(--icon-color) 28%, transparent);
}

.home-rotate-icon:hover {
  opacity: 0.9;
}

@keyframes home-word-swap {
  from {
    opacity: 0;
    transform: translateY(0.35em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.home-hero-lead {
  margin: 1.15rem 0 0;
  max-width: 36ch;
  color: var(--muted-strong);
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  line-height: 1.5;
}

.home-perk-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-perk-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.1rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--shadow) 22%, transparent);
}

.home-perk-card-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--icon-color) 20%, #fff);
  color: var(--icon-color);
}

.home-perk-card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.home-perk-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  font-family: var(--font-display);
}

.home-hero-cta {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.home-page a.home-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.85rem 2.1rem;
  border-radius: 12px;
  background: var(--tint);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--tint) 32%, transparent);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.home-page a.home-btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.home-platforms {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
}

.home-platforms-label,
.home-platforms-join {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.home-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
}

.home-platform:hover {
  color: var(--text);
}

.home-platform-logo {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted-strong);
  display: block;
  flex: 0 0 auto;
}

.home-hero-visual {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.home-hero-visual img {
  width: 100%;
  max-width: 36rem;
  height: auto;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--surface);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--shadow) 40%, transparent),
    0 24px 56px color-mix(in srgb, var(--shadow) 35%, transparent);
}

/* —— 2×2 phone feature panels —— */
.home-screens {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .home-screens {
    grid-template-columns: 1fr 1fr;
  }
}

.home-screen-panel {
  position: relative;
  min-height: 34rem;
  padding: 2.25rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  color: #f7f3eb;
}

.home-screen-panel--charcoal {
  background-color: var(--charcoal);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M0 52 L30 0 L60 52 L30 104 Z'/%3E%3Cpath d='M60 52 L90 0 L120 52 L90 104 Z'/%3E%3Cpath d='M30 0 L60 52 L90 0'/%3E%3Cpath d='M30 104 L60 52 L90 104'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 520px auto;
  background-position: center, center top;
  background-repeat: no-repeat, repeat;
}

.home-screen-panel--tint {
  background-color: var(--tint);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.12' stroke-width='1'%3E%3Cpath d='M0 52 L30 0 L60 52 L30 104 Z'/%3E%3Cpath d='M60 52 L90 0 L120 52 L90 104 Z'/%3E%3Cpath d='M30 0 L60 52 L90 0'/%3E%3Cpath d='M30 104 L60 52 L90 104'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 520px auto;
  background-position: center, center top;
  background-repeat: no-repeat, repeat;
}

.home-screen-panel--olive {
  background-color: var(--olive);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='1'%3E%3Cpath d='M0 52 L30 0 L60 52 L30 104 Z'/%3E%3Cpath d='M60 52 L90 0 L120 52 L90 104 Z'/%3E%3Cpath d='M30 0 L60 52 L90 0'/%3E%3Cpath d='M30 104 L60 52 L90 104'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 520px auto;
  background-position: center, center top;
  background-repeat: no-repeat, repeat;
}

.home-screen-panel--ink {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M0 52 L30 0 L60 52 L30 104 Z'/%3E%3Cpath d='M60 52 L90 0 L120 52 L90 104 Z'/%3E%3Cpath d='M30 0 L60 52 L90 0'/%3E%3Cpath d='M30 104 L60 52 L90 104'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 520px auto;
  background-position: center, center top;
  background-repeat: no-repeat, repeat;
}

.home-screen-copy {
  max-width: 22rem;
  margin-bottom: 1.35rem;
}

.home-screen-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-screen-copy p {
  margin: 0.55rem 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
  opacity: 0.9;
}

.home-phone {
  width: min(17.5rem, 72vw);
  margin-top: auto;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.28);
  background: #111;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
}

.home-phone img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 900px) {
  .home-screen-panel {
    min-height: 40rem;
    padding-top: 2.75rem;
  }

  .home-phone {
    width: min(20rem, 42%);
  }
}

/* —— Pro —— */
.home-pro {
  padding: clamp(3rem, 7vw, 5rem) 0;
  background: var(--elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-pro-inner {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.25rem);
}

.home-eyebrow {
  margin: 0 0 0.65rem;
  color: var(--tint-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-pro-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.home-pro-lead {
  margin: 0.75rem 0 0;
  max-width: 42rem;
  color: var(--muted-strong);
  font-size: 1.1rem;
}

.home-pro-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .home-pro-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.home-pro-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--shadow) 28%, transparent);
}

.home-pro-card h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-pro-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.home-pro-cta-row {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* —— Download —— */
.home-download {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  text-align: center;
  background:
    radial-gradient(700px 280px at 50% 0%, color-mix(in srgb, var(--tint) 12%, transparent), transparent 70%),
    var(--background);
}

.home-download-inner {
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.25rem);
}

.home-download h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.home-download p {
  margin: 0.7rem auto 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
  max-width: 34rem;
}

.home-download .store-badges {
  margin-top: 1.6rem;
}

/* —— Footer —— */
.home-footer {
  background: var(--charcoal);
  color: #ebe4d6;
  padding: 2.75rem 0 1.75rem;
}

.home-footer-inner {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.25rem);
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .home-footer-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    align-items: start;
  }
}

.home-footer-brand .home-brand {
  color: #f7f3eb;
  font-size: 1.2rem;
}

.home-footer-brand .home-brand img {
  width: 40px;
  height: 40px;
}

.home-footer-brand p {
  margin: 0.65rem 0 0;
  color: #b8ab9a;
  max-width: 22ch;
}

.home-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-footer-nav h3 {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8d7c;
}

.home-footer-nav a {
  display: block;
  margin-bottom: 0.45rem;
  color: #ebe4d6;
  font-weight: 500;
  font-size: 0.98rem;
}

.home-footer-nav a:hover {
  color: #fff;
}

.home-footer-copy {
  width: min(var(--page-max), 100%);
  margin: 2rem auto 0;
  padding: 1.25rem clamp(1.1rem, 4vw, 2.25rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9a8d7c;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 900px) {
  .home-perk-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-brand img {
    width: 48px;
    height: 48px;
  }

  .home-hero-copy h1 {
    font-size: clamp(1.28rem, 6.5vw, 1.7rem);
    font-weight: 700;
  }

  .home-rotate-icon {
    width: 2.85rem;
    height: 2.85rem;
  }

  .home-rotate-icon svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .home-perk-cards {
    grid-template-columns: 1fr;
  }

  .home-hero-cta {
    align-items: stretch;
  }

  .home-btn-primary {
    width: 100%;
  }

  .home-footer-nav {
    grid-template-columns: 1fr 1fr;
  }
}

/* Soft entrance for hero */
@media (prefers-reduced-motion: no-preference) {
  .home-hero-copy,
  .home-hero-visual {
    animation: home-rise 0.7s ease both;
  }

  .home-hero-visual {
    animation-delay: 0.08s;
  }

  .home-perk-card {
    animation: home-fade 0.55s ease both;
  }

  .home-perk-card:nth-child(2) { animation-delay: 0.05s; }
  .home-perk-card:nth-child(3) { animation-delay: 0.1s; }
  .home-perk-card:nth-child(4) { animation-delay: 0.15s; }

  .home-screen-panel {
    animation: home-fade 0.6s ease both;
  }

  .home-screen-panel:nth-child(2) { animation-delay: 0.05s; }
  .home-screen-panel:nth-child(3) { animation-delay: 0.1s; }
  .home-screen-panel:nth-child(4) { animation-delay: 0.15s; }
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
