/* ============================================================================
   INTEGRA SCIENTIFIC — shared chrome styles (navbar + footer + brand fonts)
   Single source of truth for static pages. Mirrors the homepage
   (NavBar.tsx / Footer.tsx / tailwind.config.ts) exactly:
     primary #4B3F72 · primary-container #34285A · secondary #C5A059
     headline Manrope · body/label Inter · wordmark Montserrat 900 + Inter 300
   Pages: include this BEFORE the page stylesheet, load integra-chrome.js
   at the end of <body>, and give content a "padding-top: 80px" offset
   (the navbar is fixed, exactly like the homepage).
   ========================================================================== */

/* --- brand fonts: identical set to app/layout.tsx (next/font) --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@200;300;400;500;600;700;800&family=Montserrat:wght@900&family=Newsreader:ital,wght@0,300;0,400;1,300;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap");

/* match homepage's Tailwind `antialiased` body class exactly —
   without this, tool pages render heavier/bolder than the site at
   identical font-weight values (OS default subpixel AA vs antialiased) */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root {
  --ic-nav-h: 80px; /* overwritten at runtime by integra-chrome.js to the real measured height */
  --ic-primary: #4B3F72;
  --ic-primary-container: #34285A;
  --ic-gold: #C5A059;
  --ic-gold-hover: #D4B26C;
  --ic-ink: #131B2C;
  --ic-font-headline: "Manrope", sans-serif;
  --ic-font-body: "Inter", sans-serif;
  --ic-font-wordmark: "Montserrat", sans-serif;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}

/* --- i18n helpers (same mechanism as the site) --- */
.lang-zh .i18n-en { display: none !important; }
html:not(.lang-zh) .i18n-zh { display: none !important; }

/* ============================ NAVBAR ============================ */
/* NavBar.tsx: nav bg-[#34285A] fixed top-0 w-full z-50 shadow-xl h-20 */
.ic-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--ic-nav-h);
  background: var(--ic-primary-container);
  box-shadow: 0 20px 25px -5px rgba(19,27,44,.1), 0 8px 10px -6px rgba(19,27,44,.1);
  transition: all .3s;
}
/* flex justify-between items-center px-4 md:px-6 lg:px-12 h-full */
.ic-nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px; height: 100%; width: 100%; margin: 0 auto; overflow: hidden;
}
@media (min-width: 768px)  { .ic-nav-inner { padding: 0 24px; } }
@media (min-width: 1024px) { .ic-nav-inner { padding: 0 48px; } }

/* brand: flex items-center gap-2 md:gap-3; logo h-6 md:h-9 xl:h-7 2xl:h-9 */
.ic-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
@media (min-width: 768px) { .ic-brand { gap: 12px; } }
.ic-logo { height: 24px; width: auto; display: block; }
@media (min-width: 768px)  { .ic-logo { height: 36px; } }
@media (min-width: 1280px) { .ic-logo { height: 28px; } }
@media (min-width: 1536px) { .ic-logo { height: 36px; } }
/* wordmark: INTEGRA font-montserrat font-black tracking-tighter mr-1 |
   SCIENTIFIC font-inter font-light tracking-tight opacity-90
   text-lg md:text-2xl xl:text-xl 2xl:text-2xl */
.ic-wordmark { display: flex; align-items: center; color: #fff; }
.ic-wm-integra {
  font-family: var(--ic-font-wordmark); font-weight: 900;
  font-size: 18px; letter-spacing: -0.05em; margin-right: 4px;
}
.ic-wm-sci {
  font-family: var(--ic-font-body); font-weight: 300;
  font-size: 18px; letter-spacing: -0.025em; opacity: .9;
}
@media (min-width: 768px)  { .ic-wm-integra, .ic-wm-sci { font-size: 24px; } }
@media (min-width: 1280px) { .ic-wm-integra, .ic-wm-sci { font-size: 20px; } }
@media (min-width: 1536px) { .ic-wm-integra, .ic-wm-sci { font-size: 24px; } }

/* desktop links: hidden xl:flex gap-4 min-[1350px]:gap-6 2xl:gap-10 */
.ic-links { display: none; align-items: center; gap: 16px; }
@media (min-width: 1280px) { .ic-links { display: flex; } }
@media (min-width: 1350px) { .ic-links { gap: 24px; } }
@media (min-width: 1536px) { .ic-links { gap: 40px; } }
/* link: font-label text-[10px] min-[1350px]:text-xs 2xl:text-sm uppercase tracking-widest pb-1 */
.ic-link {
  position: relative; font-family: var(--ic-font-body);
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  white-space: nowrap; padding-bottom: 4px; text-decoration: none;
  color: rgba(255,255,255,.8); transition: color .3s;
}
@media (min-width: 1350px) { .ic-link { font-size: 12px; } }
@media (min-width: 1536px) { .ic-link { font-size: 14px; } }
.ic-link:hover { color: #fff; }
.ic-link.active { color: var(--ic-gold); }
.ic-underline {
  position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--ic-gold); transition: width .3s;
}
.ic-link:hover .ic-underline, .ic-link.active .ic-underline { width: 100%; }
.ic-qr { font-size: 14px; vertical-align: middle; margin-right: 6px; color: var(--ic-gold);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* actions: flex items-center gap-3 */
.ic-actions { display: flex; align-items: center; gap: 12px; }
/* portal: hidden xl:block bg-gold px-5 py-2.5 min-[1350px]:px-6 py-3 2xl:px-8 py-3.5
   text-[10px]/xs/sm uppercase tracking-widest shadow-lg */
.ic-portal {
  display: none; background: var(--ic-gold); color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 0; text-align: center;
  font-family: var(--ic-font-body); font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  transition: all .2s;
}
@media (min-width: 1280px) { .ic-portal { display: block; } }
@media (min-width: 1350px) { .ic-portal { padding: 12px 24px; font-size: 12px; } }
@media (min-width: 1536px) { .ic-portal { padding: 14px 32px; font-size: 14px; } }
.ic-portal:hover { background: var(--ic-gold-hover); }
.ic-portal:active { transform: scale(.95); }
/* lang toggle: NavBar.tsx = hidden xl:inline-flex items-center self-stretch??  -> matches portal height via same paddings */
.ic-lang {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: rgba(255,255,255,.8); cursor: pointer;
  border: 1px solid rgba(255,255,255,.3); border-radius: 0;
  padding: 10px 16px; font-family: var(--ic-font-body); font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
@media (min-width: 1350px) { .ic-lang { padding: 12px 16px; font-size: 12px; } }
@media (min-width: 1536px) { .ic-lang { padding: 14px 20px; font-size: 14px; } }
.ic-lang:hover { color: #fff; border-color: var(--ic-gold); }

/* burger: xl:hidden, 3 bars w-6 h-0.5 */
.ic-burger {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 36px; height: 36px; padding: 8px; background: transparent; border: 0; cursor: pointer;
}
@media (min-width: 1280px) { .ic-burger { display: none; } }
.ic-burger span { display: block; width: 24px; height: 2px; background: #fff; transition: all .3s; transform-origin: center; }
.ic-burger span + span { margin-top: 6px; }
.ic-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.ic-burger.open span:nth-child(2) { opacity: 0; }
.ic-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* drawer: xl:hidden fixed top-20 bg-[#34285A] border-t border-white/10 */
.ic-drawer {
  position: fixed; top: var(--ic-nav-h); left: 0; right: 0; z-index: 40;
  background: var(--ic-primary-container);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  max-height: 0; opacity: 0; overflow: hidden; transition: all .3s;
}
.ic-drawer.open { max-height: 100vh; opacity: 1; }
@media (min-width: 1280px) { .ic-drawer, .ic-drawer.open { display: none; } }
.ic-drawer-inner { display: flex; flex-direction: column; padding: 0 16px; }
.ic-dlink {
  padding: 16px 0; text-decoration: none;
  font-family: var(--ic-font-body); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.7); transition: color .2s;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 8px;
}
.ic-dlink:hover { color: #fff; }
.ic-dlink.active { color: var(--ic-gold); }
.ic-dlink .ic-qr { font-size: 16px; }
.ic-drawer-cta { display: flex; align-items: center; gap: 12px; padding: 16px 0; }
.ic-dportal {
  flex: 1; display: block; background: var(--ic-gold); color: #fff; text-decoration: none;
  padding: 12px 28px; border-radius: 0; text-align: center;
  font-family: var(--ic-font-body); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em; transition: all .2s;
}
.ic-dportal:hover { background: var(--ic-gold-hover); }
/* drawer lang: same height as the drawer portal button */
.ic-dlang {
  align-self: stretch; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: transparent; color: rgba(255,255,255,.8); cursor: pointer;
  border: 1px solid rgba(255,255,255,.3); border-radius: 0;
  padding: 12px 16px; font-family: var(--ic-font-body); font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em;
  transition: color .2s, border-color .2s;
}
.ic-dlang:hover { color: #fff; border-color: var(--ic-gold); }

.ic-backdrop { display: none; position: fixed; inset: 0; top: var(--ic-nav-h); z-index: 30; background: rgba(0,0,0,.4); }
.ic-backdrop.open { display: block; }
@media (min-width: 1280px) { .ic-backdrop.open { display: none; } }

/* hide the standalone lang toggle only below xl when it sits in the top bar?
   Homepage hides it below xl (drawer has its own). We keep top-bar toggle
   visible on mobile is NOT homepage behaviour -> hide below 1280px. */
@media (max-width: 1279.98px) { .ic-nav .ic-lang { display: none; } }

/* ============================ FOOTER ============================ */
/* Footer.tsx: bg-primary-container border-t border-white/5;
   grid md:grid-cols-4 gap-12 px-16 py-20; copyright px-16 py-10 */
.ic-footer {
  background: var(--ic-primary-container);
  border-top: 1px solid rgba(255,255,255,.05);
  width: 100%; transition: all .3s;
}
.ic-footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 48px;
  padding: 80px 32px; margin: 0 auto;
}
@media (min-width: 768px) { .ic-footer-grid { grid-template-columns: repeat(4, 1fr); padding: 80px 64px; } }
.ic-f-brand { display: flex; flex-direction: column; gap: 32px; }
.ic-f-logo { height: 40px; width: auto; }
@media (min-width: 768px) { .ic-f-logo { height: 48px; } }
.ic-f-text {
  color: rgba(255,255,255,.6); font-family: var(--ic-font-body);
  font-weight: 300; font-size: 14px; line-height: 1.625; letter-spacing: -0.025em; margin: 0;
}
.ic-f-h {
  color: var(--ic-gold); font-family: var(--ic-font-headline); font-weight: 600;
  font-size: 14px; text-transform: uppercase; letter-spacing: .15em; margin: 0 0 32px;
}
.ic-f-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.ic-f-a {
  color: rgba(255,255,255,.6); text-decoration: none;
  font-family: var(--ic-font-body); font-weight: 300; font-size: 14px; transition: all .2s;
}
.ic-f-a:hover { color: var(--ic-gold); }
.ic-f-copy { padding: 40px 64px; border-top: 1px solid rgba(255,255,255,.05); text-align: center; }
.ic-f-copy p {
  color: rgba(255,255,255,.4); font-family: var(--ic-font-body); font-weight: 300;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0;
}
