/* =========================================================================
   Julian Mancia Consulting — Styles
   Graphik (Commercial Type), self-hosted trial builds.
   ========================================================================= */

/* ---------- @font-face ---------- */
@font-face { font-family:'Graphik'; font-style:normal; font-weight:100;
  src:url('../fonts/Graphik-Thin-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:200;
  src:url('../fonts/Graphik-Extralight-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:300;
  src:url('../fonts/Graphik-Light-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:400;
  src:url('../fonts/Graphik-Regular-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:500;
  src:url('../fonts/Graphik-Medium-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:600;
  src:url('../fonts/Graphik-Semibold-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:700;
  src:url('../fonts/Graphik-Bold-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:normal; font-weight:800 900;
  src:url('../fonts/Graphik-Black-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:italic; font-weight:400;
  src:url('../fonts/Graphik-RegularItalic-Trial.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'Graphik'; font-style:italic; font-weight:700;
  src:url('../fonts/Graphik-BoldItalic-Trial.otf') format('opentype'); font-display:swap; }

/* ---------- Tokens ---------- */
:root {
  --font-sans: 'Graphik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ink:        #000000;
  --paper:      #FFFFFF;
  --gray-900:   #1A1A1A;
  --gray-700:   #4D4D4D;
  --gray-500:   #808080;
  --gray-400:   #A6A6A6;
  --gray-300:   #CCCCCC;
  --gray-200:   #E5E5E5;
  --gray-100:   #F2F2F2;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: #000;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
img { display: block; }
em { font-style: italic; }
strong { font-weight: 700; }
::selection { background: #000; color: #fff; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  height: 72px;
}
.nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav__logo img {
  height: 48px;
  width: auto;
}
.nav__links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 30px;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #000;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle.is-open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle.is-open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__link {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray-700);
  transition: color 0.15s;
}
.nav__link:hover { color: #000; }
.nav__link--substack { color: #FF6719; }
.nav__link--substack:hover { color: #e55500; }
.nav__link--linkedin { color: #0A66C2; }
.nav__link--linkedin:hover { color: #084f9a; }
.nav__cta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fff;
  background: #000;
  padding: 12px 22px;
  transition: opacity 0.15s;
}
.nav__cta:hover { opacity: 0.78; }

/* ---------- SECTIONS (shared) ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}
.section-label {
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.section-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}
.section-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1;
}

/* ---------- HERO ---------- */
.hero {
  padding: 96px 0 120px;
}
.hero h1 {
  margin: 0;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-size: clamp(40px, 5.2vw, 72px);
  max-width: 17ch;
}
.hero__credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
}
.hero__cred {
  padding: 0 40px;
  border-left: 1px solid var(--gray-200);
}
.hero__cred:first-child {
  padding-left: 0;
  border-left: none;
}
.hero__cred-label {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #000;
}
.hero__cred-value {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.45;
}

/* ---------- ABOUT ---------- */
.about {
  padding: 120px 0;
}
.about .section-label {
  margin-bottom: 72px;
}
.about__grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 80px;
  align-items: start;
}
.about__text p {
  margin: 0 0 32px;
  font-size: 20px;
  line-height: 1.58;
  color: var(--gray-900);
  text-wrap: pretty;
}
.about__text p:last-child {
  margin-bottom: 0;
}
.about__photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border: 1px solid var(--gray-200);
}

/* ---------- SERVICES ---------- */
.services {
  padding: 120px 0;
}
.services .section-label {
  margin-bottom: 56px;
}
.services__intro {
  max-width: 76ch;
}
.services__intro p {
  margin: 0 0 24px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--gray-900);
  text-wrap: pretty;
}
.services__intro p:last-child {
  margin-bottom: 0;
}
.services__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 72px;
}
.services__col {
  background: var(--gray-100);
  border-top: 3px solid #000;
  padding: 40px 44px 44px;
}
.services__col-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.services__col-title {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.services__col-subtitle {
  margin: 0 0 36px;
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.4;
}
.services__list-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.services__list-item {
  position: relative;
  padding: 14px 0 14px 38px;
  border-top: 1px solid var(--gray-200);
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-900);
}
.services__list-num {
  position: absolute;
  left: 0;
  top: 15px;
  font-weight: 700;
  font-size: 10px;
  color: var(--gray-400);
}
.services__list-group {
  margin-bottom: 36px;
}

/* ---------- WORK ---------- */
.work {
  padding: 120px 0;
}
.work .section-label {
  margin-bottom: 48px;
}
.work__intro {
  max-width: 80ch;
  margin-bottom: 56px;
}
.work__intro p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-900);
  text-wrap: pretty;
}
.work__intro p:last-child {
  margin-bottom: 0;
  color: var(--gray-700);
}
.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 80px;
  border-top: 1px solid #000;
}
.work__case {
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
}
.work__case-industry {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  color: #000;
}
.work__case-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-700);
  text-wrap: pretty;
}
.work__footnote {
  margin: 32px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--gray-500);
}

/* ---------- THINKING ---------- */
.thinking {
  padding: 120px 0;
}
.thinking .section-label {
  margin-bottom: 48px;
}
.thinking__list {
  border-top: 1px solid #000;
}
.thinking__item {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--gray-200);
  transition: padding-left 0.2s, background 0.2s;
}
.thinking__item:hover {
  padding-left: 20px;
  background: var(--gray-100);
}
.thinking__item-title {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  flex: 1;
}
.thinking__item-source {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
}
.thinking__item-arrow {
  font-weight: 700;
  font-size: 17px;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.thinking__item:hover .thinking__item-arrow {
  color: #000;
  transform: translateX(4px);
}

/* ---------- CONTACT ---------- */
.contact {
  background: #000;
  color: #fff;
  padding: 120px 0;
}
.contact .section-label {
  margin-bottom: 72px;
}
.contact .section-num {
  color: var(--gray-500);
}
.contact .section-title {
  color: #fff;
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__intro {
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  color: var(--gray-300);
  max-width: 32ch;
  text-wrap: pretty;
}
.contact__intro strong {
  color: #fff;
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.contact__input,
.contact__textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 0;
  border-bottom: 1px solid var(--gray-700);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.contact__input:focus,
.contact__textarea:focus {
  border-bottom-color: #fff;
}
.contact__input::selection,
.contact__textarea::selection {
  background: rgba(255,255,255,0.35);
  color: #fff;
}
.contact__textarea {
  resize: vertical;
}
.contact__error {
  font-size: 13px;
  color: #e05252;
  line-height: 1.4;
  padding: 2px 0;
  display: none;
}
.contact__success {
  font-size: 14px;
  color: #4ade80;
  line-height: 1.55;
  padding: 6px 0;
  display: none;
}
.contact__submit {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #000;
  background: #fff;
  border: none;
  padding: 14px 32px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.contact__submit:hover {
  opacity: 0.84;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--gray-200);
  padding: 44px 0;
}
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer__name {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.footer__copy {
  font-size: 13px;
  color: var(--gray-500);
}
.footer__links {
  margin-left: auto;
  display: flex;
  gap: 28px;
}
.footer__link {
  font-size: 13px;
  color: var(--gray-700);
  transition: color 0.15s;
}
.footer__link:hover {
  color: #000;
}
.footer__link--substack { color: #FF6719; }
.footer__link--substack:hover { color: #e55500; }
.footer__link--linkedin { color: #0A66C2; }
.footer__link--linkedin:hover { color: #084f9a; }

/* ---------- RESPONSIVE ---------- */

/* Large laptop — pull in the generous desktop gutters */
@media (max-width: 1180px) {
  .nav__inner,
  .container,
  .footer__inner { padding: 0 48px; }
  .nav__links { gap: 24px; }
  .about__grid { gap: 64px; }
  .services__columns { gap: 24px; }
  .work__grid { gap: 0 56px; }
  .contact__grid { gap: 64px; }
}

/* Tablet */
@media (max-width: 960px) {
  .nav__inner { padding: 0 32px; }
  .container { padding: 0 32px; }
  .hero { padding: 100px 0 80px; }
  .hero h1 { font-size: clamp(40px, 6.4vw, 64px); }
  .hero__credentials { margin-top: 48px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__text p { font-size: 19px; }
  .about__photo { max-width: 400px; }
  .services__columns { grid-template-columns: 1fr; gap: 24px; }
  .work__grid { grid-template-columns: 1fr; gap: 0; }
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .footer__inner { padding: 0 32px; flex-wrap: wrap; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav__inner { padding: 0 20px; height: 60px; }
  .nav__cta { padding: 10px 16px; font-size: 10px; }
  .container { padding: 0 20px; }
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: clamp(34px, 8.5vw, 46px); max-width: none; }
  .hero__credentials { margin-top: 32px; }
  .section-title { font-size: clamp(28px, 7vw, 38px); }
  .about, .services, .work, .thinking, .contact { padding: 72px 0; }
  /* Offset anchor jumps so section headings clear the shorter sticky nav (matches desktop spacing) */
  .about, .services, .work, .thinking, .contact { scroll-margin-top: 36px; }
  .about__text p { font-size: 18px; }
  .services__intro p { font-size: 17px; }
  .services__col { padding: 32px 24px 36px; }
  .services__col-title { font-size: 26px; }
  .thinking__item { gap: 16px; flex-wrap: wrap; }
  .thinking__item-title { font-size: 17px; flex-basis: 100%; }
  .contact__intro { font-size: 19px; max-width: none; }
  .footer__inner { padding: 0 20px; gap: 16px; }
  .footer__links { margin-left: 0; flex-basis: 100%; gap: 24px; }
}

/* Nav collapses to a hamburger menu — keeps the Contact button on the right */
@media (max-width: 900px) {
  .nav__logo { display: none; }
  .nav__toggle { display: flex; }
  .nav__actions { margin-left: auto; }
  /* Hero credentials revert to a vertical stack once the nav collapses */
  .hero__credentials { display: block; padding-top: 0; }
  .hero__cred {
    padding: 14px 0;
    border-left: none;
    border-bottom: 1px solid var(--gray-200);
  }
  .hero__cred-label { margin-bottom: 4px; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--gray-200);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links.is-open { max-height: 460px; }
  .nav__link {
    font-size: 13px;
    letter-spacing: 0.12em;
    padding: 16px 32px;
    border-top: 1px solid var(--gray-200);
  }
  .nav__link:first-child { border-top: none; }
}
