/* Native document scrolling preserves the redesigned landing layout. */
/* Static content uses an arrow without preventing text selection. Interactive
   elements retain the familiar pointer or text-editing cursor. */
body {
  cursor: default;
}

a[href],
button:not(:disabled),
select,
label[for] {
  cursor: pointer;
}

input,
textarea,
[contenteditable='true'] {
  cursor: text;
}

html {
  --landing-header: 70px;
  scroll-padding-top: var(--landing-header);
}

.hero,
.sections .sec,
.sections .cta-final {
  scroll-margin-top: 0;
  box-sizing: border-box;
}

.hero {
  min-height: calc(100svh - var(--landing-header));
}

.hero,
.sections .sec,
.sections .cta-final {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sections {
  padding: 0;
}

.sections .sec {
  padding-block: clamp(36px, 6svh, 72px) 56px;
  position: relative;
}

.sections .sec + .sec::before {
  content: '';
  position: absolute;
  inset: 0 15% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.hero-grid {
  width: 100%;
  padding-block: 48px 64px;
}

.hero::before {
  top: 50%;
  transform: translate(-50%, -50%);
}

.sections .cta-final {
  margin-block: 0;
  padding-bottom: 64px;
}

footer {
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
}

/* These photographs show different compositions, so each keeps its full
   frame and caption. Narrow phones stack the pair for readable faces. */
#ai-photo .transform {
  width: min(100%, 720px);
  max-width: none;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

#ai-photo .tf-figure {
  min-width: 0;
}

#ai-photo .tf-frame {
  box-shadow: 0 20px 44px -24px var(--shadow-strong);
}

#ai-photo .tf-arrow {
  width: 32px;
  height: 32px;
  rotate: none;
}

#ai-photo .tf-caption {
  margin-top: 12px;
  text-wrap: balance;
}

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.gallery-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink);
  background: var(--bg-card);
  font-size: 20px;
  cursor: pointer;
}

.gallery-controls button:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (min-width: 1100px) {
  #ai-photo {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
    grid-template-rows: auto auto auto;
    column-gap: 48px;
    align-content: safe center;
  }
  #ai-photo > .sec-title {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    text-align: left;
    margin-inline: 0;
  }
  #ai-photo > .sec-sub {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    margin-bottom: 0;
  }
  #ai-photo > .transform {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }
  #ai-photo > .tf-why {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    margin: 20px 0 0;
  }
}

@media (max-width: 620px) {
  #ai-photo .sec-sub {
    font-size: 1rem;
    line-height: 1.6;
  }
  .sections .sec {
    padding-block: 32px 56px;
  }
  .sec-sub {
    margin-bottom: 24px;
  }
  .ai-card {
    padding: 22px;
  }
  .ai-card .chip {
    margin-bottom: 12px;
  }
  .steps {
    gap: 12px;
  }
  .step {
    padding: 20px;
  }
  .step-n {
    font-size: 28px;
    margin-bottom: 10px;
  }
  .topbar .nav {
    flex-wrap: wrap;
  }
  .controls {
    margin-left: auto;
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (max-width: 480px) {
  #ai-photo .transform {
    width: min(100%, 260px);
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #ai-photo .tf-arrow {
    justify-self: center;
    rotate: 90deg;
  }
}

.sections .cta-final {
  border-radius: var(--card-radius);
  border: 0;
  align-items: center;
  gap: 0;
}
/* Give the closing invitation a focal point and keep its action at a
   deliberate width rather than stretching it across the entire scene. */
.cta-final::before {
  content: '';
  display: block;
  flex: none;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  background: url('/logo.svg') center / contain no-repeat;
}
.cta-final h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 4vw, 3.25rem);
}
.cta-final > .btn {
  align-self: center;
  width: auto;
  max-width: 100%;
  margin-top: 4px;
}
footer {
  display: flex;
  flex-direction: column;
  padding-top: 36px;
  border-top: 0;
  background: var(--bg);
}
footer > .wrap {
  flex: none;
  width: 100%;
  max-width: 800px;
  padding-inline: 24px;
  margin-inline: auto;
}
footer .foot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Stretch sibling cards to the tallest content in their shared row. */
  align-items: stretch;
  gap: 24px;
}
footer .foot-grid > div {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--bg-card);
}
footer .foot-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
}
footer .foot-links {
  gap: 16px;
}
footer .foot-links a {
  min-height: 28px;
  overflow-wrap: anywhere;
}
footer .copy {
  text-align: center;
  margin-top: 24px;
}
footer .analytics-settings {
  display: block;
  margin: 12px auto 0;
}
@media (max-width: 620px) {
  footer .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  footer .foot-grid > div {
    padding: 20px 22px;
  }
  footer .foot-title {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }
  footer .foot-links {
    gap: 8px;
  }
  footer .foot-grid > div:last-child .foot-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  footer .foot-grid > div:last-child .foot-links {
    grid-template-columns: minmax(0, 1fr);
  }
}
.type {
  font: inherit;
  cursor: pointer;
}
.type:hover {
  background: var(--green-soft);
  transform: translateY(-5px);
}
@media (max-width: 620px) {
  /* Keep the original single-row header height. A compact native language
     picker leaves room for the visible sign-in label even at 320px. */
  .topbar .nav {
    display: flex;
    flex-wrap: nowrap;
    min-height: 66px;
    box-sizing: border-box;
    gap: 6px;
    align-items: center;
  }
  .topbar .controls {
    display: flex;
    gap: 5px;
    flex: none;
    margin-left: auto;
  }
  .topbar .brand {
    min-width: 0;
    font-size: 17px;
    gap: 6px;
  }
  .topbar .brand-mark {
    width: 26px;
    height: 26px;
    flex: none;
  }
  .topbar .signin {
    height: 34px;
    padding-inline: 10px;
    font-size: 12px;
  }
  .topbar .lang {
    display: none;
  }
  .topbar .mobile-lang {
    /* Draw a consistent compact chevron instead of the platform select
       arrow, which crowds the locale label on narrow mobile headers. */
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 49px;
    height: 34px;
    padding: 0 18px 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--bg-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 3.5 3 3 3-3' fill='none' stroke='%238d887a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 10px 10px;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .topbar .theme-toggle {
    width: 32px;
    height: 34px;
    flex: none;
  }
}

@media (min-width: 621px) {
  .mobile-lang {
    display: none;
  }
}
