/* ============ Bravely Tech — mission-control aesthetic ============ */

:root {
  --navy: #1A365D;
  --navy-deep: #0F2140;
  --navy-ink: #0B1830;
  --teal: #00B8A9;
  --teal-bright: #2BE3D2;
  --paper: #F6F9FC;
  --white: #FFFFFF;
  --text: #22344E;
  --text-faint: #5B6E88;
  --line: rgba(26, 54, 93, 0.12);
  --font-display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.12; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 24, 48, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(43, 227, 210, 0.15);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.brand-name em { font-style: normal; color: var(--teal-bright); }

.brand { margin-right: auto; }

.site-nav {
  display: none;
  gap: 1.4rem;
}

.site-nav a {
  color: #C7D6EA;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--teal-bright); }

.lang-toggle {
  display: flex;
  border: 1px solid rgba(43, 227, 210, 0.4);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: #C7D6EA;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn[aria-pressed="true"] {
  background: var(--teal);
  color: var(--navy-ink);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(0, 184, 169, 0.18), transparent 60%),
    radial-gradient(800px 420px at 10% 110%, rgba(43, 227, 210, 0.08), transparent 55%),
    var(--navy-ink);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='97' viewBox='0 0 56 48.5'%3E%3Cpath d='M28 0l14 8v16l-14 8-14-8V8z' fill='none' stroke='%232BE3D2' stroke-opacity='0.07' stroke-width='1'/%3E%3Ccircle cx='28' cy='0' r='1.3' fill='%232BE3D2' fill-opacity='0.10'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 9vw, 7.5rem);
  display: grid;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.eyebrow.dark { color: #0E8A80; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 1rem 0 1.2rem;
}

.hero h1 .accent {
  color: var(--teal-bright);
  position: relative;
}

.hero-sub {
  max-width: 34rem;
  color: #B9C9DF;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}

.btn-primary {
  background: var(--teal);
  color: var(--navy-ink);
  box-shadow: 0 6px 24px rgba(0, 184, 169, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); background: var(--teal-bright); }

.btn-ghost {
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

.btn-lg { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* terminal card */

.terminal {
  background: rgba(15, 33, 64, 0.85);
  border: 1px solid rgba(43, 227, 210, 0.25);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  max-width: 26rem;
  width: 100%;
  justify-self: center;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(43, 227, 210, 0.15);
}

.terminal-bar .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(199, 214, 234, 0.25);
}

.terminal-title {
  margin-left: auto;
  font-size: 0.7rem;
  color: #7C90AC;
}

.terminal-body { padding: 1rem 1.1rem 1.2rem; }

.t-line {
  color: #C7D6EA;
  margin: 0.4rem 0;
  opacity: 0;
  animation: t-in 0.45s ease forwards;
}

.t-line .prompt { color: var(--teal-bright); }
.t-line .ok { color: var(--teal-bright); font-weight: 600; }
.t-line.live { color: var(--teal-bright); font-weight: 600; }
.t-line.live .arrow { animation: blink 1.1s step-end infinite; }

.t1 { animation-delay: 0.5s; }
.t2 { animation-delay: 1.1s; }
.t3 { animation-delay: 1.6s; }
.t4 { animation-delay: 2.1s; }
.t5 { animation-delay: 2.7s; }

@keyframes t-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink { 50% { opacity: 0.15; } }

/* staggered reveal */

.reveal {
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.d1 { animation-delay: 0.12s; }
.d2 { animation-delay: 0.24s; }
.d3 { animation-delay: 0.36s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* diagonal edge into next section */

.hero-edge {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: clamp(3rem, 7vw, 5.5rem);
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* ---------- sections shared ---------- */

section { scroll-margin-top: 4.5rem; }

.section-head {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.6rem;
  max-width: 36rem;
}

/* ---------- services ---------- */

.services { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.card-grid {
  max-width: 1120px;
  margin: 2.5rem auto 0;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-radius: 14px;
  padding: 1.6rem 1.4rem 1.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-top-color: var(--teal);
  box-shadow: 0 18px 40px rgba(26, 54, 93, 0.12);
}

.card-ai {
  border-top-color: var(--teal);
  background:
    linear-gradient(180deg, rgba(0, 184, 169, 0.07), transparent 55%),
    var(--white);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.12em;
}

.card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0.7rem 0 0.5rem;
}

.card p { font-size: 0.95rem; color: var(--text-faint); }

/* ---------- products ---------- */

.products {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background:
    linear-gradient(180deg, rgba(0, 184, 169, 0.05), transparent 40%),
    var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-grid {
  max-width: 1120px;
  margin: 2.5rem auto 0;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.product {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.6rem;
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }

.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0E8A80;
  background: rgba(0, 184, 169, 0.12);
  border: 1px solid rgba(0, 184, 169, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}

.product-tag {
  font-weight: 600;
  color: var(--navy);
  margin: 0.5rem 0 0.6rem;
}

.product p:not(.product-tag):not(.product-link) { font-size: 0.95rem; color: var(--text-faint); }

/* ---------- contact ---------- */

.contact {
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(0, 184, 169, 0.22), transparent 60%),
    var(--navy-ink);
  color: var(--white);
  text-align: center;
  padding: clamp(4rem, 9vw, 7rem) 1.25rem;
}

.contact-inner { max-width: 42rem; margin: 0 auto; }

.contact h2 {
  color: var(--white);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.8rem 0 1rem;
}

.contact-sub { color: #B9C9DF; margin-bottom: 2.2rem; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy-ink);
  border-top: 1px solid rgba(43, 227, 210, 0.12);
  color: #7C90AC;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.4rem 1rem;
}

/* ---------- responsive ---------- */

@media (min-width: 640px) {
  .site-nav { display: flex; }
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .terminal { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .t-line { animation: none; opacity: 1; }
  .t-line.live .arrow { animation: none; }
  .card, .btn { transition: none; }
}

.product-link { margin-top: 1rem; }
.product-link a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #0E8A80;
  text-decoration: none;
}
.product-link a:hover { text-decoration: underline; }
