/* ============================================
   ArchRealm Technologies Inc.
   Research & Development
   ============================================ */

/* Self-hosted fonts */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Outfit-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Outfit-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Outfit-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Outfit-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/PlusJakartaSans-Regular.woff') format('woff'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/PlusJakartaSans-Medium.woff') format('woff'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/PlusJakartaSans-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/PlusJakartaSans-Bold.woff') format('woff'); }

:root {
  --primary: #C8924B;
  --primary-light: #E0B878;
  --primary-glow: rgba(200, 146, 75, 0.12);
  --primary-glow-strong: rgba(200, 146, 75, 0.25);
  --bg: #0A0E17;
  --bg-alt: #0F1420;
  --bg-card: #141A28;
  --bg-card-hover: #1A2236;
  --surface: #1C2435;
  --text: #E8E4DF;
  --text-mid: #A09888;
  --text-dim: #6B6358;
  --border: rgba(200, 146, 75, 0.1);
  --border-hover: rgba(200, 146, 75, 0.25);
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --section-pad: 72px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.15; font-weight: 600; color: var(--text); }
a { color: inherit; text-decoration: none; transition: all 0.3s; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ AMBIENT BG ============ */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(200, 146, 75, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 146, 75, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 25% 0%, rgba(200, 146, 75, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 75% 100%, rgba(200, 146, 75, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px; letter-spacing: 0.02em;
}
.nav-logo svg { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 400; color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta {
  background: var(--primary); color: var(--bg) !important; padding: 10px 24px;
  border-radius: var(--radius-pill); font-weight: 600; transition: all 0.2s;
}
.nav-cta:hover { background: var(--primary-light); }
.nav-toggle { display: none; }

/* ============ HERO ============ */
.hero {
  position: relative; display: flex; align-items: center;
  padding: 140px 0 72px; overflow: hidden;
}
.hero .container { width: 100%; position: relative; }
.hero-content { max-width: 680px; position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-glow); border: 1px solid rgba(200, 146, 75, 0.2);
  padding: 8px 20px; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  color: var(--primary); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 28px; animation: fadeUp 0.8s ease both;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 2s infinite; }
.hero h1 {
  font-size: clamp(38px, 5.5vw, 68px); font-weight: 700; line-height: 1.08;
  margin-bottom: 24px; animation: fadeUp 0.8s ease 0.1s both;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: 17px; line-height: 1.8; color: var(--text-mid);
  max-width: 540px; margin-bottom: 36px; animation: fadeUp 0.8s ease 0.2s both;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; animation: fadeUp 0.8s ease 0.3s both; }

/* Hero Arch Graphic */
.hero-arch {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 500px; height: 500px; pointer-events: none;
  animation: floatArch 8s ease-in-out infinite;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 500; text-decoration: none; transition: all 0.3s;
}
.btn-primary { background: var(--primary); color: var(--bg); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid rgba(200, 146, 75, 0.3); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-arrow { transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============ SECTIONS ============ */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); }
.section-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  color: var(--primary); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
}
.section-label::before { content: ''; width: 32px; height: 1.5px; background: var(--primary); }
.section-header { margin-bottom: 40px; }
.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.section-desc { font-size: 17px; color: var(--text-mid); max-width: 600px; line-height: 1.8; }

/* ============ PAGE HERO ============ */
.page-hero { padding: calc(72px + 48px) 0 40px; background: var(--bg-alt); }
.page-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 700; margin-bottom: 12px; }
.page-hero h1 span { color: var(--primary); }
.page-hero p { font-size: 17px; color: var(--text-mid); max-width: 580px; line-height: 1.8; }

/* ============ CARDS ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; transition: all 0.4s; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary-glow);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; color: var(--primary); }
.card h3 { font-size: 20px; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-mid); line-height: 1.7; }

/* ============ RESEARCH AREAS GRID ============ */
.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.research-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; text-align: center;
  transition: all 0.3s;
}
.research-item:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.research-item svg { width: 36px; height: 36px; color: var(--primary); margin: 0 auto 16px; display: block; }
.research-item h3 { font-size: 16px; margin-bottom: 8px; }
.research-item p { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* ============ SOMNET FEATURE ============ */
.feature-highlight {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-alt));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px; position: relative; overflow: hidden;
}
.feature-highlight::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
}
.feature-tag {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  color: var(--primary); letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 16px; display: block;
}
.feature-highlight h2 { font-size: 32px; margin-bottom: 16px; }
.feature-highlight p { font-size: 16px; color: var(--text-mid); line-height: 1.8; max-width: 640px; margin-bottom: 20px; }

/* ============ CONTACT ============ */
.contact-card {
  max-width: 640px; margin: 0 auto; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px;
}
.contact-card h2 { font-size: 24px; margin-bottom: 8px; }
.contact-card .sub { font-size: 15px; color: var(--text-mid); margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-mid); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-body); font-size: 15px;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A09888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
  width: 100%; padding: 14px; background: var(--primary); color: var(--bg);
  border: none; border-radius: var(--radius-pill); font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-submit:hover { background: var(--primary-light); }
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-row span { font-size: 15px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.captcha-row input { flex: 1; }
.privacy-note { font-size: 12px; color: var(--text-dim); text-align: center; margin-top: 16px; }

/* ============ LEGAL PAGES ============ */
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 22px; margin: 40px 0 12px; }
.legal-content h3 { font-size: 17px; margin: 24px 0 8px; }
.legal-content p { font-size: 15px; color: var(--text-mid); line-height: 1.8; margin-bottom: 16px; }
.legal-content ul { margin: 0 0 16px 20px; }
.legal-content li { font-size: 15px; color: var(--text-mid); line-height: 1.8; margin-bottom: 6px; }
.legal-effective { font-size: 14px; color: var(--text-dim); margin-bottom: 32px; }
.legal-content strong.warn { color: var(--text); }
.legal-content a { color: var(--primary); }

/* ============ FOOTER ============ */
.footer { background: #060911; color: var(--text-mid); padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-top: 16px; max-width: 280px; }
.footer-heading { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 16px; letter-spacing: 0.03em; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: var(--text-mid); transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(200, 146, 75, 0.06); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.footer-patent { display: block; margin-top: 8px; font-size: 12px; color: var(--text-dim); }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes floatArch { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% + 10px)); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
  .hero-arch { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  :root { --section-pad: 56px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 72px; left: 0; right: 0; background: rgba(10,14,23,0.96); flex-direction: column; padding: 24px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: all 0.3s; }
  .hero { padding: 110px 0 48px; }
  .hero h1 { font-size: clamp(30px, 8vw, 44px); }
  .page-hero { padding: calc(72px + 28px) 0 24px; }
  .page-hero h1 { font-size: clamp(28px, 7vw, 40px); }
  .card-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .contact-card { padding: 32px 24px; }
  :root { --section-pad: 40px; }
}
@media (max-width: 480px) {
  .research-grid { grid-template-columns: 1fr; }
}
