
/* ==========================================================================
   theme.css - LIGHT AND DARK THEME STYLES
   ========================================================================== */

/* DARK THEME COLOURS */
[data-theme="dark"] {
  --page-bg: #080E1C;
  --soft-bg: #0D1729;
  --section-bg: #101D33;

  --border-light: rgba(148, 163, 184, 0.18);
  --border-dark: rgba(148, 163, 184, 0.28);

  --brand-blue: #0A5BFF;
  --brand-blue-dark: #60A5FA;
  --brand-cyan: #22D3EE;
  --brand-tint: rgba(10, 91, 255, 0.14);
  --brand-line: rgba(96, 165, 250, 0.4);

  --text-main: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-small: #A8B8CE;

  --hero-gradient: linear-gradient(
	180deg, 
	#16366B 0%, 
	#123062 18%, 
	#0B1930 48%, 
	#080E1C 100%
  );

  --hero-gradient-up: linear-gradient(
	0deg, 
	#16366B 0%, 
	#123062 18%, 
	#0B1930 48%, 
	#080E1C 100%
  );

  --particle-ink: #94A3B8;
}

/* PAGE BACKGROUND */
[data-theme="dark"] body {
  background: #080E1C;
  color: var(--text-main);
}

/* KEEP THE BLUE GRADIENT BACKGROUND */
[data-theme="dark"] main > section:not(#ribbon):not(#safety):not(#cta) {
  background: var(--hero-gradient);
}

[data-theme="dark"] main > section:nth-of-type(even):not(#ribbon):not(#safety):not(#cta) {
  background: var(--hero-gradient-up);
}

[data-theme="dark"] #top {
  background: var(--hero-gradient);
}

[data-theme="dark"] footer.site {
  background: var(--hero-gradient);
}

/* DARK NAVIGATION */
[data-theme="dark"] .top {
  background: rgba(194, 220, 255, 0.72);
}

[data-theme="dark"] .logo {
  color: #0B1220;
}

[data-theme="dark"] .menu {
  color: #F8FAFC;
}

[data-theme="dark"] .menu a {
  color: #F8FAFC;
}

[data-theme="dark"] .menu a:hover {
  color: #60A5FA;
  background: rgba(15, 23, 42, 0.85);
}

[data-theme="dark"] .menu-btn {
  background: #0F172A;
  color: #F8FAFC;
  border-color: rgba(255, 255, 255, 0.25);
}

/* DARK SECTION SURFACES */
[data-theme="dark"] .dark,
[data-theme="dark"] .paper {
  color: var(--text-main);
}

[data-theme="dark"] .paper {
  background: rgba(11, 23, 43, 0.78);
}

[data-theme="dark"] #ais {
  background: transparent;
}

[data-theme="dark"] .stage,
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .stat,
[data-theme="dark"] .person,
[data-theme="dark"] .team > div,
[data-theme="dark"] .faq-item {
  background-color: rgba(11, 23, 43, 0.92);
  color: var(--text-main);
}

[data-theme="dark"] .stage,
[data-theme="dark"] .panel {
  border-color: var(--border-light);
}

/* NUMBER BOXES ("Sensors 05" ... and "Sri Lanka 180,833" ...).
   In dark mode they get a dark background, so they need a gap between them
   and some space inside; otherwise the boxes touch and the text sits on the edge. */
[data-theme="dark"] .stats { gap: 16px; padding-top: 8px; padding-bottom: 8px; }
[data-theme="dark"] .stat { padding: 24px; border: 1px solid var(--border-light); }

[data-theme="dark"] .chip {
  background: #14243D;
  color: #CBD5E1;
  border-color: var(--border-light);
}

[data-theme="dark"] .lead,
[data-theme="dark"] .hero h1 span,
[data-theme="dark"] p {
  color: var(--text-body);
}

/* DARK WAITLIST SECTION */
[data-theme="dark"] #cta {
  background: #080E1C;
  color: #F8FAFC;
}

[data-theme="dark"] #cta .kick,
[data-theme="dark"] #cta .cta-body label,
[data-theme="dark"] #cta .cta-note {
  color: var(--text-small);
}

/* DARK WAITLIST EMAIL FIELD */

[data-theme="dark"] .field {
  background: transparent;
  gap: 12px;
}

[data-theme="dark"] .field input {
  background: #14243D;
  color: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: 999px;
}

/* THEME BUTTON */
.theme-3d {
  --trx: 0deg;
  --try: 0deg;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.85),
    rgba(226, 232, 240, 0.75)
  );
  color: #0F172A;
  font: 500 11.5px var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transform-style: preserve-3d;
  transform: perspective(700px) rotateX(var(--trx)) rotateY(var(--try));
  box-shadow:
    0 3px 0 #94A3B8,
    0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform .25s cubic-bezier(.22, 1, .36, 1),
    box-shadow .25s ease,
    background .3s ease,
    color .3s ease;
}

.theme-3d:hover {
  transform: perspective(700px) rotateX(var(--trx)) rotateY(var(--try)) translateY(-2px);
  box-shadow:
    0 5px 0 var(--brand-blue),
    0 12px 24px rgba(2, 102, 214, 0.22);
}

.theme-3d:active {
  transform: perspective(700px) translateY(2px);
  box-shadow: 0 1px 0 var(--brand-blue), 0 4px 10px rgba(15, 23, 42, 0.15);
}

.theme-3d-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transform: translateZ(10px);
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}

.theme-3d-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.theme-3d .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-3d .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-3d .icon-sun {
  display: block;
  color: #FBBF24;
}

[data-theme="dark"] .theme-3d {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(145deg, #1E293B, #0F172A);
  color: #F8FAFC;
  box-shadow:
    0 3px 0 var(--brand-blue),
    0 8px 20px rgba(0, 0, 0, 0.45);
}

.theme-3d.flip .theme-3d-icon {
  transform: translateZ(10px) rotateY(360deg);
}

.theme-3d-label {
  transform: translateZ(8px);
}

/* NAVIGATION LAYOUT */
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-actions .btn {
  margin-left: 0;
}

@media (max-width: 1100px) {
  .nav-actions {
    margin-left: 0;
  }

  [data-theme="dark"] .menu {
    background: rgba(9, 14, 26, 0.96);
  }
}

@media (max-width: 480px) {
  .theme-3d {
    padding: 0 11px;
  }

  .theme-3d-label {
    display: none;
  }
}

/* DARK THEME - SENSOR BOXES */

[data-theme="dark"] .sensor-detail-item {
  background: #0D1729;
  border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .sensor-detail-item:hover,
[data-theme="dark"] .sensor-detail-item.active {
  background: #0D1729;
  border-color: #60A5FA;
  box-shadow: 0 4px 16px rgba(10, 91, 255, 0.16);
}

[data-theme="dark"] .sensor-detail-text b {
  color: #F8FAFC;
}

[data-theme="dark"] .sensor-detail-text span {
  color: #CBD5E1;
}


/* DARK THEME - HIGHLIGHTED COMMUNITY CARD */

[data-theme="dark"] .person.accent {
  background: linear-gradient(
    145deg,
    rgba(2, 102, 214, 0.28) 0%,
    rgba(15, 23, 42, 0.92) 100%
  );

  border: 1px solid rgba(96, 165, 250, 0.42);

  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.45),
    0 4px 10px rgba(2, 102, 214, 0.14);
}

[data-theme="dark"] .person.accent .top-row,
[data-theme="dark"] .person.accent p {
  color: #CBD5E1;
}

[data-theme="dark"] .person.accent h3 {
  color: #F8FAFC;
}

[data-theme="dark"] .person.accent h3 em {
  color: #8DB8FF;
}

[data-theme="dark"] .person.accent footer {
  color: #8DB8FF;
  border-color: #334155;
}

[data-theme="dark"] .person.accent:hover {
  border-color: rgba(96, 165, 250, 0.65);

  box-shadow:
    0 22px 44px rgba(2, 102, 214, 0.26),
    0 6px 16px rgba(15, 23, 42, 0.45);
}


/* DARK THEME - FAQ BOXES */

[data-theme="dark"] .faq details {
  background: #101D33;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .faq details:hover {
  border-color: rgba(96, 165, 250, 0.55);
}

[data-theme="dark"] .faq details[open] {
  background: #14243D;
  border-color: #60A5FA;

  box-shadow:
    0 8px 22px rgba(10, 91, 255, 0.16);
}

[data-theme="dark"] .faq summary {
  color: #F8FAFC;
}

[data-theme="dark"] .faq summary::before,
[data-theme="dark"] .faq summary::after {
  color: #94A3B8;
}

[data-theme="dark"] .faq details[open] summary::before,
[data-theme="dark"] .faq details[open] summary::after {
  color: #60A5FA;
}

[data-theme="dark"] .faq details p {
  color: #CBD5E1;
}

/* DARK THEME - NAVIGATION GLASS CAPSULE */

[data-theme="dark"] .menu {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.35);

  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 10px 26px rgba(2, 6, 23, 0.25);
}

[data-theme="dark"] .menu a {
  color: #F8FAFC;
}

[data-theme="dark"] .menu a:hover,
[data-theme="dark"] .menu a:focus-visible {
  color: #60A5FA;
  background: transparent;
  box-shadow: none;
}

/* DARK MODE - SENTENCE SUGGESTION BOXES */

[data-theme="dark"] .sent {
  background: #14243D;
  color: #F8FAFC;
  border-color: #334155;
  opacity: 1;
}

/* Selected sentence box */

[data-theme="dark"] .sent.pick {
  background: #102B4F;
  color: #FFFFFF;
  border-color: #60A5FA;
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

/* SUGGESTED and YOU PICK labels */

[data-theme="dark"] .sent small {
  color: #60A5FA;
}

/* SOFT SHADOWS FOR MAIN VISUAL SECTIONS */

.stage,
.photo-card-inner {
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.15),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .stage,
[data-theme="dark"] .photo-card-inner {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(2, 102, 214, 0.12);
}

/* FOUR SEPARATE HOW-IT-WORKS CARDS */

.steps {
  gap: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.steps li {
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.15),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .steps li {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(2, 102, 214, 0.12);
}

/* THREE SEPARATE PEOPLE CARDS */

.people {
  gap: 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.person {
  border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.08),
    0 3px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .person {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(2, 102, 214, 0.1);
}

/* THREE SEPARATE SAFETY CARDS */

.rules {
  gap: 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.rules div {
  border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow:
    0 12px 28px rgba(180, 83, 9, 0.08),
    0 3px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .rules div {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(245, 158, 11, 0.1);
}

/* FIVE SEPARATE TEAM MEMBER CARDS */

.team {
  gap: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.team > div {
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

/* The last card: full width on phones (team.css), wider on tablets (team.css),
   one of five on laptops (team.css). The old "grid-column: auto" here squashed it on tablets. */

/* PHONE: 2 cards per row. The picture sits above the name so long roles fit. */
@media (max-width: 559px) {
  .team > div { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .team .avatar-box { flex: 0 0 auto; width: 40px; height: 40px; font-size: 16px; }
  .team span { min-width: 0; font-size: 17px; }
  /* The last card is full width, so it can keep the picture on the left. */
  .team > div:last-child { flex-direction: row; align-items: center; }
}

[data-theme="dark"] .team > div {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(2, 102, 214, 0.1);
}

/* MENU BUTTON (3D, same look as the theme button) */
.theme-3d.menu-btn { display: none; }

@media (max-width: 1100px) {
  .theme-3d.menu-btn { display: inline-flex; margin-left: auto; }
}

.menu-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-icon span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
}

.menu-icon span:nth-child(2) { width: 10px; }

/* When the menu is open, the three lines turn into an X. */
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* PHONE: make the top bar smaller so "Join waitlist" fits on the screen. */
@media (max-width: 480px) {
  .nav { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .nav-actions { gap: 8px; }
  .nav .btn { padding: 0 12px; font-size: 11px; letter-spacing: .04em; }
  .logo { font-size: 20px; gap: 8px; }
}

@media (max-width: 380px) {
  .logo { font-size: 18px; }
  .nav .btn { padding: 0 10px; font-size: 10.5px; }
}


/* Phone, dark theme: keep the light blue edge a fixed small height, so long sections do not get a tall light-blue area behind white text. */
@media (max-width: 800px) {
  [data-theme="dark"] {
    --hero-gradient: linear-gradient(
		180deg, 
		#16366B 0px, 
		#123062 70px, 
		#0B1930 40%, 
		#080E1C 100%
	);

    --hero-gradient-up: linear-gradient(
		0deg, 
		#16366B 0px, 
		#123062 70px, 
		#0B1930 40%, 
		#080E1C 100%
	);
  }


	[data-theme="dark"] main > section#need {
		background: var(--page-bg) !important;
	}

	[data-theme="dark"] .band {
		border-bottom: 0;
	}
}

/* PHONE AND TABLET MENU (dark theme): solid background so the links are easy to read. */
@media (max-width: 1100px) {
  [data-theme="dark"] .menu { background: #0B1220; }
}

/* MENU OPEN: solid menu background, and the page behind it is blurred and dimmed. */
@media (max-width: 1100px) {
  .menu { background: rgba(235, 243, 255, 0.92); }
  [data-theme="dark"] .menu { background: rgba(25, 28, 50, 0.92); }
  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(11, 18, 32, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}