/* ---------- Base / tokens ---------- */
:root {
  --bg: #ffffff;
  --pic-bg: #f3f4f6;
  --fg: #111111;
  --muted: #666666;
  --surface: #f3f4f6;
  --surface-glass: rgba(255, 255, 255, 0.7);
  --border: #e6e6e6;
  --accent: #0066cc;
  /* Professional Blue */
  --accent-rgb: 0, 102, 204;
  --hq-accent: #c45116;
  --hq-accent-rgb: 196, 81, 22;
  --text-muted: var(--muted);
  --text-main: var(--fg);
  --color-primary: var(--accent);
  --bg-card: var(--surface);
  --border-color: var(--border);
  --radius-sm: 6px;

  /* spacing */
  --space-1: clamp(8px, 1.2vw, 16px);
  --space-2: clamp(16px, 2vw, 32px);
  --space-3: clamp(32px, 4vw, 60px);

  /* container */
  --container-max: 1140px;

  /* type scale */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --text-xxl: clamp(2rem, 5vw, 3.5rem);
  /* hero h1 */
  --text-xl: clamp(1.5rem, 4vw, 2.5rem);
  /* section h2 */
  --text-lg: clamp(1.1rem, 3vw, 1.5rem);
  /* h3 / lead */
  --text-md: clamp(0.95rem, 2vw, 1.125rem);
  /* body */
  --text-sm: clamp(0.8rem, 1.5vw, 0.95rem);
  /* tiny */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-md: 8px;
  --radius-lg: 16px;
}

[data-theme='dark'] {
  --bg: #0f1115;
  --pic-bg: #0f1115;
  --fg: #f0f0f0;
  --muted: #a0a0a0;
  --surface: #1a1d23;
  --surface-glass: rgba(26, 29, 35, 0.7);
  --border: #2a2f3a;
  --accent: #4d9fff;
  --accent-rgb: 77, 159, 255;
  --hq-accent: #ff9a5a;
  --hq-accent-rgb: 255, 154, 90;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--fg);
  transition: background 0.3s ease, color 0.3s ease;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
  margin-top: 0;
  line-height: 1.2;
}

.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  margin-top: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

.img-invert-dark {
  transition: filter .2s ease;
}

[data-theme='dark'] .img-invert-dark {
  filter: invert(1) hue-rotate(180deg);
}

/* ---------- Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-md);
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: var(--text-md);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--accent);
  color: white !important;
  border-color: var(--accent);
}

.btn-primary:hover {
  filter: brightness(110%);
}

.btn-outline {
  background-color: transparent;
  color: var(--fg) !important;
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background-color: var(--surface);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: 100%;
}

/* ---------- Layout ---------- */
.section-full {
  width: 100%;
  padding: var(--space-2) 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-1) 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 32px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--fg);
  font-weight: 500;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.iot-link {
  font-size: var(--text-sm);
  padding: 0.5em 1em;
  white-space: nowrap;
}

/* Toggle Switch */
.theme-switch {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  padding: 4px;
  display: flex;
  align-items: center;
}

.theme-switch svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.icon-moon {
  display: none;
}

[data-theme='dark'] .icon-sun {
  display: none;
}

[data-theme='dark'] .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */
.top-content {
  text-align: center;
  padding: var(--space-3) 0;
  min-height: 90vh;
  /* Increased height for full screen feel */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  /* For scroll indicator */
  background: radial-gradient(circle at center, var(--surface) 0%, var(--bg) 70%);
}

.text-above-logo {
  font-size: var(--text-xl);
  font-weight: 300;
  margin-bottom: var(--space-2);
  color: var(--muted);
}

.top-content img.hero-logo {
  max-width: clamp(200px, 70vw, 400px);
  height: auto;
  margin: var(--space-1) auto;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.1));
}

[data-theme='dark'] .top-content img.hero-logo.img-invert-dark {
  filter: invert(1) hue-rotate(180deg) drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.text-below-logo {
  font-size: var(--text-lg);
  font-weight: 400;
  margin-top: var(--space-2);
  color: var(--fg);
}

.text-below-logo small {
  opacity: 0.6;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  animation: bounce 2s infinite;
  opacity: 0.7;
}

.scroll-indicator svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translate(-50%, 0);
  }

  40% {
    transform: translate(-50%, -10px);
  }

  60% {
    transform: translate(-50%, -5px);
  }
}

/* ---------- Utilities ---------- */
.show-light {
  display: block;
}

.show-dark {
  display: none;
}

[data-theme='dark'] .show-light {
  display: none;
}

[data-theme='dark'] .show-dark {
  display: block;
}

/* ---------- Map ---------- */
.map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: var(--space-2) auto;
  aspect-ratio: 1.71 / 1;
  isolation: isolate;
}

.map-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/world-map.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
}

[data-theme='dark'] .map-container::before {
  filter: invert(1);
}

.map-location {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 10;
}

.map-location:hover,
.map-location:focus-within {
  z-index: 30;
}

.map-beacon {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid var(--bg);
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
  animation: pulse 2s infinite;
  z-index: 10;
}

.map-beacon:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.35);
  outline-offset: 4px;
}

.map-location-hq .map-beacon {
  width: 20px;
  height: 20px;
  background: var(--hq-accent);
  box-shadow: 0 0 0 0 rgba(var(--hq-accent-rgb), 0.75);
  animation-name: pulse-hq;
}

.map-location-hq .map-beacon::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg);
}

[data-theme='dark'] .map-beacon {
  box-shadow: 0 0 0 0 rgba(77, 159, 255, 0.7);
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
  }

  70% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0);
  }

  100% {
    transform: translate(-50%, -50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
}

@keyframes pulse-hq {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--hq-accent-rgb), 0.8);
  }

  70% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 14px rgba(var(--hq-accent-rgb), 0);
  }

  100% {
    transform: translate(-50%, -50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--hq-accent-rgb), 0);
  }
}

/* Tooltip */
.map-tooltip {
  position: absolute;
  bottom: 14px;
  left: 0;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  width: min(280px, 80vw);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, bottom 0.2s ease, visibility 0.2s ease;
  pointer-events: auto;
  box-shadow: var(--shadow-md);
  color: var(--fg);
  z-index: 20;
}

.map-tooltip-title {
  font-weight: 700;
  line-height: 1.25;
}

.map-tooltip p {
  color: var(--muted);
  line-height: 1.45;
  margin: 7px 0 9px;
}

.map-tooltip a {
  font-weight: 650;
}

.map-hq-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--hq-accent);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.map-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}

.map-location:hover .map-tooltip,
.map-location:focus-within .map-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: 18px;
}


/* ---------- Business capabilities ---------- */
.capabilities-section {
  padding: var(--space-3) 0;
}

.capabilities-intro {
  max-width: 820px;
  margin-bottom: var(--space-2);
}

.section-eyebrow,
.business-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.capabilities-intro h2 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: var(--text-xl);
}

.capabilities-intro > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.business-card {
  position: relative;
  min-height: 430px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.business-card::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -55px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 50%;
}

.business-card h3 {
  max-width: 640px;
  margin-bottom: 20px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.business-card p:not(.business-kicker) {
  color: var(--muted);
}

.business-card-primary {
  min-height: 500px;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: var(--space-3);
  color: #fff;
  background: linear-gradient(135deg, #062f58 0%, #0066cc 100%);
  border-color: transparent;
}

.business-card-primary::before {
  width: 390px;
  height: 390px;
  top: -190px;
  right: -65px;
  border-color: rgba(255, 255, 255, 0.2);
}

.business-card-primary .business-kicker,
.business-card-primary p:not(.business-kicker) {
  color: rgba(255, 255, 255, 0.82);
}

.business-number {
  display: block;
  margin-bottom: clamp(70px, 10vw, 135px);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.business-card-primary .business-number {
  color: rgba(255, 255, 255, 0.7);
}

.business-copy p:last-child,
.business-card > p:last-child {
  margin-bottom: 0;
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.capability-tags span {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  background: var(--bg);
  font-size: var(--text-sm);
}

/* Legacy feature grid used by campaign pages. */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.feature-item h3 {
  color: var(--accent);
  margin-bottom: 0.5em;
}

.feature-list {
  padding-left: 20px;
  color: var(--muted);
}

.feature-list li {
  margin-bottom: 0.5em;
}

/* ---------- Giveaway Galleries ---------- */
.kypruino-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-2);
  margin: var(--space-2) 0;
}

.kypruino-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
}

.kypruino-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  background: var(--pic-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.giveaway-showcase-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* ---------- Partners ---------- */
#partners {
  background-color: var(--surface);
}

#partners h2 {
  text-align: center;
  margin-bottom: var(--space-2);
}

.partners-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  align-items: center;
}

.partner-logo {
  max-width: 180px;
  height: auto;
  transition: transform 0.2s;
}

.partner-logo-soldered {
  max-width: 210px;
}

.partner-item:hover .partner-logo {
  transform: scale(1.05);
}

/* ---------- Locations ---------- */
.locations-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  text-align: center;
}

.location-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5em 1em;
  border-radius: 50px;
  font-size: var(--text-md);
  color: var(--muted);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-1);
}

.form-label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 500;
}

.form-optional {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.8em;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-family: inherit;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.form-input:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: var(--surface);
  opacity: 0.72;
}

.support-corporate-note {
  margin: var(--space-2) 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.support-corporate-note strong {
  display: block;
  margin-bottom: 4px;
}

.support-corporate-note p {
  margin: 0;
  color: var(--muted);
}

.form-extra-field {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

/* ---------- Footer ---------- */
footer {
  background-color: var(--surface);
  padding: var(--space-3) 0 var(--space-2);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.footer-resources {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 48px);
}

.footer-link-groups {
  display: grid;
  gap: 12px;
}

.footer-link-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 24px;
}

.footer-link-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.footer-link-row a:hover {
  color: var(--accent);
}

.footer-link-row svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.footer-info {
  color: var(--fg);
}

.footer-apps {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.footer-app-badge {
  display: block;
  height: 40px;
  transition: opacity 0.2s, transform 0.2s;
}

.footer-app-badge img {
  height: 100%;
  width: auto;
  display: block;
}

.footer-app-badge:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.footer-copy {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: var(--space-1);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .business-grid,
  .business-card-primary {
    grid-template-columns: 1fr;
  }

  .business-card,
  .business-card-primary {
    min-height: 0;
  }

  .business-card-primary {
    gap: var(--space-2);
  }

  .business-number {
    margin-bottom: 70px;
  }

  .map-tooltip {
    width: min(250px, 82vw);
  }

  .nav-container {
    flex-direction: column;
    gap: var(--space-1);
    align-items: flex-start;
  }

  .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--space-1);
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: var(--space-1);
    border-top: 1px solid var(--border);
  }

  nav ul {
    gap: var(--space-1);
    font-size: var(--text-sm);
    flex-wrap: wrap;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-resources {
    width: 100%;
    align-items: center;
    flex-direction: column;
  }

  .footer-link-groups {
    justify-items: center;
  }

  .footer-link-row {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

}

/* ---------- Banner Carousel ---------- */
.banner-section {
  padding: 0 0 var(--space-2) 0;
  /* Adjust padding as needed */
  margin-top: -2rem;
  /* Pull up closer to hero if needed, or keeping it distinct */
  margin-top: 0;
}

.banner-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  /* 1200x400 ratio */
  max-height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.banner-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.banner-carousel .banner-link:hover,
.banner-carousel .banner-link:focus-visible {
  opacity: 1;
}

.banner-link .banner-image {
  cursor: pointer;
}

/* Navigation */
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s;
  opacity: 0;
}

.banner-carousel:hover .banner-nav {
  opacity: 1;
}

.banner-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.banner-nav.prev {
  left: 10px;
}

.banner-nav.next {
  right: 10px;
}

/* Indicators */
.banner-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

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

.indicator.active {
  background: white;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .banner-carousel {
    aspect-ratio: 3 / 1;
    max-height: none;
  }

  .banner-image {
    object-fit: contain;
  }

  .banner-nav {
    display: none;
    /* Hide arrows on mobile, rely on swipe */
  }
}
