/* WeVersion - Main Stylesheet
   Layout: black, centred, media-house style. Full-bleed swirl hero,
   centred sections with white line icons, a white card band, a blue band,
   and a swirl CTA before a dark footer. Single dark look by design.
*/

/* ==========================================================================
   CSS Variables & Base
   ========================================================================== */

:root {
  --black: #000000;
  --panel: #111111;
  --panel-2: #1A1A1A;
  --white: #FFFFFF;
  --soft: #BBBBBB;
  --dim: #8A8A8A;
  --line: rgba(255,255,255,.14);
  --brand: #F0DCA0;
  --brand-dark: #D4C088;
  --teal: #4CC6B9;
  --blue: #2A78A8;
  --peach: #F0A383;
  --card-ink: #0E1A24;
  --card-muted: #5C6670;
  --ok: #4CC6B9;
  --prog: var(--brand);
  --idle: #BBBBBB;
  --f: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--black);
  color: var(--white);
  font: 500 16px/1.6 var(--f);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--black);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3 {
  margin: 0;
  font-family: var(--f);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 600;
}

p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

@media (min-width: 720px) {
  .wrap {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

section { padding-block: clamp(72px, 9vw, 120px); }
.center { text-align: center; }

.head {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}

.head p {
  color: var(--soft);
  font-size: 1.05rem;
}

/* ==========================================================================
   Components - Icons
   ========================================================================== */

.icon {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--white);
}

.icon.lg {
  width: 76px;
  height: 76px;
}

/* ==========================================================================
   Components - Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 6px;
  background: var(--white);
  color: #111;
  font: 600 .95rem/1 var(--f);
  text-decoration: none;
  border: 1px solid var(--white);
  transition: transform .15s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px rgba(0,0,0,.6);
}

.btn.ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}

/* ==========================================================================
   Header
   ========================================================================== */

header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  transition: background .3s ease;
}

header.top.solid {
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  max-width: none;
}

@media (min-width: 720px) {
  .top .wrap {
    padding-left: max(50px, env(safe-area-inset-left, 0px));
    padding-right: max(50px, env(safe-area-inset-right, 0px));
  }
}

.brand {
  font: 800 1.45rem/1 var(--f);
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--white);
}

nav.links {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
}

nav.links a {
  text-decoration: none;
  color: var(--soft);
  font-weight: 600;
  font-size: 1rem;
}

nav.links a:hover {
  color: var(--brand);
}

@media (max-width: 640px) {
  nav.links a:not(.keep) { display: none; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  margin-top: -76px;
  padding-block: 0;
  min-height: 0;
  overflow: hidden;
  background: #1A1408 url('../images/hero-image.png') center center / cover no-repeat;
}

.hero canvas, .cta canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero canvas {
  opacity: 0.7;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.65) 70%, #000);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-block: 170px 110px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 26px;
}

.hero .tag {
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--brand);
}

.hero h1 { max-width: 17ch; }

.hero .sub {
  color: #E4E4E4;
  font-size: 1.12rem;
  max-width: 60ch;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   Status Board
   ========================================================================== */

.board {
  margin-top: 30px;
  width: min(620px, 100%);
  border-radius: 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  text-align: left;
  overflow: hidden;
}

.board .bh {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: .82rem;
  color: var(--soft);
  flex-wrap: wrap;
}

.board .bh b {
  color: var(--white);
  font-weight: 700;
}

.board ul {
  list-style: none;
  margin: 0;
  padding: 6px 18px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
}

.board li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .9rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.board li:hover {
  background: rgba(255,255,255,0.03);
}

.board li small {
  color: var(--dim);
  font-weight: 500;
  margin-left: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.s-ok { color: var(--ok); }
.s-prog { color: var(--prog); }
.s-idle { color: var(--idle); }

@media (max-width: 520px) {
  .board ul { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Icon Grids
   ========================================================================== */

.grid {
  display: grid;
  gap: 64px 48px;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
  margin-inline: auto;
}

.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.item {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  align-content: start;
}

.item p {
  color: var(--white);
  max-width: 44ch;
  font-size: 1rem;
}

.item.small h3 { font-size: 1.2rem; }
.item.small p { color: var(--soft); font-size: .95rem; }

.item .who {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}

@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

.problem-body {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto 72px;
  text-align: center;
  color: var(--soft);
  font-size: 1.05rem;
}

/* ==========================================================================
   Amber Band - Platform Section
   ========================================================================== */

.blue { background: linear-gradient(135deg, #3D3520 0%, #2A2518 100%); }
.blue .head p { color: rgba(255,255,255,.85); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.tabs button {
  border: 1px solid rgba(255,255,255,.5);
  background: transparent;
  color: var(--white);
  font: 600 .92rem/1 var(--f);
  padding: 12px 18px;
  border-radius: 6px;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--brand);
  color: var(--black);
  border-color: var(--brand);
}

.panel {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: 20px;
}

.panel .pull {
  font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.3 var(--f);
  text-wrap: balance;
}

.panel p:not(.pull) { color: rgba(255,255,255,.88); }

/* ==========================================================================
   Plugin Section
   ========================================================================== */

.plugin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.plugin .copy { display: grid; gap: 20px; }
.plugin .copy p { color: var(--soft); }

.apps { display: flex; flex-wrap: wrap; gap: 10px; }

.apps span {
  font-size: .85rem;
  font-weight: 600;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dock {
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.dock .hd {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--brand);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.dock .hd span:last-child { color: var(--soft); }

.dock .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .92rem;
}

.dock .row:last-child { border-bottom: 0; }

.dock .row span:first-child {
  color: var(--dim);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (max-width: 860px) {
  .plugin { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Cream Card Band - AI Section
   ========================================================================== */

.light {
  background: linear-gradient(180deg, #F5EDD8 0%, #EBE3CE 100%);
  color: var(--card-ink);
}

.light .head p { color: var(--card-muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 1000px;
  margin-inline: auto;
}

.card {
  background: #FFFDF8;
  border-radius: 22px;
  padding: 34px 32px;
  box-shadow: 0 10px 40px -8px rgba(42,37,24,.15);
  display: grid;
  gap: 14px;
  align-content: start;
  text-align: center;
}

.card h3 { font-size: 1.2rem; color: var(--card-ink); }
.card p { color: var(--card-muted); font-size: .97rem; }

.card .icon {
  color: var(--brand-dark);
  width: 52px;
  height: 52px;
  justify-self: center;
}

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq { max-width: 860px; margin-inline: auto; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }

summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  color: var(--brand);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform .2s ease;
}

details[open] summary::after { transform: rotate(45deg); }

details p {
  padding: 0 0 24px;
  color: var(--soft);
  max-width: 70ch;
}

details:hover summary {
  color: var(--brand);
}

details[open] p {
  animation: faqSlide 0.35s ease-out;
}

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

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  background: #5C4A28;
  padding-block: clamp(96px, 12vw, 150px);
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.12);
}

.cta .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 22px;
}

.cta h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
  max-width: 20ch;
}

.cta p { font-size: 1.1rem; max-width: 52ch; }
.cta small { font-size: .85rem; opacity: .92; }

.cta .btn {
  background: var(--brand);
  color: var(--black);
  border-color: var(--brand);
}

.cta .btn:hover {
  background: #FFFDF8;
  border-color: #FFFDF8;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--panel);
  padding-block: 64px 36px;
}

.fcols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 48px;
}

.fcols h4 { margin: 0 0 18px; font: 700 1.05rem/1 var(--f); }

.fcols a, .fcols span {
  display: block;
  color: var(--soft);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 12px;
  font-size: .98rem;
}

.fcols a:hover { color: var(--white); }

.fbase {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: .88rem;
  font-weight: 600;
}

.fbase .wm {
  font: 800 2rem/1 var(--f);
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fbase .muted { color: var(--soft); font-weight: 500; }

.flogo { display: inline-block; line-height: 0; }
.flogo img { opacity: 0.9; transition: opacity 0.2s ease; }
.flogo:hover img { opacity: 1; }

@media (max-width: 760px) {
  .fcols { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Animations - Status Board
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .pill.flip {
    animation: flip .35s ease;
  }

  @keyframes flip {
    from { opacity: .3; transform: scale(.9); }
    to { opacity: 1; transform: none; }
  }
}

.pill.s-prog::before {
  animation: shimmerDot 1.8s ease-in-out infinite;
}

@keyframes shimmerDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(240, 220, 160, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 8px 3px rgba(240, 220, 160, 0.5); }
}

/* ==========================================================================
   Animations - Hover Effects
   ========================================================================== */

.item, .card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.item:hover {
  transform: translateY(-8px);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px rgba(14,26,36,.28);
}

.item:hover .icon, .card:hover .icon {
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ==========================================================================
   Animations - Scroll Fade-In
   ========================================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.15s; }
.fade-up:nth-child(6) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Floating CTA Button
   ========================================================================== */

.float-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--black);
  font: 600 0.95rem/1 var(--f);
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 8px 32px -8px rgba(240, 220, 160, 0.5);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

.float-cta.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.float-cta:hover {
  box-shadow: 0 12px 40px -6px rgba(240, 220, 160, 0.7);
  transform: translateY(-2px);
}

.float-cta:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .float-cta {
    bottom: 20px;
    right: 20px;
    padding: 14px 22px;
    font-size: 0.88rem;
  }
}
