/* Phones and narrow windows (up to 900px), on top of css/style.css. The
   page scrolls: only the active view takes up space, and AI Esențial is
   one accordion (the white card, then the four stages). */

body {
  overflow-x: hidden;
}

/* The wordmark scales with the screen so it never wraps. */
.logo {
  min-width: 0;
  font-size: clamp(11px, 3.6vw, 18px);
  letter-spacing: normal;
  white-space: nowrap;
}

.logo-mark {
  height: 32px;
}

@media (max-width: 359px) {
  .logo {
    font-size: 10.5px;
  }
}

.footer {
  gap: 12px;
  padding: 18px 22px;
}

.footer-mark {
  height: 28px;
}

.wide-only {
  display: none;
}

.phone-only {
  display: inline;
}

.row {
  grid-template-columns: 1fr;
}

/* Hero: the typewriter in a low band behind the headline. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
}

.hero.is-on-view {
  align-items: flex-start;
}

.hero-photo {
  bottom: auto;
  height: 230px;
  object-position: 85% 50%;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}

.hero.is-on-view .hero-photo {
  filter: sepia(.7) brightness(.3);
}

.hero-scrim {
  background: linear-gradient(180deg, rgba(20, 16, 12, .25) 0, rgba(20, 16, 12, .6) 120px, var(--night) 230px);
}

.hero-inner {
  display: block;
  max-width: 600px;
  min-height: 0;
  padding: 96px 16px 36px;
}

.view {
  display: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}

.view.is-active {
  display: block;
  transition: none;
  animation: view-in .35s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 16px fields: below that, iPhones zoom in when a field is tapped. */
.hero input:not([type="checkbox"]),
.hero textarea {
  font-size: 16px;
}

/* Home */
.cz-h1 {
  font-size: 26px;
}

.cz-h1-sub {
  font-size: 17px;
}

.cz-face {
  padding: 20px 18px 22px;
}

.cz-title {
  font-size: 17px;
  white-space: normal;
}

.cz-front textarea {
  font-size: 16px;
  line-height: 1.4;
}

/* Steps and places are secondary here: small type, one row each. */
.cz-front .cz-steps {
  gap: 8px;
  font-size: 11px;
  white-space: nowrap;
}

.cz-front .cz-steps b {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  font-size: 10px;
}

.cz-front .cz-slots {
  font-size: min(11.5px, calc(3.7vw - 3.3px));
  line-height: 1.35;
  white-space: nowrap;
}

.cz-front .cz-slots.has-light::before {
  width: 8px;
  height: 8px;
  margin: 0 8px 0 4px;
}

.cz-success {
  padding: 20px 18px;
}

.cz-success-title {
  font-size: 22px;
}

.cz-steps--done {
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.cz-next {
  align-self: stretch;
  text-align: center;
}

.cz-strip {
  gap: 12px;
  height: auto;
  min-height: 52px;
  padding: 10px 16px;
}

.cz-strip span {
  line-height: 1.3;
}

.cz-strip em {
  flex: none;
  font-size: 10px;
  letter-spacing: .08em;
}

/* AI Esențial. With a stage open, the card shrinks to a white band with
   a small "Contactează-ne". */
.es-layout {
  display: block;
}

.es-band {
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 10px 0 18px;
  background: #fff;
  border-top: 6px solid var(--border-red);
}

.es-card:not(.is-open) .es-band {
  display: flex;
}

.es-card:not(.is-open) .es-flip {
  display: none;
}

.es-band-open {
  all: unset;
  flex: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  cursor: pointer;
}

.es-band-cta {
  all: unset;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: .03em;
  color: #fff;
  background: var(--red);
  cursor: pointer;
}

.es-band-open:focus-visible,
.es-band-cta:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: -4px;
}

.es-face {
  padding: 22px 18px;
}

/* One row on every phone. */
.es-law {
  font-size: min(12px, calc(4.9vw - 5.3px));
}

.es-form input {
  min-height: 44px;
}

.es-form textarea {
  height: 90px;
}

.es-form:has(.form-error:not([hidden])) textarea {
  height: 50px;
}

.es-deck {
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .13);
  border-top: 0;
}

.es-step,
.es-step.is-on {
  position: static;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  transition: none;
}

.es-step:last-child {
  border-bottom: 0;
}

.es-strip {
  padding: 0 16px;
}

/* An open stage closes when tapped again. */
.es-step.is-on .es-strip {
  cursor: pointer;
}

.es-body {
  display: none;
  padding: 2px 16px 20px;
  opacity: 1;
}

.es-step.is-on .es-body {
  display: block;
}

.es-body h3 {
  font-size: 21px;
}

.es-body p.es-meta {
  font-size: min(13px, calc(3.4vw - .6px));
}

.es-nav {
  display: none;
}

/* Contact */
.contactbox {
  padding: 22px 18px 24px;
}

.contact-heading {
  margin-bottom: 20px;
  font-size: 22px;
  white-space: normal;
}

.contact-alt {
  gap: 12px;
  margin-top: 22px;
  text-align: center;
}

.contact-alt-links {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
