@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  --red:        #b00000;
  --red-dark:   #880000;
  --red-light:  #f5e9e9;
  --red-faint: #8f3f3c;
  --ink:        #1a1a1a;
  --ink-mid:    #4a4a4a;
  --ink-faint:  #888;
  --surface:    #faf9f7;
  --white:      #ffffff;
  --rule:       #e2e0db;
  --nav-h:      56px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ─── BASE ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ─── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  overflow: visible !important;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-wordmark {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.header-wordmark h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.header-wordmark h1 .at-unl {
  color: var(--red);
}

.header-sub {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-top: 2px;
}

.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-divider {
  width: 1px;
  height: 36px;
  background: var(--rule);
}

.logo {
  height: 48px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 1; }

/* ─── NAV ────────────────────────────────────────────────── */
.site-nav {
  background: var(--red);
  position: relative;
  z-index: 101;
  overflow: visible;
}

.site-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.nav-main {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: 0;
  height: var(--nav-h);
  position: relative;
  z-index: 1;
}

.nav-main > li {
  display: flex;
  align-items: center;
}

.nav-main > li > a,
.nav-main > li > .nav-trigger {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 1.1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  border: none;
  background: none;
}

.nav-main > li > a:hover,
.nav-main > li > .nav-trigger:hover,
.nav-main > li.active > a {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* Chevron icon on Tools */
.nav-trigger::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ease-out-expo);
}

.dropdown:hover .nav-trigger::after {
  transform: rotate(-135deg) translateY(-2px);
}

/* ─── DROPDOWN ───────────────────────────────────────────── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  list-style: none;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08),
              0 16px 40px -4px rgba(0,0,0,0.16);
  border: 1px solid var(--rule);
  overflow: hidden;
  animation: dropIn 0.18s var(--ease-out-expo);
  z-index: 200;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 400;
  transition: background 0.12s, color 0.12s, padding-left 0.15s;
  border-bottom: 1px solid var(--rule);
}

.dropdown-menu li:last-child a { border-bottom: none; }

.dropdown-menu a:hover {
  background: var(--red-light);
  color: var(--red-dark);
  padding-left: 1.5rem;
}

.dropdown-menu a::before {
  content: '→';
  opacity: 0;
  font-size: 0.7rem;
  color: var(--red);
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.dropdown-menu a:hover::before { opacity: 1; }

/* ─── MAIN CONTENT ───────────────────────────────────────── */
main.container {
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

/* ─── INTRO SECTION ──────────────────────────────────────── */
.intro {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: 0;
  margin-bottom: 4rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
}

.intro-text {
  padding: 2.75rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.intro-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.intro-text p {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.75;
  max-width: 52ch;
  margin-bottom: 1.75rem;
}

.intro-text p a {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}
.intro-text p a:hover { color: var(--red); }

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  background: var(--red-light);
  color: var(--red-dark);
  border: 1px solid rgba(176,0,0,0.15);
  white-space: nowrap;
}

.tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.intro-photo-wrap {
  position: relative;
  overflow: hidden;
  background: #111;
}

.intro-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
  transition: opacity 0.4s, transform 0.6s var(--ease-out-expo);
  min-height: 260px;
}

.intro-photo-wrap:hover .intro-image {
  opacity: 1;
  transform: scale(1.02);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ─── SECTION CARDS ──────────────────────────────────────── */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  transition: box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--red);
  transition: height 0.3s var(--ease-out-expo);
  border-radius: 0 0 3px 0;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  border-color: rgba(176,0,0,0.2);
}

.card:hover::before {
  height: 100%;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
  color: var(--ink);
}

.card p {
  color: var(--ink-mid);
  font-size: 0.92rem;
  line-height: 1.7;
}

.card p a {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}
.card p a:hover { color: var(--red); }

/* Openings card spans full width on desktop */
.card-openings {
  grid-column: 1 / -1;
}

.openings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.opening-item {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.opening-item h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.opening-item p {
  font-size: 0.88rem;
  color: var(--ink-mid);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-mid);
}

.footer-copy a {
  color: var(--ink-mid);
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}
.footer-copy a:hover { color: var(--red); }

.footer-badge {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-badge span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.6;
}

/* ─── PAGE-LOAD ANIMATION ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.intro       { animation: fadeUp 0.55s var(--ease-out-expo) 0.05s both; }
.section-grid .card:nth-child(1) { animation: fadeUp 0.5s var(--ease-out-expo) 0.18s both; }
.section-grid .card:nth-child(2) { animation: fadeUp 0.5s var(--ease-out-expo) 0.26s both; }
.section-grid .card:nth-child(3) { animation: fadeUp 0.5s var(--ease-out-expo) 0.34s both; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
  }

  .intro-photo-wrap {
    order: -1;
    max-height: 260px;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .card-openings {
    grid-column: auto;
  }

  .openings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .header-sub { display: none; }

  .nav-main {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-main::-webkit-scrollbar { display: none; }

  .nav-main > li > a,
  .nav-main > li > .nav-trigger {
    padding: 0 0.85rem;
    font-size: 0.72rem;
  }

  .intro-text { padding: 1.75rem 1.5rem; }
  .card { padding: 1.5rem 1.5rem; }
  .footer-badge { display: none; }

  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255,255,255,1); /* fully opaque since no blur */
  }
.dropdown-menu {
    display: none;
    position: fixed;
    top: calc(62px + var(--nav-h));
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    animation: none;
    max-height: calc(100vh - 62px - var(--nav-h));  /* ← don't overflow screen */
    overflow-y: auto;                                /* ← scroll inside dropdown */
    -webkit-overflow-scrolling: touch;               /* ← smooth on iOS */
  }

.dropdown-menu a {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--rule);
}

}

@media (max-width: 430px) {
  .header-inner {
    height: 62px;
  }

  .header-sub { display: none; }

  .nav-main {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-main::-webkit-scrollbar { display: none; }

  .nav-main > li > a,
  .nav-main > li > .nav-trigger {
    padding: 0 0.85rem;
    font-size: 0.72rem;
  }

  .intro-text { padding: 1.75rem 1.5rem; }
  .card { padding: 1.5rem 1.5rem; }
  .footer-badge { display: none; }
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255,255,255,1); /* fully opaque since no blur */
  }
.dropdown-menu {
    display: none;
    position: fixed;
    top: calc(62px + var(--nav-h));
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    animation: none;
    max-height: calc(100vh - 62px - var(--nav-h));  /* ← don't overflow screen */
    overflow-y: auto;                                /* ← scroll inside dropdown */
    -webkit-overflow-scrolling: touch;               /* ← smooth on iOS */
  }

.dropdown-menu a {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--rule);
}
}