/* ================================================================
   Trey Cranson -- Personal Portfolio
   ================================================================

   FONT PAIRING -- currently loaded (see header.php <link> tag):
     Headline: 'Sora' (600/700/800)
     Body:     'Inter' (400/500/600)

   ALTERNATE PAIRING OPTIONS (swap the Google Fonts <link> in header.php
   and the font-family values below if you'd rather use one of these):

     Option 2 -- Space Grotesk + IBM Plex Sans
       https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap
       Headline: 'Space Grotesk', sans-serif;
       Body:     'IBM Plex Sans', sans-serif;

     Option 3 -- Plus Jakarta Sans (single family, headline weights + body weights)
       https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap
       Headline: 'Plus Jakarta Sans', sans-serif; (700/800)
       Body:     'Plus Jakarta Sans', sans-serif; (400/500)

   ================================================================ */

:root {
  --color-purple:      #5B3E8E;
  --color-purple-dark: #492f74;
  /* Lighter purple tint for use as an accent on dark backgrounds (e.g. footer
     link hover) -- the base --color-purple fails WCAG AA contrast against
     --color-near-black (2.09:1), this tint passes at 6.23:1. */
  --color-purple-tint: #A98FD1;
  --color-near-black:  #1A1A1D;
  --color-gray-dark:   #4A4A4F;
  --color-gray-light:  #E8E6EC;
  --color-white:       #FFFFFF;

  --font-headline: 'Sora', sans-serif;
  --font-body:      'Inter', sans-serif;

  --max-width: 1120px;
  --radius: 10px;
}

/* --- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-near-black);
  background: var(--color-white);
}
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-near-black);
}

p { margin: 0 0 1em; color: var(--color-gray-dark); }

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

.section { padding: 4rem 0; }
.section--muted { background: var(--color-gray-light); }

.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Shared intro paragraph for sections that need a line of context under
   the title (e.g. Products). Pulls the title's bottom margin up onto
   itself so title -> intro -> content spacing stays even. */
.section__intro {
  text-align: center;
  max-width: 56ch;
  margin: -1.75rem auto 2.5rem;
  font-size: 1.05rem;
}

/* --- Accessibility ---------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-purple);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 2px;
}

/* --- Buttons ---------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--color-purple);
  color: var(--color-white);
}
.btn--primary:hover { background: var(--color-purple-dark); }

.btn--secondary {
  background: transparent;
  border-color: var(--color-purple);
  color: var(--color-purple);
}
.btn--secondary:hover {
  background: var(--color-purple);
  color: var(--color-white);
}

/* ================================================================
   HEADER / NAV
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.brand {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-near-black);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 24px;
  margin: 0 auto;
  background: var(--color-near-black);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-light);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1.5rem;
  gap: 0.25rem;
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.site-nav.is-open {
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}
.site-nav a {
  padding: 0.65rem 0;
  font-weight: 500;
  color: var(--color-near-black);
  border-bottom: 1px solid var(--color-gray-light);
}
.site-nav a:last-child { border-bottom: none; }
.site-nav a:hover { color: var(--color-purple); }

.site-nav__cta {
  color: var(--color-purple) !important;
  font-weight: 600 !important;
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, var(--color-gray-light) 0%, var(--color-white) 100%);
}
.hero__inner { text-align: center; }

.hero__headline {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  max-width: 20ch;
  margin: 0 auto 1rem;
}

.hero__subhead {
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ================================================================
   FEATURED WORK
   ================================================================ */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.work-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.work-card:hover {
  box-shadow: 0 8px 24px rgba(26, 26, 29, 0.08);
  transform: translateY(-2px);
}

/* Placeholder thumbnail block -- 16:9. Swap for a real <img> per the
   TODO comment above each card in index.php. */
.work-card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-dark);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 1rem;
}

.work-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  background-color: var(--color-gray-light);
}

.work-card__name {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-near-black);
}
.work-card__name:hover { color: var(--color-purple); }

.work-card__tag {
  color: var(--color-purple);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

.work-card__blurb {
  font-size: 0.925rem;
  margin: 0.35rem 0 0;
}

.work-card--neutral .work-card__body { padding-bottom: 1.5rem; }

/* ================================================================
   PRODUCTS I'VE BUILT
   Lighter treatment than the Featured Work cards above -- these are
   self-directed products, not client engagements, so the cards read as
   simpler/flatter on purpose (no thumb image, no long blurb).
   ================================================================ */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}

.product-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
  border-color: var(--color-purple);
  transform: translateY(-2px);
}

/* Placeholder logo badge -- swap for a real logo image per the TODO
   comment above each card in index.php. */
.product-card__logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-gray-light);
  color: var(--color-near-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.8rem;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.product-card__name {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-near-black);
}
.product-card__name:hover { color: var(--color-purple); }

.product-card__desc {
  font-size: 0.875rem;
  margin: 0;
}

.product-suite {
  margin-top: 2.5rem;
  background: var(--color-gray-light);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.product-suite__title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  color: var(--color-purple);
  margin-bottom: 1.5rem;
}

.product-grid--suite { max-width: none; }

/* ================================================================
   INDUSTRIES SERVED
   ================================================================ */
.industries-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}
.industries-row li {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ================================================================
   PROCESS / HOW I WORK
   ================================================================ */
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.process-step {
  text-align: center;
  padding: 0 1rem;
}

.process-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-purple);
  color: var(--color-white);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.process-step__title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.process-step__desc { font-size: 0.925rem; max-width: 32ch; margin-left: auto; margin-right: auto; }

/* ================================================================
   CONTACT
   ================================================================ */
.contact__inner { text-align: center; }

.contact__intro {
  max-width: 50ch;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.contact__details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact__item {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-near-black);
}
.contact__item:hover { color: var(--color-purple); }

.contact__item--primary {
  color: var(--color-purple);
  font-size: 1.2rem;
}

.contact__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.contact__social a {
  font-weight: 500;
  color: var(--color-gray-dark);
}
.contact__social a:hover { color: var(--color-purple); }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--color-near-black);
  color: var(--color-white);
  padding: 2.5rem 0;
}

.site-footer__inner { text-align: center; }

.site-footer__name {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-white);
  margin-bottom: 0.25rem;
}

.site-footer__tag {
  color: #b9b7c0;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer__links a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.9rem;
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: var(--color-purple-tint); }

.site-footer__copy {
  color: #8c8a93;
  font-size: 0.8rem;
  margin: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 640px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid--suite { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .process-list { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    border-bottom: none;
    background: transparent;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a {
    padding: 0;
    border-bottom: none;
  }

  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid--suite { grid-template-columns: repeat(3, 1fr); }

  .hero { padding: 6rem 0 5rem; }
}
