/* ============================================================
   IDOR Cursos — TV Touch (vertical 1080×1920)
   Paleta Portal Markan + Inter
   ============================================================ */

:root {
  /* Azuis IDOR */
  --blue-900: #01498E;
  --blue-800: #025AA8;
  --blue-700: #0369C0;
  --blue-600: #0A7AD8;
  --blue-100: #E8F2FC;
  --blue-50:  #F4F9FE;

  /* Gold institucional */
  --gold:        #CDA176;
  --gold-dark:   #B8884E;
  --gold-light:  #E8CDA8;
  --gold-50:     #FBF6EF;

  /* Cinzas */
  --gray-900: #1A1A2E;
  --gray-700: #3D3D56;
  --gray-600: #555;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white:    #FFFFFF;

  /* Status */
  --green:      #16A34A;
  --green-light:#F0FDF4;

  /* Geometria */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(1,73,142,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 6px 20px rgba(1,73,142,.08);
  --shadow-lg:  0 14px 40px rgba(1,73,142,.12);
  --shadow-xl:  0 24px 60px rgba(1,73,142,.16);

  --transition: .25s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  /* Fora do canvas do app: tom cinza claro com pattern sutil pra deixar
     claro que esta área não faz parte do design (1080×1920) */
  background-color: #ECEFF3;
  background-image:
    linear-gradient(135deg, transparent 49%, rgba(1,73,142,.04) 49%, rgba(1,73,142,.04) 51%, transparent 51%),
    linear-gradient(45deg,  transparent 49%, rgba(1,73,142,.04) 49%, rgba(1,73,142,.04) 51%, transparent 51%);
  background-size: 18px 18px;
  min-height: 100vh;
}

body {
  width: 1080px;
  min-height: 1920px;
  margin: 0 auto;                      /* centraliza horizontalmente */
  background: var(--white);
  color: var(--gray-900);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  box-shadow: 0 0 0 1px rgba(1,73,142,.08), 0 30px 90px rgba(1,73,142,.12);
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input  { font-family: inherit; }
img    { display: block; max-width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);          /* acompanha o canvas centralizado */
  width: 1080px;
  height: 140px;
  padding: 0 60px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border-bottom: 1px solid var(--gray-200);
}

.header-back {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  color: var(--blue-900);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition);
}
.header-back:active {
  transform: scale(.96);
  background: var(--blue-100);
}

.header-logo {
  height: 64px;
  width: auto;
}

/* show back button on non-home screens */
body[data-screen="detail"] .header-back,
body[data-screen="form"]   .header-back,
body[data-screen="thanks"] .header-back { display: inline-flex; }

/* ============================================================
   SCREENS — show/hide
   ============================================================ */

.screen { display: none; padding-top: 140px; }
.screen.active { display: block; }

/* ============================================================
   HOME
   ============================================================ */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 60%, var(--blue-700) 100%);
  padding: 80px 60px 90px;
  color: var(--white);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: -40px; right: -40px;
  width: 360px; height: 360px;
  background-image: url('assets/pattern-dots-white.svg');
  opacity: .9;
  pointer-events: none;
}

.hero-decor {
  position: absolute;
  bottom: -120px; left: -80px;
  width: 380px; height: 380px;
  background-image: url('assets/pattern-plus.svg');
  opacity: .7;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 32px;
}

.hero-title {
  font-size: 66px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 28px;
  max-width: 850px;
}

.hero-subtitle {
  font-size: 28px;
  font-weight: 400;
  color: rgba(255,255,255,.92);
  max-width: 760px;
}
.hero-subtitle strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* Filtros */
.filters {
  display: flex;
  gap: 14px;
  padding: 36px 60px 16px;
  flex-wrap: wrap;
  background: var(--white);
  position: sticky;
  top: 140px;
  z-index: 50;
}

.chip {
  padding: 18px 32px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 999px;
  font-size: 20px;
  font-weight: 500;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.chip:active { transform: scale(.96); }
.chip--active {
  background: var(--blue-900);
  color: var(--white);
  border-color: var(--blue-900);
}

/* Grid de cards */
.grid {
  padding: 24px 60px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.card:active {
  transform: scale(.98);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-700);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--gray-100);
}
.card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.card-tipo {
  position: absolute;
  top: 18px; left: 18px;
  padding: 8px 16px;
  background: rgba(1,73,142,.94);
  color: var(--white);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.card-body {
  padding: 26px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-900);
  letter-spacing: -.3px;
  /* clamp 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}

.card-meta span {
  font-size: 16px;
  color: var(--gray-500);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-meta span.publico {
  color: var(--gold-dark);
  font-weight: 600;
}
.card-meta span:not(:first-child)::before {
  content: '·';
  color: var(--gray-300);
  margin-right: 6px;
}

/* ============================================================
   DETALHE
   ============================================================ */

.detail-hero {
  position: relative;
  width: 100%;
  height: 620px;
  overflow: hidden;
  background: var(--gray-100);
}
.detail-image {
  width: 100%; height: 100%;
  object-fit: cover;
}
.detail-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(1,73,142,.4) 100%);
}

.detail-tipo {
  position: absolute;
  top: 30px; left: 60px;
  padding: 14px 26px;
  background: var(--gold);
  color: var(--white);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.detail-body {
  padding: 60px 60px 40px;
}

.detail-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue-900);
  letter-spacing: -1px;
  margin-bottom: 28px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.badge {
  padding: 12px 22px;
  background: var(--blue-50);
  color: var(--blue-900);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
}
.badge.badge-gold {
  background: var(--gold-50);
  color: var(--gold-dark);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 30px 36px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin-bottom: 50px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.meta-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue-900);
}

.detail-section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -.5px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 16px;
}
.detail-section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 80px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
}

.detail-description {
  font-size: 22px;
  line-height: 1.65;
  color: var(--gray-700);
  margin-bottom: 60px;
}

.detail-cta-wrap {
  position: sticky;
  bottom: 0;
  padding: 30px 60px 50px;
  background: linear-gradient(180deg, transparent 0%, var(--white) 30%);
}

/* ============================================================
   CTA buttons
   ============================================================ */

.cta {
  width: 100%;
  min-height: 110px;
  padding: 0 36px;
  border-radius: var(--radius-lg);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.cta:active {
  transform: scale(.985);
  box-shadow: var(--shadow-sm);
}

.cta--primary {
  background: var(--blue-900);
  color: var(--white);
}
.cta--primary:active { background: var(--blue-800); }

.cta--gold {
  background: var(--gold);
  color: var(--white);
}
.cta--gold:active { background: var(--gold-dark); }

.cta--outline {
  background: var(--white);
  color: var(--blue-900);
  border: 2px solid var(--blue-900);
  box-shadow: none;
}
.cta--outline:active { background: var(--blue-50); }

/* ============================================================
   FORMULÁRIO
   ============================================================ */

.screen--form {
  background: var(--blue-50);
  min-height: 1920px;
  position: relative;
  overflow: hidden;
}
.screen--form::before {
  content: '';
  position: absolute;
  top: 200px; right: -60px;
  width: 320px; height: 320px;
  background-image: url('assets/pattern-dots.svg');
  opacity: .8;
  pointer-events: none;
}
.screen--form::after {
  content: '';
  position: absolute;
  bottom: 0; left: -80px;
  width: 280px; height: 280px;
  background-image: url('assets/pattern-plus.svg');
  opacity: .6;
  pointer-events: none;
}

.form-wrap {
  position: relative;
  z-index: 2;
  margin: 80px 60px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 70px 60px;
  box-shadow: var(--shadow-xl);
}

.form-eyebrow {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 28px;
}

.form-title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue-900);
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.form-subtitle {
  font-size: 22px;
  color: var(--gray-700);
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--gray-200);
}
.form-subtitle strong {
  color: var(--blue-900);
  font-weight: 600;
}

.field {
  margin-bottom: 32px;
}
.field label {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 14px;
}
.field input {
  width: 100%;
  height: 96px;
  padding: 0 28px;
  font-size: 26px;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), background var(--transition);
}
.field input:focus {
  outline: none;
  border-color: var(--blue-700);
  background: var(--white);
}

.form-disclaimer {
  text-align: center;
  font-size: 16px;
  color: var(--gray-500);
  margin-top: 22px;
}

/* ============================================================
   AGRADECIMENTO
   ============================================================ */

.screen--thanks {
  background: linear-gradient(180deg, var(--blue-900) 0%, var(--blue-800) 100%);
  color: var(--white);
  min-height: 1920px;
  position: relative;
  overflow: hidden;
}

.thanks-pattern {
  position: absolute;
  inset: 0;
  background-image: url('assets/pattern-dots-white.svg');
  background-size: 320px 320px;
  opacity: .35;
  pointer-events: none;
}

.thanks-content {
  position: relative;
  z-index: 2;
  padding: 200px 80px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thanks-check {
  width: 200px; height: 200px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
  color: var(--white);
  box-shadow: 0 0 0 12px rgba(205,161,118,.25);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 12px rgba(205,161,118,.25); }
  50%      { box-shadow: 0 0 0 24px rgba(205,161,118,.15); }
}

.thanks-title {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -1.2px;
  margin-bottom: 30px;
}

.thanks-message {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255,255,255,.92);
  margin-bottom: 80px;
  max-width: 800px;
}
.thanks-message strong {
  color: var(--gold-light);
  font-weight: 600;
}

.screen--thanks .cta--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  max-width: 480px;
}
.screen--thanks .cta--outline:active {
  background: rgba(255,255,255,.1);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding: 30px 60px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-size: 16px;
  color: var(--gray-500);
  text-align: center;
  font-weight: 500;
  letter-spacing: .3px;
}
body[data-screen="thanks"] .footer { display: none; }
