/* ============================================================
   THINK LAB INDUSTRIES — Main Site Stylesheet
   Public website styles. Shared by all pages.

   Palette (from brand guidelines):
     Navy      #243746   Teal Dark #2F5D62   Teal Mid #5E8C8A
     Gold      #D5A13A   Gold Lt   #C9A86A   Orange   #C96B3B
     Parchment #E8DDC5   Tan       #D7C7A4   Olive    #7B8B52
     Rust      #A14D3A   Brown     #7A5A3A   Gray     #8C877B

   Type (from brand guidelines):
     Oswald Bold          — main headlines
     Titillium Web 600    — subheadings, nav, callouts
     Source Serif 4       — body copy
     Special Elite        — small labels / accents (sparingly)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Titillium+Web:wght@400;600&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Special+Elite&display=swap');

/* ------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------ */
:root {
  --navy:       #243746;
  --navy-deep:  #1B2A36;
  --teal-dark:  #2F5D62;
  --teal-mid:   #5E8C8A;
  --gold:       #D5A13A;
  --gold-light: #C9A86A;
  --orange:     #C96B3B;
  --parchment:  #E8DDC5;
  --cream:      #F2EBD9;
  --tan:        #D7C7A4;
  --olive:      #7B8B52;
  --rust:       #A14D3A;
  --brown:      #7A5A3A;
  --gray:       #8C877B;

  --font-display: 'Oswald', sans-serif;
  --font-sub:     'Titillium Web', sans-serif;
  --font-body:    'Source Serif 4', serif;
  --font-accent:  'Special Elite', cursive;

  --content-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--navy);
  background-color: var(--cream);
  /* Subtle aged-paper grain, generated inline so no image request is needed */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

h3, h4 {
  font-family: var(--font-sub);
  font-weight: 600;
  line-height: 1.3;
}

a { color: var(--teal-dark); }
a:hover { color: var(--orange); }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-sub);
  z-index: 200;
}
.skip-link:focus { left: 0; color: var(--cream); }

/* Visible focus for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ------------------------------------------------------------
   Decorative brand elements
   ------------------------------------------------------------ */

/* Art-deco divider: line — diamond — line */
.deco-rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  border: none;
}
.deco-rule::before,
.deco-rule::after {
  content: '';
  flex: 1;
  border-top: 2px solid var(--gold);
}
.deco-rule span {
  color: var(--gold);
  font-size: 0.75rem;
  line-height: 1;
}
.deco-rule.centered { max-width: 320px; margin-left: auto; margin-right: auto; }
.deco-rule.on-dark::before,
.deco-rule.on-dark::after { border-color: var(--gold-light); }

/* Small typewriter-style label above section headings */
.section-label {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

/* ------------------------------------------------------------
   Header & navigation
   ------------------------------------------------------------ */
.site-header {
  background-color: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-mark svg { width: 44px; height: 44px; flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cream);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--gold);
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.main-nav a {
  display: block;
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--parchment);
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  border-radius: 3px;
  color: var(--gold);
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    border-bottom: 3px solid var(--gold);
    display: none;
  }
  .main-nav.open { display: block; }

  .main-nav ul { flex-direction: column; padding: 0.5rem 0; }
  .main-nav a { padding: 0.9rem 1.5rem; border-bottom: none; border-left: 3px solid transparent; }
  .main-nav a[aria-current="page"] { border-left-color: var(--gold); }
}

/* ------------------------------------------------------------
   Hero (home) & page banners (interior pages)
   ------------------------------------------------------------ */
.hero,
.page-banner {
  background-color: var(--navy);
  color: var(--parchment);
  text-align: center;
  position: relative;
  overflow: hidden;
  /* Faint horizontal machining lines for a retro-industrial feel */
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(255,255,255,0.02) 3px, rgba(255,255,255,0.02) 6px
  );
}
.hero::before,
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(47,93,98,0.35) 0%, transparent 70%);
  pointer-events: none;
}

.hero { padding: 5rem 1.5rem 4.5rem; }
.page-banner { padding: 3.5rem 1.5rem 3rem; }

.hero > *, .page-banner > * { position: relative; }

.hero-emblem { width: 84px; height: 84px; margin: 0 auto 1.5rem; }

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  color: var(--cream);
}
.hero h1 .sub {
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-top: 0.35rem;
}

.hero-tagline {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-top: 1.5rem;
}

.hero-intro {
  max-width: 620px;
  margin: 1.5rem auto 0;
  color: var(--tan);
  font-size: 1.05rem;
}

.page-banner h1 { font-size: clamp(1.9rem, 5vw, 3rem); color: var(--cream); }
.page-banner p {
  max-width: 620px;
  margin: 1rem auto 0;
  color: var(--tan);
}

/* Call-to-action buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.9rem;
  border: 2px solid var(--gold);
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}
.btn-solid { background: var(--gold); color: var(--navy); }
.btn-solid:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { background: transparent; color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.section { padding: 4rem 0; }
.section-alt { background-color: var(--parchment); border-top: 1px solid var(--tan); border-bottom: 1px solid var(--tan); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.75rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--teal-dark); }
.section-head p { margin-top: 1rem; color: var(--brown); }

/* ------------------------------------------------------------
   Cards (programs, resources, values)
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--cream);
  border: 2px solid var(--teal-dark);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 4px 0 rgba(36, 55, 70, 0.12);
}
/* Gold corner accent, echoing the brand kit's badge framing */
.card::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px;
  border-top: 1px solid var(--gold-light);
}

.card-icon { width: 64px; height: 64px; margin-bottom: 1.25rem; }

.card h3 { color: var(--teal-dark); font-size: 1.2rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.98rem; color: var(--navy); flex: 1; }

.card .card-meta {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--tan);
}

/* Resource list rows */
.resource-list { display: grid; gap: 1.25rem; }

.resource-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--tan);
  border-left: 4px solid var(--teal-dark);
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
}
.resource-item .resource-icon { width: 48px; height: 48px; }
.resource-item h3 { font-size: 1.05rem; color: var(--teal-dark); }
.resource-item p { font-size: 0.92rem; color: var(--brown); margin-top: 0.2rem; }

.resource-tag {
  font-family: var(--font-accent);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--parchment);
  background: var(--teal-dark);
  border-radius: 2px;
  padding: 0.3em 0.8em;
}

@media (max-width: 640px) {
  .resource-item { grid-template-columns: 48px 1fr; }
  .resource-item .resource-tag { grid-column: 2; justify-self: start; margin-top: 0.5rem; }
}

/* ------------------------------------------------------------
   Feature strip (dark band with stats / values)
   ------------------------------------------------------------ */
.feature-strip {
  background: var(--teal-dark);
  color: var(--parchment);
  padding: 3.5rem 0;
}
.feature-strip h2 { color: var(--cream); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}
.pillar h3 {
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.pillar p { font-size: 0.95rem; color: var(--parchment); }
.pillar .pillar-icon { width: 56px; height: 56px; margin: 0 auto 1rem; }

/* ------------------------------------------------------------
   Two-column prose blocks (About page)
   ------------------------------------------------------------ */
.prose-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 800px) { .prose-split { grid-template-columns: 1fr; } }

.prose h2 { font-size: 1.5rem; color: var(--teal-dark); margin-bottom: 1rem; }
.prose p + p { margin-top: 1rem; }

/* Framed panel, styled like a vintage spec plate */
.spec-panel {
  border: 2px solid var(--teal-dark);
  background: var(--parchment);
  padding: 2rem;
  position: relative;
}
.spec-panel::before {
  content: attr(data-label);
  position: absolute;
  top: -0.8em;
  left: 1.25rem;
  background: var(--parchment);
  padding: 0 0.6rem;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.spec-panel ul { list-style: none; }
.spec-panel li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--tan);
  font-size: 0.98rem;
}
.spec-panel li:last-child { border-bottom: none; }
.spec-panel li strong { font-family: var(--font-sub); color: var(--teal-dark); }

/* ------------------------------------------------------------
   Contact page
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--navy);
  color: var(--parchment);
  border-radius: 4px;
  padding: 2.25rem 2rem;
  border: 2px solid var(--gold);
}
.contact-card h2 { color: var(--gold); font-size: 1.3rem; margin-bottom: 1.25rem; }
.contact-card dl { display: grid; gap: 1.1rem; }
.contact-card dt {
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-mid);
}
.contact-card dd { margin: 0.15rem 0 0; }
.contact-card a { color: var(--gold-light); }
.contact-card a:hover { color: var(--gold); }

.social-row { display: flex; gap: 0.9rem; margin-top: 1.75rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--teal-mid);
  border-radius: 50%;
  color: var(--parchment);
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.social-row a:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* Contact form */
.contact-form { display: grid; gap: 1.25rem; }
.form-field label {
  display: block;
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.35rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid var(--gray);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
}
.form-field textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: 0.85rem; color: var(--gray); font-style: italic; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--navy-deep);
  color: var(--tan);
  padding: 3rem 0 2rem;
  border-top: 3px solid var(--gold);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h3 {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin: 0.45rem 0; font-size: 0.95rem; }
.site-footer a { color: var(--parchment); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-blurb { font-size: 0.95rem; max-width: 34ch; }

.footer-motto {
  text-align: center;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(215, 199, 164, 0.2);
}

.footer-legal {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 1.25rem;
}
.footer-legal p + p { margin-top: 0.35rem; }

/* Home page doesn't need the default footer top margin (CTA band sits flush) */
.site-footer.flush { margin-top: 0; }

/* ------------------------------------------------------------
   Laboratory updates log (dated institutional entries)
   ------------------------------------------------------------ */
.update-log { display: grid; gap: 0; border-top: 1px solid var(--tan); }

.update-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0.25rem;
  border-bottom: 1px solid var(--tan);
}
.update-entry .update-date {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  padding-top: 0.2rem;
}
.update-entry h3 { font-size: 1.05rem; color: var(--teal-dark); margin-bottom: 0.25rem; }
.update-entry p { font-size: 0.95rem; color: var(--navy); }

@media (max-width: 560px) {
  .update-entry { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ------------------------------------------------------------
   Publications list (technical notes, reports)
   ------------------------------------------------------------ */
.pub-list { display: grid; gap: 0; border-top: 1px solid var(--tan); }

.pub-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding: 1.3rem 0.25rem;
  border-bottom: 1px solid var(--tan);
}
.pub-item h3 { font-size: 1.05rem; color: var(--teal-dark); }
.pub-item .pub-meta {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
}
.pub-item p {
  grid-column: 1 / -1;
  font-size: 0.93rem;
  color: var(--brown);
}

@media (max-width: 560px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-item .pub-meta { white-space: normal; }
}

/* Quiet institutional footnote under a section */
.section-footnote {
  margin-top: 2rem;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--gray);
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
