/* ==========================================================================
   Glassbridge Technologies
   Design system — modern, minimal, monochrome with a restrained warm accent.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Palette — light */
  --bg:        #ffffff;
  --bg-alt:    #f6f6f4;
  --ink:       #101112;
  --ink-soft:  #3a3c40;
  --muted:     #74767c;
  --line:      #e7e7e3;
  --line-soft: #f0f0ec;
  --accent:    #b4633a;   /* muted copper, used sparingly */

  /* Type */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1140px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark palette — shared by explicit toggle and system preference */
:root[data-theme="dark"] {
  --bg:        #0b0c0d;
  --bg-alt:    #121315;
  --ink:       #f4f4f2;
  --ink-soft:  #c9cace;
  --muted:     #8a8c92;
  --line:      #24262a;
  --line-soft: #1a1c1f;
  --accent:    #cf7a4d;
}

/* Follow the system only when the visitor hasn't made an explicit choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:        #0b0c0d;
    --bg-alt:    #121315;
    --ink:       #f4f4f2;
    --ink-soft:  #c9cace;
    --muted:     #8a8c92;
    --line:      #24262a;
    --line-soft: #1a1c1f;
    --accent:    #cf7a4d;
  }
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.12; letter-spacing: -0.022em; }

p { margin: 0; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 11vw, 9rem); }
.section--tight { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.eyebrow--accent { color: var(--accent); }

.lede { color: var(--ink-soft); font-weight: 300; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
}
.brand__mark { width: 30px; height: 30px; color: var(--ink); flex: none; }
.brand__word {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding-left: 0.2em; /* balance letter-spacing */
}

.nav__links { display: flex; align-items: center; gap: 2.2rem; }
.nav__link {
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__right { display: flex; align-items: center; gap: 1rem; }

.nav__toggle { display: none; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[data-mode="dark"] .icon-sun { display: block; }
.theme-toggle[data-mode="dark"] .icon-moon { display: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn__arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: transparent; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--light { border-color: var(--line); color: var(--ink); }

/* text link with arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.tlink:hover { border-color: var(--ink); gap: 0.75rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: clamp(5rem, 14vw, 11rem) clamp(4rem, 9vw, 7rem); }

.hero__brand {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 16ch;
  font-weight: 400;
}
.hero__title .accent { color: var(--muted); }

.hero__sub {
  margin-top: 2rem;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.55;
}

.hero__actions {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Generic section heading block
   -------------------------------------------------------------------------- */
.head { max-width: 62ch; }
.head__title {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  letter-spacing: -0.025em;
}
.head__desc {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   "What we do" — expertise list
   -------------------------------------------------------------------------- */
.expertise { margin-top: 3.5rem; border-top: 1px solid var(--line); }
.expertise__row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.expertise__row:hover { padding-left: 0.75rem; }
.expertise__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.expertise__text { font-size: clamp(1.1rem, 1.9vw, 1.4rem); font-weight: 300; color: var(--ink); }

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.step { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.step__num {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.step__num small { font-size: 1rem; color: var(--muted); margin-left: 0.15em; }
.step__title { font-size: 1.35rem; margin-bottom: 0.7rem; }
.step__desc { color: var(--ink-soft); font-weight: 300; font-size: 1rem; }

/* --------------------------------------------------------------------------
   Services list (services page + homepage links)
   -------------------------------------------------------------------------- */
.svc { border-top: 1px solid var(--line); }
.svc__item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.svc__index {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--accent);
  padding-top: 0.35rem;
}
.svc__title {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  letter-spacing: -0.025em;
}
.svc__tag {
  margin-top: 1rem;
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  font-weight: 300;
  color: var(--ink);
}
.svc__body {
  margin-top: 1.5rem;
  max-width: 68ch;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 1.05rem;
}

/* homepage service quick-grid */
.svc-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.3s var(--ease);
}
.svc-card:hover { background: var(--bg-alt); }
.svc-card__k { font-family: var(--serif); color: var(--accent); font-size: 1rem; }
.svc-card__t { font-size: 1.3rem; letter-spacing: -0.02em; }
.svc-card__d { color: var(--ink-soft); font-weight: 300; font-size: 0.98rem; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta { text-align: center; }
.cta__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  max-width: 20ch;
  margin-inline: auto;
}
.cta__desc {
  margin-top: 1.4rem;
  margin-inline: auto;
  max-width: 52ch;
  font-weight: 300;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
}
.cta__actions { margin-top: 2.5rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 780px;
}
.contact-card { border-top: 1px solid var(--ink); padding-top: 1.4rem; }
.contact-card__label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.9rem;
}
.contact-card__value { font-size: 1.2rem; font-weight: 300; }
.contact-card__value a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.2s var(--ease); }
.contact-card__value a:hover { border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3.5rem; }
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 0.7rem; }
.footer__brand .brand__mark { width: 26px; height: 26px; }
.footer__brand .brand__word { font-size: 1.05rem; }
.footer__meta { text-align: right; color: var(--muted); font-size: 0.85rem; line-height: 1.7; }
.footer__links { display: flex; gap: 1.5rem; margin-bottom: 0.4rem; justify-content: flex-end; }
.footer__links a { color: var(--ink-soft); font-size: 0.85rem; transition: color 0.2s var(--ease); }
.footer__links a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .svc-grid { grid-template-columns: 1fr; border-left: none; }
  .svc-card { border-left: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem var(--gutter) 2.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none; border: none; cursor: pointer; padding: 0;
  }
  .nav__toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .svc__item { grid-template-columns: 1fr; gap: 0.5rem; }
  .svc__index { padding-top: 0; }
  .expertise__row { grid-template-columns: 2.5rem 1fr; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}
