/* ── Variables & reset ───────────────────────────────────── */

:root {
  --midnight:     #071828;
  --mint:         #26FF93;
  --steel:        #5B8AA8;
  --font:         'Inter', sans-serif;
  --scale:        1;
  --block-accent: var(--mint);
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #071828;
  font-family: var(--font);
  overflow: hidden;
  color: white;
}

/* ── App container ───────────────────────────────────────── */

#app {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 1366px;
  height: 768px;
  transform: translate(-50%, -50%) scale(var(--scale));
  transform-origin: center center;
  background: transparent;
  overflow: hidden;
  z-index: 1;
}

/* ── Logo (viewport-fixed, outside #app) ─────────────────── */

#logo-permanent {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
  font-family: var(--font);
  font-size: 20px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

.wm-arke {
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

.wm-flow {
  font-weight: 300;
  color: var(--mint);
  text-transform: lowercase;
}

/* ── Grid ────────────────────────────────────────────────── */

#grid {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 35px;
  padding: 90px 130px 60px 130px;
  perspective: 1100px;
}

/* ── Block base ──────────────────────────────────────────── */

.block {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  cursor: pointer;
  transition: transform 380ms cubic-bezier(0.15, 0.85, 0.3, 1),
              filter 380ms cubic-bezier(0.15, 0.85, 0.3, 1),
              opacity 380ms cubic-bezier(0.15, 0.85, 0.3, 1);
}

.block::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--block-accent, var(--mint));
  transition: width 380ms ease;
}

.block.is-active::after {
  width: 100%;
}

/* ── Block hover glow (::before, per-position toward grid center) ── */

.block::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.block.is-active::before { opacity: 1; }

.block[data-r="0"][data-c="0"]::before { background: radial-gradient(circle at 85% 85%, rgba(38,255,147,0.08) 0%, transparent 55%); }
.block[data-r="0"][data-c="1"]::before { background: radial-gradient(circle at 50% 98%, rgba(38,255,147,0.08) 0%, transparent 55%); }
.block[data-r="0"][data-c="2"]::before { background: radial-gradient(circle at 15% 85%, rgba(38,255,147,0.08) 0%, transparent 55%); }
.block[data-r="1"][data-c="0"]::before { background: radial-gradient(circle at 85% 15%, rgba(38,255,147,0.08) 0%, transparent 55%); }
.block[data-r="1"][data-c="1"]::before { background: radial-gradient(circle at 50%  2%, rgba(38,255,147,0.08) 0%, transparent 55%); }
.block[data-r="1"][data-c="2"]::before { background: radial-gradient(circle at 15% 15%, rgba(38,255,147,0.08) 0%, transparent 55%); }

/* ── Block closed state ──────────────────────────────────── */

.block-cat {
  display: block;
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(38, 255, 147, 0.55);
  margin-bottom: 5px;
}

.block-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: white;
  margin-bottom: 3px;
}

.block-sub {
  font-size: 11px;
  font-weight: 300;
  color: var(--steel);
}

/* ── Modal overlay ───────────────────────────────────────── */

#modal-overlay {
  position: absolute;
  left: 165px;
  top: 125px;
  width: 1036px;
  height: 548px;
  z-index: 20;
  background: #0D2235;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transform-origin: center center;
  transition: opacity 320ms ease, transform 320ms ease;
}

#modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

#modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  background: #0D2235;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.60);
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms ease;
}

#modal-close:hover {
  color: white;
}

#modal-content {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#grid.is-expanded-open .block {
  pointer-events: none;
}

#modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
}

#modal-backdrop.is-active {
  display: block;
}

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 767px) and (hover: none) {
  #app {
    width: 390px;
    height: 844px;
  }
  #logo-permanent {
    top: 14px;
    left: 16px;
    font-size: 17px;
  }
  #grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 72px 24px 24px 24px;
    gap: 10px;
  }
  #modal-overlay {
    left: 12px;
    top: 70px;
    width: calc(390px - 24px);
    height: calc(844px - 82px);
  }
  .modal-cat           { font-size: 10px; }
  .modal-title         { font-size: 17px; }
  .modal-col-label     { font-size: 10px; }
  .modal-col-statement { font-size: 14px; }
  .modal-text          { font-size: 12px; line-height: 1.55; }
  .modal-text-italic   { font-size: 10px; }
  #modal-close         { width: 28px; height: 28px; font-size: 16px; }
  .fc-picker           { width: 280px; padding: 16px; }
  .fc-input,
  .fc-dt-btn,
  .fc-pill,
  .fc-submit           { font-size: 12px; }
  .fc-ch-val           { font-size: 13px; }
  .fc-ch-label         { font-size: 9px; }
}

/* ── Canvas (full viewport, outside #app) ────────────────── */

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Intro: logo ─────────────────────────────────────────── */

#intro-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  font-family: var(--font);
  font-size: 52px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
}

#intro-logo .wm-sub {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--steel);
  text-transform: uppercase;
  margin-top: 8px;
}

/* ── Intro: phrases ──────────────────────────────────────── */

.intro-phrase {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 66%;
  z-index: 10;
  font-family: var(--font);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  color: white;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) and (hover: none) {
  .intro-phrase { font-size: 18px; }
  #intro-logo   { font-size: 38px; }
}

/* ── Intro: skip button ──────────────────────────────────── */

#skip-wrap {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 15;
  cursor: pointer;
}

#skip-btn {
  display: grid;
  grid-template-columns: repeat(3, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 4px;
}

.skip-sq {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(38, 255, 147, 0.85);
  border-radius: 1px;
  animation: skip-balloon 1.4s ease-in-out infinite alternate;
}
.skip-sq:nth-child(2) { animation-delay: 0.10s; }
.skip-sq:nth-child(3) { animation-delay: 0.20s; }
.skip-sq:nth-child(4) { animation-delay: 0.15s; }
.skip-sq:nth-child(5) { animation-delay: 0.25s; }
.skip-sq:nth-child(6) { animation-delay: 0.35s; }

@keyframes skip-balloon {
  from { opacity: 0.3; transform: scale(0.85); }
  to   { opacity: 0.9; transform: scale(1.05); }
}

/* ── Intro: block interactivity guard ────────────────────── */

#app.intro-playing .block { pointer-events: none; }

/* ── Block statement (closed-state phrase) ───────────────── */

.block-statement {
  flex: 1;
  display: flex;
  align-items: center;
}

.block-statement-text {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.15;
  letter-spacing: 0.03em;
  margin: 0;
}

/* ── Block separator ─────────────────────────────────────── */

.block-sep {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* ── Modal design system — layout ────────────────────────── */

.modal-header {
  flex-shrink: 0;
  padding: 16px 32px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-cat {
  display: block;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #26FF93;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-top: 4px;
}

.modal-body {
  display: flex;
  padding-top: 24px;
  gap: 32px;
}

.modal-two-col {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Modal design system — typography ────────────────────── */

.modal-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 24px 20px;
}

.modal-col-label {
  display: block;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.40);
  margin-bottom: 12px;
}

.modal-col-statement {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 14px;
}

.modal-text {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  margin-bottom: 10px;
}

.modal-text:last-child {
  margin-bottom: 0;
}

.modal-text-italic {
  font-size: 10px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.35);
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding-left: 8px;
  margin-top: auto;
  line-height: 1.55;
}

/* ── Block channels (closed state) ──────────────────────── */

.block-channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  margin-top: auto;
}

.block-channel {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
}

/* ── ARKE Softwares — closed block carousel ─────────────── */

.ark-rotator {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ark-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

.ark-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.ark-slide-name {
  font-size: 20px;
  line-height: 1.1;
  margin: 0;
}

.ark-slide-tagline {
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
  margin: 0;
}

.ark-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.ark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  transition: background 300ms ease;
}

.ark-dot.active {
  background: #26FF93;
}

/* ── Fale conosco — modal left column ────────────────────── */

.fc-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.fc-ch-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-ch-label {
  font-size: 9px;
  letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.fc-ch-val {
  font-size: 13px;
  color: #fff;
}

/* ── Fale conosco — form column ──────────────────────────── */

.fc-form-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fc-form-col .modal-col-label {
  margin-bottom: 4px;
}

.fc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.fc-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12px;
  color: #fff;
  font-family: inherit;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.fc-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.fc-input-error { border-color: rgba(255, 80, 80, 0.50); }
.fc-input-ok    { border-color: rgba(38, 255, 147, 0.30); }

.fc-obs {
  min-height: 60px;
  resize: none;
  flex: 1;
}

.fc-dt-btn {
  text-align: left;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.fc-dt-btn--selected {
  color: #26FF93;
  border-color: rgba(38, 255, 147, 0.30);
}

.fc-pills-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fc-pills-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fc-pill {
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 3px 10px;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}

.fc-pill.active {
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
}

.fc-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.fc-submit {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 4px;
  padding: 7px 20px;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  font-family: inherit;
}

/* ── Fale conosco — date/time picker ─────────────────────── */

.fc-picker-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.fc-picker-overlay.open { display: flex; }

.fc-picker {
  background: #0D2235;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 18px;
  width: 290px;
}

.fc-picker-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.fc-picker-hdr span {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.fc-picker-hdr button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.50);
  font-size: 16px;
  cursor: pointer;
}

.fc-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.fc-cal-dow span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fc-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.fc-cal-day {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.60);
  text-align: center;
  padding: 6px 2px;
  border-radius: 4px;
  cursor: pointer;
}

.fc-cal-day:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.fc-cal-day.empty,
.fc-cal-day.past {
  color: rgba(255, 255, 255, 0.18);
  cursor: default;
}

.fc-cal-day.past:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.18);
}

.fc-cal-day.active {
  background: #26FF93;
  color: #071828;
  font-weight: 700;
}

.fc-back-btn {
  display: block;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.40);
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
}

.fc-slot-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.fc-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.fc-slot {
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 7px 4px;
  color: rgba(255, 255, 255, 0.60);
  text-align: center;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}

.fc-slot:hover {
  border-color: rgba(38, 255, 147, 0.40);
  color: #26FF93;
}

.fc-slot.active {
  border-color: #26FF93;
  color: #26FF93;
  background: rgba(38, 255, 147, 0.06);
}

.fc-confirm-btn {
  width: 100%;
  background: #26FF93;
  border: none;
  border-radius: 4px;
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #071828;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
}

/* ── ARKE Softwares — modal cards carousel ───────────────── */

.ark-cards-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.ark-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.ark-card.active {
  opacity: 1;
  pointer-events: auto;
}

.ark-cols {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 32px;
}

.ark-saiba-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 20px;
  margin-top: 12px;
}

.ark-saiba-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 4px;
  padding: 7px 20px;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.ark-saiba-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

/* ── ARKE Softwares — modal nav arrows ───────────────────── */

.ark-nav-btn {
  position: absolute;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0D2235;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.60);
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  z-index: 30;
  line-height: 1;
  transition: color 200ms ease;
}

.ark-nav-btn:hover {
  color: white;
}
