/* The landing page (index.html). The hero holds four views that take
   turns in place: the case card (home), AI Esențial, the contact form and
   the Colegul AI waiting list (js/main.js). Phones: css/mobile.css. */

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: var(--night);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  background: var(--border-red);
}

/* The photo has a lighter file for phones (<picture>); the wrapper stays
   out of the layout. */
.hero > picture {
  display: contents;
}

/* Typewriter photo (Patrick Fore, Unsplash), toned down to a dark sepia
   so it stays behind the text. */
.hero-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  filter: sepia(.7) brightness(.4);
}

/* Away from home the photo steps further back. */
.hero.is-on-view .hero-photo {
  filter: sepia(.7) brightness(.25);
  transition: filter .5s ease;
}

.hero-scrim {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(100deg, rgba(20, 16, 12, .95) 0%, rgba(20, 16, 12, .88) 40%, rgba(20, 16, 12, .55) 65%, rgba(20, 16, 12, .35) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 96px 42px 40px;
}

/* All views share one grid cell and cross-fade. */
.view {
  grid-area: 1 / 1;
  justify-self: center;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s .45s;
  /* With /#contact in the address the browser would scroll to the view. */
  scroll-margin-top: 100vh;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .45s ease .1s, transform .45s cubic-bezier(.2, .7, .2, 1) .1s, visibility 0s;
}

.view-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, .75);
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, .35);
}

.view-back:hover,
.view-back:focus-visible {
  color: #fff;
}

/* Shared form pieces */
.form-success {
  padding: 24px;
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
  border-left: 4px solid var(--red);
}

.form-success:focus {
  outline: none;
}

.form-success-title {
  margin-bottom: 6px;
  font-size: 19px;
  font-weight: 700;
}

.form-error {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #7d1222;
  background: #fbecee;
  border-left: 3px solid var(--border-red);
}

.form-error a {
  font-weight: 600;
  white-space: nowrap;
  color: #0F7E71;
}

.form-privacy {
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.form-privacy a {
  color: inherit;
  text-underline-offset: 2px;
}

/* Home: the case card. "Continuă" turns it over to the contact details. */
.cz {
  max-width: 720px;
  margin: 0 auto;
}

.cz-head {
  margin-bottom: 24px;
  color: #fff;
}

/* Brand stamp: white with a short red bar (red text would not read on
   the dark photo). */
.cz-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cz-eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--border-red);
}

.cz-h1 {
  font-size: clamp(30px, 2.8vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.cz-h1-sub {
  margin-top: 6px;
  font-size: clamp(18px, 1.5vw, 22px);
  color: rgba(255, 255, 255, .82);
}

.cz-card {
  position: relative;
  perspective: 1600px;
}

/* Both faces share one grid cell, so the card is as tall as the taller
   face and never changes height. */
.cz-flip {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.cz-card.is-flipped .cz-flip {
  transform: rotateY(180deg);
}

.cz-face {
  grid-area: 1 / 1;
  padding: 24px 32px 28px;
  color: var(--black);
  background: #fff;
  border-top: 6px solid var(--border-red);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Safari can ignore backface-visibility and show the back face mirrored,
   so the face turned away is also hidden, at the moment it is edge-on. */
.cz-face,
.es-face {
  transition: visibility 0s .1s;
}

.cz-card:not(.is-flipped) .cz-back,
.cz-card.is-flipped .cz-front,
.es-card:not(.is-flipped) .es-back-face,
.es-card.is-flipped .es-front {
  visibility: hidden;
}

.cz-front {
  position: relative;
  display: flex;
  flex-direction: column;
  transform: rotateY(0deg);
}

.cz-back {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: rotateY(180deg);
}

.cz-title {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* The case field takes the height the back face needs. */
.cz-front textarea {
  display: block;
  flex: 1;
  width: 100%;
  height: 84px;
  min-height: 84px;
  padding: 12px;
  font: 400 15px Roboto, Arial, sans-serif;
  resize: none;
}

/* A quiet focus: a darker border instead of the browser's blue ring. */
.cz-face textarea,
.cz-face input {
  border: 1px solid rgba(16, 24, 32, .2);
  transition: border-color .2s ease;
}

.cz-face textarea:focus,
.cz-face input:focus {
  outline: none;
  border-color: rgba(16, 24, 32, .55);
}

/* The placeholder is the instruction, so it has to be readable. */
.cz-face textarea::placeholder {
  color: #7d7670;
  opacity: 1;
}

.cz-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font: 700 15px Roboto, Arial, sans-serif;
  letter-spacing: .04em;
  color: #fff;
  background: var(--red);
  border: 0;
  cursor: pointer;
  transition: background .2s ease;
}

.cz-btn:hover,
.cz-btn:focus-visible {
  background: var(--red-dark);
}

.cz-steps {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.cz-steps b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  font-size: 10px;
  color: #fff;
  background: var(--black);
  border-radius: 50%;
}

.cz-steps .is-done {
  font-weight: 700;
  color: var(--black);
}

.cz-steps .is-done b {
  background: #2fb36b;
}

/* Places this month (js/main.js), with a light: green while there is
   room, yellow when few are left, red for the last ones. The sentence
   always says the same in words. */
.cz-slots {
  display: flex;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* The dot sits under the "1" circle of the steps. */
.cz-slots.has-light::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 10.5px 0 4.5px;
  background: #2fb36b;
  border-radius: 50%;
}

.cz-slots.is-low::before {
  background: #f2b233;
}

.cz-slots.is-last::before {
  background: #e2233e;
  animation: slots-pulse 1.6s ease-in-out infinite;
}

@keyframes slots-pulse {
  50% { opacity: .35; }
}

/* "Mai avem loc în …" never breaks; it moves down whole. */
.slots-rest {
  white-space: nowrap;
}

.cz-title2 {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 700;
}

.cz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cz-back label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--black);
}

.cz-back label i {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: .6;
}

.cz-back input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 11px;
  font: 400 14px Roboto, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.cz-back .cz-btn {
  flex: none;
  height: 48px;
  padding: 0 14px;
}

.cz-back .cz-optin {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #4a4643;
  cursor: pointer;
}

.cz-back .cz-optin input {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
}

.cz-prev {
  all: unset;
  align-self: center;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.cz-prev:hover,
.cz-prev:focus-visible {
  color: var(--black);
}

/* After "Trimite" the confirmation covers the card at the same size. */
.cz-success {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 32px;
  color: var(--black);
  border-left: 0;
  border-top: 6px solid var(--border-red);
  animation: fade-in .45s ease both;
}

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

.cz-success-title {
  font-size: 26px;
  font-weight: 700;
}

.cz-success-text {
  margin-top: 6px;
  font-size: 16px;
  color: #4a4643;
}

.cz-steps--done {
  margin-top: 22px;
  font-size: 13px;
}

.cz-next {
  align-self: flex-start;
  margin-top: 26px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--red);
  transition: background .2s ease;
}

.cz-next:hover,
.cz-next:focus-visible {
  background: var(--red-dark);
}

/* The two programs, under the card. */
.cz-doors {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, .13);
}

.cz-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 50px;
  padding: 0 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, .85);
  background: #1d1813;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  transition: background .2s ease;
}

.cz-strip:last-child {
  border-bottom: 0;
}

.cz-strip:hover,
.cz-strip:focus-visible {
  background: #2a221a;
}

.cz-ico {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #fff;
}

/* "Training" in grey, the program's name in bold white. */
.cz-strip span {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, .65);
}

.cz-strip b {
  font-weight: 700;
  color: #fff;
}

.cz-strip em {
  margin-left: auto;
  font-size: 10px;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}

.cz-strip--soon em {
  color: rgba(255, 255, 255, .45);
}

/* The arrow's ink sits lower than the capitals beside it. */
.cz-strip i {
  position: relative;
  top: -2px;
  font-style: normal;
  transition: transform .25s ease;
}

.cz-strip:hover i {
  transform: translateX(5px);
}

.cz-talk {
  margin-top: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, .58);
}

.cz-talk a {
  color: rgba(255, 255, 255, .9);
  text-underline-offset: 4px;
}

/* AI Esențial: the white card beside the deck of stages. The card turns
   over to the contact form. */
.view-es {
  max-width: 1160px;
  color: #fff;
}

.es-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}

.es-card {
  perspective: 1600px;
}

/* Phones only (css/mobile.css). */
.es-band {
  display: none;
}

.es-flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.es-card.is-flipped .es-flip {
  transform: rotateY(180deg);
}

.es-face {
  padding: 30px;
  color: var(--black);
  background: #fff;
  border-top: 6px solid var(--border-red);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.es-front {
  transform: rotateY(0deg);
}

.es-back-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 30px 22px;
  transform: rotateY(180deg);
}

.es-name {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--red);
}

.es-lead {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: #4a4643;
}

.es-stats {
  margin: 20px 0 22px;
  border-top: 1px solid var(--line);
}

.es-stats > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.es-stats b {
  min-width: 82px;
  font-size: 24px;
}

.es-stats small {
  margin-left: 3px;
  font-size: 13px;
}

.es-stats span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.es-cta {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--red);
  border: 0;
  cursor: pointer;
  transition: background .2s ease;
}

.es-cta:hover,
.es-cta:focus-visible {
  background: var(--red-dark);
}

/* One line under the button, between two short red dashes. */
.es-law {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--muted);
}

.es-law::before,
.es-law::after {
  content: "";
  flex: 0 0 12px;
  height: 1px;
  background: var(--border-red);
}

.es-form-title {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.15;
}

.es-form {
  gap: 8px;
}

.es-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.es-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.es-form label i {
  margin-left: 4px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: .6;
}

.es-form input,
.es-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  font: 400 14px Roboto, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.es-form textarea {
  height: 132px;
  min-height: 0;
  resize: none;
}

.es-form button {
  margin-top: 4px;
  padding: 13px;
  font: 700 14px Roboto, Arial, sans-serif;
  letter-spacing: .04em;
  color: #fff;
  background: var(--red);
  border: 0;
  cursor: pointer;
}

/* The card can't grow: the message field gives up the room. */
.es-form:has(.form-error:not([hidden])) textarea {
  height: 62px;
}

.es-back-face .form-success {
  padding-top: 24px;
}

/* Under the form, or under the thanks once sent. */
.es-close {
  all: unset;
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  order: 1;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.es-close span {
  font-size: 18px;
  line-height: 1;
}

.es-close:hover,
.es-close:focus-visible {
  color: var(--black);
}

/* Last on the back of the card, under "Închide". */
.es-back-face .form-privacy {
  order: 2;
}

/* The deck: the open stage fills it, the others fold into strips above
   and below (js/main.js keeps it as tall as the card). */
.es-deck {
  --strip: 46px;
  position: relative;
  overflow: hidden;
}

.es-step {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  background: #1d1813;
  border: 1px solid rgba(255, 255, 255, .13);
  transition: top .5s cubic-bezier(.2, .7, .2, 1), bottom .5s cubic-bezier(.2, .7, .2, 1), background .3s ease;
}

.es-step.is-on {
  background: #241d16;
  border-color: rgba(255, 255, 255, .22);
}

.es-strip {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: var(--strip);
  padding: 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  cursor: pointer;
}

.es-strip b {
  font-size: 15px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .85);
}

.es-strip em {
  margin-left: auto;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .4);
}

.es-step:not(.is-on) .es-strip:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}

.es-strip:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.es-step.is-on .es-strip {
  color: var(--gold);
  cursor: default;
}

.es-step.is-on .es-strip b {
  color: #fff;
}

.es-body {
  padding: 6px 28px 26px;
  opacity: 0;
  transition: opacity .35s ease;
}

.es-step.is-on .es-body {
  opacity: 1;
  transition-delay: .15s;
}

.es-body h3 {
  margin: 4px 0 12px;
  font-size: 26px;
}

.es-body p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}

/* How long and how often: one small line under the title. */
.es-body p.es-meta {
  max-width: none;
  margin: -2px 0 2px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  color: rgba(255, 255, 255, .55);
}

.es-body p + p {
  margin-top: 10px;
}

.es-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.es-chips span {
  padding: 6px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .22);
}

/* The navigator under the deck. Hover changes only the colour, so
   nothing shifts. */
.es-nav {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.es-nav button {
  all: unset;
  flex: 1;
  padding-top: 10px;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: color .2s ease;
}

.es-nav button::before {
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, .16);
  transition: background .2s ease;
}

.es-nav button:hover {
  color: rgba(255, 255, 255, .8);
}

.es-nav button:hover::before {
  background: rgba(255, 255, 255, .35);
}

.es-nav button.is-done::before {
  background: rgba(191, 13, 62, .55);
}

.es-nav button.is-on {
  font-weight: 700;
  color: #fff;
}

.es-nav button.is-on::before {
  background: var(--border-red);
}

.es-nav button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Contact and Colegul AI views */
.view-contact {
  max-width: 760px;
}

.contactbox {
  padding: 28px 34px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact-heading {
  margin-bottom: 28px;
  font-size: 26px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--black);
}

.view-contact .form {
  gap: 10px;
}

.view-contact textarea {
  height: 70px;
  min-height: 0;
}

/* WhatsApp and email: text links, so they don't compete with "Trimite". */
.contact-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}

.contact-alt-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.contact-alt a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--black);
}

.contact-alt svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* WhatsApp's teal, a notch darker than the top bar's so the text reads
   (4.55:1). */
.contact-alt a[href^="https://wa.me"] {
  color: #0F7E71;
}

.contact-alt a[href^="mailto:"] {
  color: var(--red);
}

.contact-alt a:hover,
.contact-alt a:focus-visible {
  text-decoration-thickness: 2px;
}

.coleg-kicker {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}

.coleg-lead {
  font-size: 16px;
  line-height: 1.5;
  color: #2b2724;
}

.coleg-note {
  margin: 10px 0 18px;
  font-size: 14px;
  color: var(--muted);
}

.view-coleg .form-success {
  padding-top: 6px;
}

/* Text for wide screens only or phones only. */
.phone-only {
  display: none;
}

/* Short screens (1366×768): the home view still fits without scrolling. */
@media (max-height: 800px) {
  .hero-inner {
    padding: 86px 42px 18px;
  }

  .cz-eyebrow {
    margin-bottom: 10px;
  }

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

  .cz-back {
    gap: 10px;
  }

  .cz-talk {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .view.is-active,
  .cz-flip,
  .cz-face,
  .es-flip,
  .es-face,
  .es-step,
  .es-body,
  .es-nav button,
  .es-nav button::before {
    transition: none;
  }

  .cz-success,
  .cz-slots.is-last::before {
    animation: none;
  }
}
