/* ==========================================================================
   Logic & Gate — shared site stylesheet
   Design language: faceted-gem (Tanzanite's blue/violet/wine pleochroism)
   crossed with "Logic & Gate" circuitry. Dark void surface extends the
   brand's existing navy header across the whole page.
   ========================================================================== */

:root{
  /* ---- color tokens ---- */
  --void: #081820;
  --void-2: #0a1f28;
  --panel: #0e2832;
  --panel-soft: #123440;
  --panel-line: rgba(234,244,247,0.09);
  --cyan: #00e5ff;
  --violet: #8c6fff;
  --wine: #d14d77;
  --text: #eaf4f7;
  --text-muted: #80a3af;
  --text-faint: #5a7b87;
  --success: #3ddc97;

  /* ---- type ---- */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* ---- layout ---- */
  --max: 1120px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --header-h: 76px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin:0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection{ background: var(--violet); color: #fff; }

a{ color: inherit; }
img{ max-width: 100%; display:block; }

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

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
}

p{ color: var(--text-muted); }
strong{ color: var(--text); }

/* ---- focus visibility (a11y floor) ---- */
a:focus-visible, button:focus-visible, summary:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Ambient background — fixed gradient mesh, sits behind every page
   ========================================================================== */
.bg-mesh{
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(640px 480px at 12% -8%, rgba(0,229,255,0.16), transparent 60%),
    radial-gradient(560px 480px at 96% 18%, rgba(140,111,255,0.14), transparent 60%),
    radial-gradient(480px 420px at 50% 110%, rgba(209,77,119,0.10), transparent 60%),
    var(--void);
}
.bg-grain{
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Gem mark — the signature element. Faceted hexagon built from 6 triangles
   converging at a center point, echoing the crystal facets used inside the
   Tanzanite Mining app itself. The whole mark sweeps hue-rotate to perform
   tanzanite's real optical trait: pleochroism (blue / violet / wine flashes).
   ========================================================================== */
.gem-mark{
  display:inline-block;
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.35));
  animation: gemHue 9s ease-in-out infinite;
}
.gem-mark svg{ display:block; }
.gem-mark .f1{ fill: rgba(0,229,255,0.90); }
.gem-mark .f2{ fill: rgba(0,229,255,0.72); }
.gem-mark .f3{ fill: rgba(0,229,255,0.56); }
.gem-mark .f4{ fill: rgba(0,229,255,0.42); }
.gem-mark .f5{ fill: rgba(0,229,255,0.30); }
.gem-mark .f6{ fill: rgba(0,229,255,0.20); }
.gem-mark .edge{ stroke: rgba(234,244,247,0.55); stroke-width:1.4; fill:none; }

@keyframes gemHue{
  0%, 100% { filter: hue-rotate(0deg) drop-shadow(0 0 10px rgba(0,229,255,0.35)); }
  50%      { filter: hue-rotate(70deg) drop-shadow(0 0 14px rgba(209,77,119,0.35)); }
}

/* ==========================================================================
   Header
   ========================================================================== */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display:flex;
  align-items:center;
  background: rgba(8,24,32,0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--panel-line);
  transition: background 0.25s ease, border-color 0.25s ease;
}
header.site-header.is-scrolled{
  background: rgba(8,24,32,0.88);
  border-bottom-color: rgba(0,229,255,0.18);
}
.header-flex{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 18px;
  width:100%;
}
.logo{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.logo .gem-mark{ width:30px; }
.logo-text h1{
  font-size: 1.15rem;
  margin:0;
  letter-spacing: 0.01em;
}
.logo-text p{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 1px 0 0;
}

.nav-links{
  display:flex;
  align-items:center;
  gap: 30px;
}
.nav-links a{
  position:relative;
  text-decoration:none;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left:0; right:100%;
  bottom:0;
  height:2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: right 0.25s ease;
  border-radius: 2px;
}
.nav-links a:hover{ color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after{ right:0; }
.nav-links a.active{ color: var(--text); }

.nav-toggle{
  display:none;
  background:none;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  width: 42px; height: 38px;
  cursor:pointer;
  position:relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:"";
  position:absolute;
  left: 10px; right: 10px;
  height:2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle span{ top: 18px; }
.nav-toggle span::before{ top: -7px; }
.nav-toggle span::after{ top: 7px; }
.nav-toggle.is-open span{ background: transparent; }
.nav-toggle.is-open span::before{ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span::after{ transform: translateY(-7px) rotate(-45deg); }

/* ---- scroll progress bar ---- */
.scroll-progress{
  position: sticky;
  top: var(--header-h);
  left:0;
  height: 2px;
  width:0%;
  z-index: 99;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--wine));
}

@media (max-width: 860px){
  .nav-toggle{ display:block; }
  .nav-links{
    position: fixed;
    top: var(--header-h);
    left:0; right:0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(8,24,32,0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--panel-line);
    padding: 10px 24px 18px;
    transform: translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.is-open{ opacity:1; transform: translateY(0); pointer-events:auto; }
  .nav-links a{ width:100%; padding: 12px 0; border-bottom: 1px solid var(--panel-line); }
  .nav-links a:last-child{ border-bottom:none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  color: #061319;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,229,255,0.18);
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px rgba(140,111,255,0.28); filter: saturate(1.15); }
.btn[aria-disabled="true"]{
  pointer-events:none;
  opacity: 0.55;
  filter: grayscale(0.3);
}
.btn-outline{
  background: transparent;
  border: 1.5px solid var(--panel-line);
  color: var(--text);
  box-shadow:none;
}
.btn-outline:hover{ border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(0,229,255,0.25); }

/* ==========================================================================
   Eyebrow / divider / page header
   ========================================================================== */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom: 14px;
}
.eyebrow::before{ content:"//"; color: var(--text-faint); }

.divider-circuit{
  width:100%;
  height: 30px;
  margin: 8px 0 34px;
  opacity: 0.6;
  background-repeat: no-repeat;
  background-position: center center, center 50%;
  background-size: 8px 8px, 100% 1.5px;
  background-image:
    radial-gradient(circle, var(--cyan) 0 3px, transparent 4px),
    linear-gradient(90deg, transparent, var(--cyan), var(--violet) 50%, var(--wine), transparent);
}

.page-header{
  padding: 56px 0 18px;
}
.page-header h1{ font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 0 0 10px; }
.page-header .dek{ color: var(--text-muted); max-width: 640px; font-size: 1.02rem; }
.page-header .meta{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 14px;
  border-left: 2px solid var(--cyan);
  padding-left: 12px;
}

/* ==========================================================================
   Hero (index only)
   ========================================================================== */
.hero{
  padding: 64px 0 40px;
  position: relative;
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items:center;
  gap: 40px;
}
.hero h2{
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  margin: 0 0 18px;
}
.hero h2 .accent{
  background: linear-gradient(100deg, var(--cyan), var(--violet) 65%, var(--wine));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero p.lede{
  font-size: 1.08rem;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-cta{ display:flex; flex-wrap:wrap; gap: 12px; }

.hero-gem-stage{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 320px;
}
.hero-gem-stage .gem-mark{ width: min(320px, 80vw); }
.hero-gem-stage::before{
  content:"";
  position:absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.16), transparent 70%);
  filter: blur(10px);
}

@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; text-align:center; }
  .hero p.lede{ margin-left:auto; margin-right:auto; }
  .hero-cta{ justify-content:center; }
  .hero-gem-stage{ order:-1; min-height: 220px; }
}

/* ==========================================================================
   Sections / panels / cards
   ========================================================================== */
section{ padding: 18px 0 56px; }

.panel{
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  position: relative;
}
.panel::before{
  content:"";
  position:absolute; inset:0;
  border-radius: inherit;
  padding:1px;
  background: linear-gradient(135deg, rgba(0,229,255,0.25), transparent 30%, transparent 70%, rgba(140,111,255,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}

.panel h2{
  font-size: 1.4rem;
  margin: 38px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-line);
}
.panel h2:first-child{ margin-top:0; }
.panel ul{ margin: 0 0 16px 22px; color: var(--text-muted); }
.panel li{ margin-bottom: 8px; }

.section-title{
  text-align:center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
}
.section-sub{ text-align:center; color: var(--text-muted); max-width: 520px; margin: 0 auto 40px; }

/* ---- reveal-on-scroll ---- */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* ==========================================================================
   Feature cards (index)
   ========================================================================== */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover{
  transform: translateY(-5px);
  border-color: rgba(0,229,255,0.35);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,229,255,0.12);
}
.card .icon{ font-size: 1.8rem; display:block; margin-bottom: 14px; }
.card h3{ font-size: 1.18rem; margin: 0 0 8px; }
.card p{ margin:0; font-size: 0.93rem; }

/* ==========================================================================
   Spec grid (definition-list style data — company profile / license)
   ========================================================================== */
.spec-grid{
  display:grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  overflow:hidden;
  margin: 18px 0 28px;
}
.spec-grid > div{ display:contents; }
.spec-label, .spec-value{
  padding: 14px 18px;
  border-bottom: 1px solid var(--panel-line);
  font-size: 0.93rem;
}
.spec-grid > div:last-child .spec-label,
.spec-grid > div:last-child .spec-value{ border-bottom:none; }
.spec-label{
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  background: rgba(0,229,255,0.05);
}
.spec-value{ color: var(--text); }
.spec-value a{ color: var(--cyan); text-decoration:none; }
.spec-value a:hover{ text-decoration:underline; }

@media (max-width: 600px){
  .spec-grid{ grid-template-columns: 1fr; }
  .spec-grid > div{
    display:block;
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--panel-line);
  }
  .spec-grid > div:last-child{ border-bottom: none; }
  .spec-label{
    display:block;
    width:auto;
    border-bottom:none;
    background:none;
    padding: 0 0 6px;
  }
  .spec-value{
    display:block;
    padding: 0;
    border-bottom:none;
  }
}

/* ---- license number chip ---- */
.license-number{
  font-family: var(--font-mono);
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  padding: 12px 20px;
  border-radius: 12px;
  display:inline-block;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.note-box{
  background: rgba(0,229,255,0.06);
  border-left: 3px solid var(--cyan);
  padding: 14px 20px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 0.92rem;
  color: var(--text);
}

/* ==========================================================================
   Signature / declaration block (company profile)
   ========================================================================== */
.signature-area{
  margin-top: 30px;
  padding: 26px;
  background: var(--panel-soft);
  border: 1px dashed var(--panel-line);
  border-radius: var(--radius-md);
  position: relative;
  overflow:hidden;
}
.signature-area .gem-mark{
  position:absolute;
  right: 16px; top: 16px;
  width: 64px;
  opacity: 0.14;
  animation: none;
  filter:none;
  pointer-events: none;
}
.signature-img{
  max-width: 250px;
  max-height: 80px;
  margin: 15px 0;
  display:block;
  filter: brightness(0) invert(1);
}
.signature-fallback{
  display:none;
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 0.85rem;
}
.signature-area .sig-meta{ margin-top: 14px; color: var(--text-muted); font-size: 0.93rem; }
.signature-area .sig-meta strong{ color: var(--text); }

/* ==========================================================================
   Support page — contact methods + FAQ
   ========================================================================== */
.contact-methods{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 8px 0 8px;
}
.method{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-align:center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.method:hover{ border-color: rgba(0,229,255,0.3); transform: translateY(-3px); }
.method .icon{ font-size: 2.2rem; }
.method h3{ margin: 14px 0 8px; font-size: 1.1rem; }
.method p{ font-size: 0.92rem; margin: 0 0 6px; }
.method a{ color: var(--cyan); text-decoration:none; font-weight:600; }
.method a:hover{ text-decoration:underline; }

.copy-btn{
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.25);
  color: var(--cyan);
  border-radius: 8px;
  padding: 5px 10px;
  cursor:pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: background 0.2s ease;
}
.copy-btn:hover{ background: rgba(0,229,255,0.16); }

.faq h2{ text-align:center; margin: 44px 0 26px; }
details.faq-item{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}
details.faq-item[open]{ border-color: rgba(0,229,255,0.3); }
details.faq-item summary{
  list-style:none;
  cursor:pointer;
  font-weight:600;
  color: var(--text);
  padding: 16px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
details.faq-item summary::-webkit-details-marker{ display:none; }
details.faq-item summary .chev{
  font-family: var(--font-mono);
  color: var(--cyan);
  transition: transform 0.25s ease;
  flex-shrink:0;
}
details.faq-item[open] summary .chev{ transform: rotate(45deg); }
.faq-body{
  padding: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast{
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--panel-soft);
  border: 1px solid rgba(0,229,255,0.35);
  color: var(--text);
  font-size: 0.88rem;
  padding: 11px 20px;
  border-radius: 999px;
  opacity:0;
  pointer-events:none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.toast.is-visible{ opacity:1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top{
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px; height:46px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  font-size: 1.1rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transform: translateY(10px);
  pointer-events:none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
  z-index: 90;
}
.back-to-top.is-visible{ opacity:1; transform:none; pointer-events:auto; }
.back-to-top:hover{ border-color: var(--cyan); }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer{
  border-top: 1px solid var(--panel-line);
  padding: 36px 0;
  margin-top: 30px;
  text-align:center;
}
footer.site-footer p{ margin: 6px 0; font-size: 0.88rem; }
footer.site-footer .foot-links a{
  color: var(--text-muted);
  text-decoration:none;
  font-size: 0.85rem;
}
footer.site-footer .foot-links a:hover{ color: var(--cyan); }
footer.site-footer .foot-links{ display:flex; flex-wrap:wrap; justify-content:center; gap: 6px; }
footer.site-footer .foot-links span{ color: var(--text-faint); }
footer.site-footer .foot-mark{ margin-bottom: 10px; opacity: 0.7; }

/* ==========================================================================
   Responsive base
   ========================================================================== */
@media (max-width: 700px){
  .panel{ padding: 30px 22px; }
  .container{ padding: 0 18px; }
}

/* ---- page-load entrance (hero) ---- */
@keyframes fadeUp{ from{ opacity:0; transform: translateY(16px); } to{ opacity:1; transform:none; } }
.load-in{ animation: fadeUp 0.7s ease both; }
.load-in.d1{ animation-delay: 0.05s; }
.load-in.d2{ animation-delay: 0.16s; }
.load-in.d3{ animation-delay: 0.27s; }
.load-in.d4{ animation-delay: 0.38s; }

/* ---- staggered reveal for grids ---- */
.grid .reveal:nth-child(1){ transition-delay: 0s; }
.grid .reveal:nth-child(2){ transition-delay: 0.07s; }
.grid .reveal:nth-child(3){ transition-delay: 0.14s; }
.grid .reveal:nth-child(4){ transition-delay: 0.21s; }
.grid .reveal:nth-child(5){ transition-delay: 0.28s; }
.contact-methods .reveal:nth-child(1){ transition-delay: 0s; }
.contact-methods .reveal:nth-child(2){ transition-delay: 0.1s; }
