/* ── ContaCal · Modern landing ─────────────────────────────
   Table of contents:
   1. Custom Properties
   2. Reset & Base
   3. Background Decorations
   4. Header
   5. Main Layout
   6. Hero – Content
   7. Hero – Inline Carousel
   8. Hero – Fullscreen Carousel
   9. Footer
   10. Keyframe Animations
   11. Responsive – Desktop  (min-width: 900px)
   12. Responsive – Mobile   (max-width: 480px)
── */

/* ═══════════════════════════════════════════════════════════
   1. Custom Properties
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Primary – brand orange */
  --primary: #ff7043;
  --primary-hover: #ff8559;
  --primary-light: #ffab76;
  --primary-muted: rgba(255, 112, 67, 0.15);
  --primary-glow: rgba(255, 112, 67, 0.5);

  /* Base dark */
  --black: #222f3a;

  /* Surfaces */
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --border: rgba(34, 47, 58, 0.08);
  --border-focus: rgba(34, 47, 58, 0.15);

  /* Text */
  --text: var(--black);
  --text-muted: #4a5b6b;
  --text-subtle: #7a8a99;

  /* Accent (alias to primary) */
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --accent-muted: var(--primary-muted);

  /* Success */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);

  /* Typography */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.4s;
}

/* ═══════════════════════════════════════════════════════════
   2. Reset & Base
   ═══════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════
   3. Background Decorations
   ═══════════════════════════════════════════════════════════ */

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.gradient-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(255, 112, 67, 0.15) 40%, transparent 70%);
  top: -200px;
  right: -150px;
  animation: float 18s ease-in-out infinite;
}

.gradient-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 112, 67, 0.35) 0%, rgba(255, 112, 67, 0.1) 50%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: float 14s ease-in-out infinite reverse;
}

/* ═══════════════════════════════════════════════════════════
   4. Header
   ═══════════════════════════════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s var(--ease-out);
}

.header__brand:hover {
  opacity: 0.9;
}

.header__logo {
  height: 26px;
  width: auto;
}

.header__name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__name--conta {
  color: var(--primary);
}

.header__name--cal {
  color: var(--primary-hover);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   5. Main Layout
   ═══════════════════════════════════════════════════════════ */

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
}

.hero {
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.hero__content {
  order: -1;
  width: 100%;
  max-width: 640px;
  text-align: left;
}

.hero__media {
  order: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   6. Hero – Content
   ═══════════════════════════════════════════════════════════ */

.hero__title {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.05s both;
}

.hero__title-accent {
  display: block;
  font-size: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 50%, var(--primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 0 2.5rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.hero__form-wrap {
  animation: fadeInUp 0.6s var(--ease-out) 0.15s both;
}

.hero__form {
  max-width: 420px;
  margin: 0 0 0.75rem;
}

.hero__input-wrap {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.hero__input-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.hero__input {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
}

.hero__input::placeholder {
  color: var(--text-subtle);
}

.hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--duration) var(--ease-out), transform 0.2s var(--ease-spring);
  white-space: nowrap;
}

.hero__button:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.hero__button:active {
  transform: scale(0.98);
}

.hero__button-arrow {
  transition: transform 0.2s var(--ease-out);
}

.hero__button:hover .hero__button-arrow {
  transform: translateX(2px);
}

.hero__hint {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  padding-left: 0.25rem;
}

.hero__success {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  max-width: 420px;
  padding: 1rem 1.25rem;
  background: var(--success-bg);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 1rem;
  color: var(--success);
  font-size: 0.9375rem;
  font-weight: 500;
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.hero__success.visible {
  display: inline-flex;
}

.hero__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--success);
  color: var(--bg);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   7. Hero – Inline Carousel
   ═══════════════════════════════════════════════════════════ */

.carousel {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.carousel__viewport {
  width: 100%;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  transition: transform 0.35s var(--ease-out);
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__screenshot {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);
  z-index: 2;
}

.carousel__btn:hover {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.carousel__btn--prev { left: 0.5rem; }
.carousel__btn--next { right: 0.5rem; }

.carousel__dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--duration) var(--ease-out), transform 0.2s var(--ease-out);
}

.carousel__dot:hover {
  background: var(--text-subtle);
}

.carousel__dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════
   8. Hero – Fullscreen Carousel
   ═══════════════════════════════════════════════════════════ */

.carousel-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s var(--ease-out);
}

.carousel-fullscreen.is-open {
  opacity: 1;
  visibility: visible;
}

.carousel-fullscreen__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.carousel-fullscreen__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 102;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.carousel-fullscreen__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.15);
}

.carousel-fullscreen__inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  z-index: 101;
}

.carousel-fullscreen__viewport {
  width: 100%;
  overflow: hidden;
}

.carousel-fullscreen__track {
  display: flex;
  transition: transform 0.35s var(--ease-out);
}

.carousel-fullscreen__slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-fullscreen__slide img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.carousel-fullscreen__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 102;
}

.carousel-fullscreen__btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.carousel-fullscreen__btn--prev { left: -0.5rem; }
.carousel-fullscreen__btn--next { right: -0.5rem; }

.carousel-fullscreen__dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-fullscreen__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-fullscreen__dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.carousel-fullscreen__dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════
   9. Footer
   ═══════════════════════════════════════════════════════════ */

.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* ═══════════════════════════════════════════════════════════
   10. Keyframe Animations
   ═══════════════════════════════════════════════════════════ */

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.05); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════
   11. Responsive – Desktop (min-width: 900px)
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 900px) {
  .main {
    padding: 3rem 2rem 4rem;
  }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(1.5rem + 60px);
    align-items: center;
    text-align: left;
    max-width: 1100px;
    margin: 0 auto;
  }

  .hero__content {
    order: 0;
    max-width: 480px;
  }

  .hero__media {
    max-width: 420px;
    margin-left: auto;
  }

  .hero__title {
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    margin-bottom: 2rem;
  }

  .hero__media {
    max-width: 420px;
  }

  .hero__screenshot {
    max-width: 260px;
    max-height: 560px;
  }

  .carousel__btn--prev { left: calc(50% - 170px); }
  .carousel__btn--next { right: calc(50% - 170px); }
}

/* ═══════════════════════════════════════════════════════════
   12. Responsive – Mobile (max-width: 480px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .hero__input-wrap {
    flex-direction: column;
    border-radius: 1rem;
    padding: 0.25rem;
  }

  .hero__button {
    width: 100%;
    justify-content: center;
  }
}
