/* ================================================
   Ailian Studios — Global Stylesheet
   Electric Tech Design System
   ================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #0c1117;
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Color Tokens --- */
:root {
  --color-bg:         #ffffff;
  --color-surface:    #f0f4f8;      /* cooler, slightly blue-gray */
  --color-border:     #dde4ed;      /* cooler border */
  --color-text:       #0c1117;      /* near-black with a cool tint */
  --color-muted:      #5a6a7a;      /* cool slate gray */
  --color-accent:     #0c1117;
  --color-accent-2:   #0891b2;      /* electric cyan — primary CTA */
  --color-accent-2-h: #0e7490;      /* hover */
  --color-glow:       #00c2e0;      /* brighter cyan for decorative use */

  --radius-sm:  0px;
  --radius-md:  0px;
  --radius-lg:  0px;

  --shadow-sm:  0 1px 3px rgba(8,145,178,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 20px rgba(8,145,178,0.10);
  --shadow-glow: 0 0 20px rgba(0,194,224,0.18);

  --max-width:  1120px;
  --nav-height: 68px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

section {
  padding: 96px 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 0.9375rem; font-weight: 600; }

p {
  color: var(--color-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--color-muted);
  font-weight: 400;
  line-height: 1.7;
}

/* Monospace eyebrow — techy feel */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 16px;
  display: block;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.nav-logo span:not(.logo-ai) {
  color: var(--color-glow);
  text-shadow: 0 0 12px rgba(0,194,224,0.6);
  animation: cursor-blink 1s step-end infinite;
}

.logo-ai {
  color: var(--color-glow);
  text-shadow: 0 0 10px rgba(0,194,224,1), 0 0 28px rgba(0,194,224,0.8), 0 0 55px rgba(0,194,224,0.4);
  display: inline;
  animation: none;
}

@keyframes ai-breathe {
  0%, 100% {
    color: var(--color-glow);
    text-shadow: 0 0 6px rgba(0,194,224,0.6), 0 0 20px rgba(0,194,224,0.2);
  }
  50% {
    color: #fff;
    text-shadow: 0 0 10px rgba(0,194,224,1), 0 0 28px rgba(0,194,224,0.8), 0 0 55px rgba(0,194,224,0.4);
  }
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--color-accent-2) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  transition: background 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 0 0 rgba(8,145,178,0);
}

.nav-cta:hover {
  background: var(--color-accent-2-h) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(8,145,178,0.35) !important;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 0;
  transition: 0.2s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent-2);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-2-h);
  color: #fff;
  box-shadow: 0 0 20px rgba(8,145,178,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent-2);
  color: var(--color-accent-2);
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 36px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(8,145,178,0.25);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

/* --- Grid Helpers --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 56px;
}

.section-header.centered {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-bottom: 16px;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
}

/* --- Terminal / code-style tag --- */
.terminal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background: #0c1117;
  color: var(--color-glow);
  padding: 3px 10px;
  border-radius: 0;
  display: inline-block;
  letter-spacing: 0.05em;
}

/* --- Footer --- */
.footer {
  background: #0c1117;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 0 36px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  font-size: 1.0625rem;
  margin-bottom: 12px;
  display: block;
  color: #ffffff;
}

.footer-brand .nav-logo span:not(.logo-ai) {
  color: var(--color-glow);
  text-shadow: 0 0 12px rgba(0,194,224,0.6);
  animation: cursor-blink 1s step-end infinite;
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
  max-width: 240px;
}

.footer-links h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links ul a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-links ul a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.25);
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(8,145,178,0.1);
  color: var(--color-accent-2);
  border: 1px solid rgba(8,145,178,0.25);
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  margin-bottom: 16px;
}

/* --- Form --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-accent-2);
  box-shadow: 0 0 0 3px rgba(8,145,178,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #aab4be;
  font-style: italic;
}

/* --- Utility --- */
.text-muted { color: var(--color-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.gap-16 { gap: 16px; }
.flex  { display: flex; }
.items-center { align-items: center; }

/* --- Responsive --- */
@media (max-width: 768px) {
  section { padding: 64px 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
