/* Homepage only — templates/layouts/homepage.html. Not part of public.css. */

:root {
  --ink: #111111;
  --mute: #5a5a5a;
  --line: #e6e4e1;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

[x-cloak] {
  display: none !important;
}

html:has(body.myodo-home) {
  color-scheme: light;
  overflow-x: clip;
}

body.myodo-home {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  color-scheme: light;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.myodo-home > main {
  flex: 1;
}

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

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.font-display {
  font-family: Newsreader, Georgia, serif;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Nav: always visible, fixed, 1200px. Bar treatment fades in on scroll. */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 12px 24px 0;
}

.site-nav-bar {
  width: 100%;
  max-width: 1200px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 18px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 0 0 transparent;
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.site-nav.is-on .site-nav-bar {
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.07);
}

.nav-logo img {
  display: block;
  height: 22px;
  width: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 640px) {
  .nav-actions {
    gap: 12px;
  }
}

/* Buttons: invert on hover. Arrow rotates up-right → right. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 0.28s var(--ease),
    color 0.28s var(--ease);
}

.btn-sm {
  height: 36px;
  padding: 0 14px 0 16px;
  font-size: 14px;
}

.btn-ghost {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: var(--ink);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}

.btn:hover {
  background: #fff;
  color: var(--ink);
}

.btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  transform-origin: 50% 50%;
  transition: transform 0.35s var(--ease);
}

.btn:hover .btn-icon svg {
  transform: rotate(45deg);
}

/* Hero: one big line of type and a button. Visible immediately. */
.hero {
  padding: 128px 0 88px;
}

.hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-sub {
  margin: 14px 0 0;
  max-width: 28em;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--mute);
}

@media (min-width: 1100px) {
  .hero h1 {
    white-space: nowrap;
  }
}

.hero .btn {
  margin-top: 32px;
}

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  aspect-ratio: 1;
  background: #f2f1ee;
  border: 1px solid #d8d5d1;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
  cursor: zoom-in;
}

.shot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  transition: transform 0.55s var(--ease);
}

.shot:hover img {
  transform: scale(1.04);
}

/* Ticker */
.ticker {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.ticker-mask {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 72px;
  padding-right: 72px;
}

.ticker-group img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
}

.section-head {
  display: flex;
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.product h2,
.features h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.product {
  padding: 56px 0 40px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.preview h3 {
  margin: 10px 2px 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--mute);
}

.features {
  padding: 72px 0 64px;
}

.features .section-head {
  margin-bottom: 0;
}

.matrix-cell {
  border-bottom: 1px solid var(--line);
}

.matrix-cell:last-child {
  border-bottom: 1px solid var(--line);
}

.matrix summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.matrix summary::-webkit-details-marker,
.matrix summary::marker {
  display: none;
  content: "";
}

.matrix summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.matrix h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.matrix h3::after {
  content: "+";
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.matrix-cell[open] h3::after {
  content: "−";
}

.matrix ul {
  margin: 0;
  padding: 2px 0 22px;
  list-style: none;
}

.matrix li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 0 12px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}

.matrix li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: calc((1lh - 5px) / 2);
  background: var(--ink);
}

.matrix li:last-child {
  padding-bottom: 0;
}

.lightbox {
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 28px 28px 20px;
  border: 1px solid #d8d5d1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(17, 17, 17, 0.28);
}

.lightbox::backdrop {
  background: rgba(17, 17, 17, 0.62);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #f2f1ee;
}

.lightbox-caption {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.lightbox-close {
  align-self: flex-end;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.lightbox-close:hover {
  opacity: 0.5;
}

.migrate {
  padding: 72px 0 120px;
}

.migrate-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 24px 56px;
  align-items: start;
}

.migrate-label {
  margin: 0;
  padding-top: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}

.migrate-copy h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.migrate-copy p {
  margin: 18px 0 0;
  max-width: 32em;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.5;
  color: var(--mute);
}

.migrate-copy .btn {
  margin-top: 28px;
}

.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--mute);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer-links {
  display: flex;
  gap: 20px;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Auth: same fields and buttons, centered card. */
.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 64px;
}

.auth-stack {
  width: 100%;
  max-width: 24rem;
}

.auth-stack-wide {
  max-width: 28rem;
}

.auth h1 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-align: center;
}

.auth-lede {
  margin: 10px 0 0;
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--mute);
  text-align: center;
}

.auth-note,
.auth-banner {
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--mute);
  text-align: center;
}

.auth-banner {
  color: #8a1f11;
}

.auth-card {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.07);
}

.auth-card .auth-lede,
.auth-card .auth-note {
  text-align: left;
}

.auth-card .auth-lede {
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field label,
.auth-label-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-inline-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}

.auth-inline-link:hover {
  color: var(--ink);
}

.auth-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.auth-input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.auth-input-error {
  border-color: #8a1f11;
}

.auth-error {
  margin: 6px 0 0;
  font-size: 14px;
  color: #8a1f11;
}

.auth-hint {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--mute);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--mute);
}

.auth-check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--ink);
}

.auth-check a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-check a:hover {
  opacity: 0.6;
}

.auth-form .btn {
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.auth-foot {
  margin-top: 20px;
  font-size: 15px;
  color: var(--mute);
  text-align: center;
}

.auth-foot a {
  font-weight: 500;
  color: var(--ink);
}

.auth-foot a:hover {
  opacity: 0.6;
}

.home-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 16px;
}

.home-consent-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 40rem;
  margin: 0 auto;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
}

.home-consent-card p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mute);
}

.home-consent-card a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-consent-card a:hover {
  color: var(--ink);
}

.home-consent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.home-consent-decline {
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.home-consent-decline:hover {
  color: var(--ink);
}

@media (min-width: 640px) {
  .home-consent {
    padding: 24px;
  }

  .home-consent-card {
    flex-direction: row;
    align-items: center;
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 92px;
  }

  .product {
    padding-top: 48px;
  }

  .features {
    padding: 56px 0 40px;
  }

  .migrate {
    padding: 48px 0 88px;
  }

  .migrate-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .migrate-label {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-nav {
    padding: 8px 12px 0;
  }

  .site-nav-bar {
    height: 48px;
    padding: 0 8px 0 14px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .section-head h2,
  .product h2,
  .features h2 {
    font-size: 1.65rem;
  }

  .auth {
    padding: 88px 16px 48px;
  }

  .auth-stack,
  .auth-stack-wide {
    max-width: 100%;
  }

  .auth-card {
    padding: 20px;
  }

  .lightbox {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 16px 16px 14px;
  }

  .home-consent {
    padding: 12px;
  }
}

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

  .site-nav-bar {
    transition: none;
  }

  .ticker-track {
    animation: none;
  }

  .ticker-mask {
    overflow-x: auto;
  }

  .btn,
  .btn-icon svg,
  .shot img {
    transition: none;
  }

  .shot:hover img {
    transform: none;
  }
}
