/* ===== Base / Tokens ===== */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #F5F7FA, #E4ECF7);
  color: #223247;
  line-height: 1.6;
  overflow-x: hidden;
}

:root{
  --nnu-primary:#337ab7;
  --nnu-secondary:#ffffff;
  --ink:#0e1f33;
  --muted:#5d6b7b;
  --radius:16px;
  --shadow:0 14px 36px rgba(0,0,0,.12);
}

/* =================== HERO =================== */
#landing-hero{
  position:relative; isolation:isolate; color:#fff;
  min-height:clamp(520px, 80vh, 940px); overflow:hidden;
}
#landing-hero .hero-inner{
  position:relative; z-index:2; max-width:1200px; margin-inline:auto;
  padding:clamp(1.25rem, 2vw + 1rem, 3rem); display:grid; align-items:center; min-height:inherit;
}
#landing-hero .hero-content{ max-width:min(46ch, 92vw); }
#landing-hero h1{
  font-size:clamp(1.9rem, 1.2rem + 3.2vw, 3.25rem);
  line-height:1.1; margin:0 0 .6rem; text-wrap:balance;
}
#landing-hero .hero-tagline{
  margin:0 0 1.25rem; font-size:clamp(1rem, .9rem + .7vw, 1.25rem); color:rgba(255,255,255,.92);
}

#landing-hero .hero-bg{
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,.55) 70%),
    radial-gradient(110% 70% at 15% 15%, rgba(51,122,183,.55) 0%, rgba(51,122,183,0) 60%),
    var(--hero-image) center/cover no-repeat;
  filter:saturate(1.05); transform:translateZ(0);
}

/* Play button */
.btn-play{
  --size:56px;
  appearance:none; border:0; display:inline-flex; align-items:center; gap:.65rem;
  font-weight:700; font-size:clamp(.95rem, .9rem + .3vw, 1.05rem); color:#fff; background:transparent; cursor:pointer; padding:.25rem .4rem;
}
.btn-play:focus-visible{ outline:3px solid rgba(51,122,183,.6); outline-offset:3px; border-radius:12px; }
.play-icon{ width:var(--size); height:var(--size); }
.play-icon .ring{ fill:rgba(255,255,255,.12); stroke:rgba(255,255,255,.85); stroke-width:2.5; }
.play-icon .triangle{ fill:var(--nnu-primary); }

/* =================== VIDEO LIGHTBOX =================== */
.video-dialog[hidden]{ display:none; }
.video-dialog{ position:fixed; inset:0; z-index:9999; display:grid; place-items:center; }
.video-overlay{ position:absolute; inset:0; background:rgba(0,0,0,.6); backdrop-filter:saturate(120%) blur(2px); }
.video-surface{
  position:relative; z-index:1; width:min(92vw, 980px); aspect-ratio:16/9;
  border-radius:16px; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.45); background:#000;
  border:1px solid rgba(51,122,183,.35);
}
.video-surface video{ width:100%; height:100%; display:block; object-fit:cover; background:#000; }
.video-close{
  position:absolute; z-index:2; top:clamp(10px, 2vw, 20px); right:clamp(10px, 2vw, 20px);
  width:42px; height:42px; display:grid; place-items:center; border-radius:999px;
  border:1px solid rgba(255,255,255,.4); background:rgba(0,0,0,.4); color:#fff; cursor:pointer;
}
.video-close:hover{ background:rgba(0,0,0,.6); border-color:#fff; }
.video-close:focus-visible{ outline:3px solid rgba(51,122,183,.6); }
@media (max-width:520px){ .btn-play{ --size:52px; } }
@media (prefers-reduced-motion:reduce){ .video-overlay{ backdrop-filter:none; } }

/* =================== DATA / CANVA =================== */
#data-insights{
  padding: clamp(1.5rem, 2vw + 1rem, 3rem) 1rem;
  background:
    radial-gradient(120% 80% at 12% 8%, rgba(51,122,183,.10), transparent 60%),
    linear-gradient(180deg, rgba(51,122,183,.05), rgba(51,122,183,.02));
  color: var(--ink);
}
#data-insights .insights-wrap{ max-width:1100px; margin-inline:auto; }
#data-insights .insights-head{ text-align:center; margin-bottom:.9rem; }
#data-insights h2{ margin:0; color:var(--nnu-primary); font-size:clamp(1.5rem, 1rem + 2.4vw, 2.1rem); }
#data-insights .insights-sub{ margin:.35rem 0 0; color:var(--muted); font-size:clamp(.95rem, .9rem + .4vw, 1.05rem); }
#data-insights .embed{
  position:relative; width:100%; border-radius:var(--radius); overflow:hidden; background:#fff;
  border:1px solid rgba(51,122,183,.18); box-shadow:var(--shadow);
  aspect-ratio:16 / 9; min-height: clamp(240px, 45vw, 700px);
}
#data-insights .embed iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
#data-insights .insights-actions{ display:flex; align-items:center; justify-content:center; gap:.75rem; margin-top:.9rem; flex-wrap:wrap; }
#data-insights .open-btn{
  display:inline-block; padding:.55rem .95rem; background:var(--nnu-primary);
  color:#fff; text-decoration:none; border-radius:12px; font-weight:700; border:1px solid rgba(0,0,0,.03);
}
#data-insights .open-btn:hover{ filter:brightness(1.05); }
#data-insights .credit{ color:var(--muted); font-size:.95rem; }
@media (max-width:560px){ #data-insights .embed{ aspect-ratio:4 / 3; } }

/* =================== COMPARE (SIMPLE) =================== */
/* =================== BEFORE/AFTER (GLOBAL FLIP) =================== */
/* (2) CSS — Scoped styles for #compare-gallery only */
#compare-gallery {
  --cg-card-bg: #0f1115;        /* neutral, avoids white flash */
  --cg-media-bg: #0b0d11;       /* letterbox color behind images */
  --cg-badge-bg: #222a36;
  --cg-badge-fg: #e7ecf6;
  --cg-radius: 14px;
  --cg-gap: clamp(0.75rem, 2.5vw, 1.25rem);
  --cg-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  padding: var(--cg-gap);
}

#compare-gallery .cg-grid {
  display: grid;
  gap: var(--cg-gap);
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 32vw, 420px), 1fr));
  align-items: stretch;
}

/* Card shell */
#compare-gallery .cg-card {
  position: relative;
  background: var(--cg-card-bg);
  border-radius: var(--cg-radius);
  box-shadow: var(--cg-shadow);
  aspect-ratio: 16 / 10;        /* keeps stable height on load */
  overflow: hidden;
  perspective: 1200px;          /* 3D context for flip */
  cursor: pointer;
  outline: none;
}

/* Keyboard focus ring */
#compare-gallery .cg-card:focus-visible {
  box-shadow: 0 0 0 3px #7aa2ff inset, var(--cg-shadow);
}

/* Inner flip element */
#compare-gallery .cg-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}

/* Hover flips (and focus-within for a11y). Click adds .is-flipped for persistent state */
#compare-gallery .cg-card:hover .cg-inner,
#compare-gallery .cg-card:focus-within .cg-inner,
#compare-gallery .cg-card.is-flipped .cg-inner {
  transform: rotateY(180deg);
}

/* Faces */
#compare-gallery .cg-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;  /* prevents mirrored text */
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);      /* fix for Safari */
}

#compare-gallery .cg-front {
  z-index: 2;
}

#compare-gallery .cg-back {
  transform: rotateY(180deg);    /* maintains normal orientation */
}

/* Media wrapper provides the neutral letterbox background */
#compare-gallery .cg-media {
  width: 100%;
  height: 100%;
  background: var(--cg-media-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#compare-gallery .cg-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* show full image without cropping */
  object-position: center;
  display: block;
}

/* Corner badges */
#compare-gallery .cg-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cg-badge-bg);
  color: var(--cg-badge-fg);
  opacity: 0.92;
  user-select: none;
}

/* Motion-safe fallback */
@media (prefers-reduced-motion: reduce) {
  #compare-gallery .cg-inner {
    transition: none;
  }
}


/* =================== NOTES =================== */
.notesContainer{ display:flex; gap:1rem; justify-content:center; align-items:flex-start; flex-wrap:wrap; padding:0 1rem; }
#feedback, #behance-note, #figma-note{
  max-width:500px; padding:40px 25px; text-align:center; position:relative; border-radius:10px;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
}
#feedback{ background:#fffca8; border:2px solid #f0e68c; transform:rotate(-1.5deg); }
#behance-note{ background:#b3f4f9; border:2px solid #89dce3; transform:rotate(1.5deg); }
#figma-note{ background:#7eb4fb; border:2px solid #56f1ff; transform:rotate(1.5deg); }
#feedback::before, #behance-note::before, #figma-note::before{
  content:""; width:20px; height:20px; background:#ff6b6b; border-radius:50%;
  position:absolute; top:-10px; left:50%; transform:translateX(-50%); box-shadow:0 2px 5px rgba(0,0,0,.3);
}

/* =================== ABOUT =================== */
#about-us{
  background:
    linear-gradient(180deg, rgba(51,122,183,0.08), rgba(51,122,183,0.02)),
    var(--nnu-secondary);
  padding: clamp(2rem, 4vw + 1rem, 4.5rem) 1rem;
}
#about-us .about-container{ max-width:1100px; margin-inline:auto; }
#about-us .about-header{ text-align:center; margin-bottom: clamp(1.5rem, 2vw + 1rem, 2.5rem); }
#about-us h2{ color:var(--nnu-primary); font-size:clamp(1.75rem, 1.2rem + 2vw, 2.4rem); line-height:1.15; margin:0 0 .35rem; }
#about-us .about-subtitle{ margin:0; color:var(--muted); font-size:clamp(.95rem, .85rem + .4vw, 1.05rem); }

#about-us .team-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1rem, 1vw + .5rem, 1.5rem); }
#about-us .team-card{
  background:#fff; border:1px solid rgba(51,122,183,.15); border-radius:18px; box-shadow:0 10px 24px rgba(0,0,0,.08);
  padding:1.2rem; display:flex; flex-direction:column; align-items:center; text-align:center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#about-us .team-card:hover{ transform:translateY(-4px); border-color:rgba(51,122,183,.35); box-shadow:0 14px 28px rgba(0,0,0,.12); }
#about-us .avatar{ width:104px; height:104px; border-radius:50%; display:grid; place-items:center; margin-bottom:.85rem;
  background: radial-gradient(circle at 35% 30%, rgba(51,122,183,.25), rgba(51,122,183,.05)); border:4px solid var(--nnu-primary); overflow:hidden; }
#about-us .avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
#about-us .name{ font-size:1.1rem; font-weight:700; color:#0e1f33; margin:.25rem 0 .3rem; }
#about-us .role{ display:inline-block; color:var(--nnu-primary); background:rgba(51,122,183,.08); border:1px solid rgba(51,122,183,.15);
  padding:.25rem .55rem; border-radius:999px; font-size:.85rem; margin-bottom:.8rem; }

#about-us .contact{ list-style:none; padding:0; margin:.2rem 0 0; display:grid; gap:.4rem; width:100%; }
#about-us .contact-link{
  display:inline-flex; align-items:center; gap:.5rem; justify-content:center; width:100%;
  text-decoration:none; font-size:.95rem; padding:.55rem .75rem; border-radius:12px;
  border:1px solid rgba(51,122,183,.2); color:#223247; background:#fff;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
#about-us .contact-link:hover{ color:#fff; background:var(--nnu-primary); border-color:var(--nnu-primary); }
#about-us .icon{ width:18px; height:18px; flex:0 0 18px; fill:currentColor; opacity:.9; }
#about-us a:focus{ outline:3px solid rgba(51,122,183,.4); outline-offset:2px; border-radius:12px; }


/* CSS (Only for the tour feature)
   This is isolated using #siteTour, .site-tour, etc.  */

.start-tour-trigger {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  background: #111827;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", Roboto, sans-serif;
  font-size: clamp(.8rem, .3vw, .9rem);
  font-weight: 600;
  line-height: 1.2;
  border: 0;
  border-radius: .75rem;
  padding: .65rem .9rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
  cursor: pointer;
}
.start-tour-trigger:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

/* ===== Overlay wrapper ===== */
.site-tour {
  position: fixed;
  inset: 0;
  z-index: 9999; /* above everything */
  pointer-events: none; /* we'll re-enable pointer-events on panel */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", Roboto, sans-serif;
  color: #fff;
  display: none;           /* hidden by default (JS will show) */
}

/* ===== Highlight box with backdrop ===== */
.tour-highlight {
  position: absolute;
  border-radius: .75rem;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.7), /* darken everything except target */
    0 20px 48px rgba(0,0,0,.6);  /* glow around the highlight */
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 0;
  transition: all .28s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
  /* fallback size to avoid flash before JS positions it */
  top: 40vh;
  left: 10vw;
  width: 80vw;
  height: 20vh;
}

/* ===== Floating dialog/card ===== */
.tour-panel {
  --tour-bg: #0f1115;         /* darker, modern surface */
  --tour-radius: 14px;
  position: absolute;         /* kept absolute (overlay is fixed) */
  min-width: min(320px, 90vw);
  max-width: min(440px, 92vw);/* a bit wider for long text */
  background: var(--tour-bg);
  color: #e7ecf6;
  border-radius: var(--tour-radius);
  border: 1px solid #202736;  /* subtle border for definition */
  box-shadow:
    0 16px 40px rgba(0,0,0,.5),
    0 0 0 2px rgba(255,255,255,.04) inset;
  padding: 16px 16px 12px;
  line-height: 1.45;
  pointer-events: auto;       /* clickable even though parent is none */
  transition: transform .28s cubic-bezier(.2,.7,.2,1),
              opacity .28s cubic-bezier(.2,.7,.2,1);
  transform-origin: top left;
  opacity: 0;                 /* revealed when .tour-active */
}


/* we add .tour-active to make it visible */
.site-tour.tour-active {
  display: block;
}
.site-tour.tour-active .tour-panel {
  opacity: 1;
}

/* ===== Panel layout ===== */
.tour-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .5rem;
}

.tour-step-count {
  margin: 0;
  font-size: .7rem;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.2;
}

.tour-skip {
  background: transparent;
  border: 0;
  color: #9ca3af;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: .5rem;
}
.tour-skip:hover,
.tour-skip:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.07);
  outline: none;
}

.tour-body {
  margin-bottom: .75rem;
}

.tour-title {
  font-size: clamp(1rem,.3vw,1.05rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 .4rem 0;
  line-height: 1.3;
}
.tour-desc {
  font-size: clamp(.8rem,.3vw,.9rem);
  color: #d1d5db;
  margin: 0;
  line-height: 1.4;
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

.tour-prev,
.tour-next,
.tour-done {
  background: #111827;
  color: #fff;
  border: 0;
  border-radius: .5rem;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .55rem .7rem;
  flex: 1 1 auto;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(0,0,0,.7), 0 0 0 2px rgba(255,255,255,.05) inset;
  min-width: calc(33% - .5rem);
  text-align: center;
}
.tour-prev[disabled] {
  opacity: .4;
  cursor: not-allowed;
}
.tour-prev:focus-visible,
.tour-next:focus-visible,
.tour-done:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

/* On very narrow screens, footer buttons stack nicely */
@media (max-width: 400px) {
  .tour-footer {
    flex-direction: column;
  }
  .tour-prev,
  .tour-next,
  .tour-done {
    width: 100%;
    min-width: 0;
  }
}

/* Prefer reduced motion: kill transitions */
@media (prefers-reduced-motion: reduce) {
  .tour-highlight,
  .tour-panel {
    transition: none !important;
  }
}

/* Slim progress bar driven by --tour-progress (0..1) set in JS */
.tour-panel::before {
  content: "";
  position: absolute;
  left: 0; top: 0; height: 3px;
  width: calc(var(--tour-progress, 0) * 100%);
  background: linear-gradient(90deg, #7aa2ff, #52e0ff);
  border-radius: var(--tour-radius) var(--tour-radius) 0 0;
}

/* Small pointer arrow—JS sets [data-place="bottom"|"top"] */
.tour-panel[data-place="bottom"]::after,
.tour-panel[data-place="top"]::after {
  content: "";
  position: absolute;
  border: 8px solid transparent;
}

.tour-panel[data-place="bottom"]::after {
  top: -16px; left: 24px;
  border-bottom-color: var(--tour-bg);
}

.tour-panel[data-place="top"]::after {
  bottom: -16px; left: 24px;
  border-top-color: var(--tour-bg);
}


/* ===== Compare Gallery: Section Title ===== */
#compare-gallery .cg-head {
  display: grid;
  justify-items: center;
  gap: clamp(0.35rem, 1.2vw, 0.75rem);
  padding-inline: clamp(0.5rem, 3vw, 1.25rem);
  margin-block: clamp(0.75rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
}

#compare-gallery .cg-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  /* Responsive size from mobile → desktop */
  font-size: clamp(1.15rem, 2.8vw, 2rem);
  /* Better multi-line balance on modern browsers */
  text-wrap: balance;
  color: var(--cg-title-fg, inherit);
}

#compare-gallery .cg-sub {
  margin: 0;
  max-width: 68ch;
  line-height: 1.55;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  color: var(--cg-sub-fg, #6b7280);
}

/* Light/Dark friendly defaults (optional) */
@media (prefers-color-scheme: dark) {
  #compare-gallery .cg-sub { color: #a3aec2; }
}
