/* ==========================================================================
   umanggupta.ca — editorial, restrained, engagement-letter aesthetic
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Fraunces-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Inter-latin.woff2') format('woff2');
}

:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --ivory: #faf7f2;
  --ivory-deep: #f3efe7;
  --bronze: #a8834b;
  --bronze-soft: rgba(168, 131, 75, 0.35);
  --hairline: rgba(15, 23, 42, 0.14);
  --hairline-light: rgba(250, 247, 242, 0.2);
  --muted: #5b6473;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --measure: 62ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

::selection { background: var(--bronze); color: var(--ivory); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---- type ---------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.9rem);
  font-variation-settings: 'opsz' 144;
  font-weight: 470;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-variation-settings: 'opsz' 90;
}

h3 {
  font-size: 1.25rem;
  font-variation-settings: 'opsz' 40;
  font-weight: 560;
}

.lede {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: var(--measure);
}

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  display: block;
  margin-bottom: 1.1rem;
}

.kicker .num { color: var(--muted); margin-right: 0.9em; }

em, .serif-i { font-family: var(--serif); font-style: italic; }

/* ---- nav ----------------------------------------------------------------- */

.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 560;
  font-variation-settings: 'opsz' 40;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.005em;
}
.wordmark span { color: var(--bronze); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  list-style: none;
}

.nav-links a:not(.btn) {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"]:not(.btn) {
  border-bottom-color: var(--bronze);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---- buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  background: var(--ink);
  padding: 1rem 2.1rem;
  border: 1px solid var(--ink);
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

/* ---- hero ---------------------------------------------------------------- */

.hero {
  padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  position: relative;
}

.hero-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-label::before {
  content: '';
  width: 2.6rem;
  height: 1px;
  background: var(--bronze);
}

.hero h1 { max-width: 15ch; }
.hero h1 em { color: var(--bronze); }

.hero .lede { margin-top: 2rem; }

.hero-cta { margin-top: 2.8rem; }

/* ---- sections ------------------------------------------------------------ */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section + .section { border-top: 1px solid var(--hairline); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.section-head { position: sticky; top: 6.5rem; }
.section-head h2 { max-width: 14ch; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 0.98rem; max-width: 36ch; }

/* numbered steps */

.steps { list-style: none; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1rem;
  padding: 1.7rem 0;
}
.steps li + li { border-top: 1px solid var(--hairline); }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variation-settings: 'opsz' 40;
  color: var(--bronze);
  line-height: 1.3;
}

.steps h3 { margin-bottom: 0.45rem; }
.steps p { color: var(--muted); font-size: 0.98rem; max-width: var(--measure); }

/* ---- case note (ink band) ------------------------------------------------ */

.band {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}

.band .kicker { color: var(--bronze); }

.band blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: 'opsz' 100;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 420;
  line-height: 1.45;
  max-width: 30ch;
  color: var(--ivory);
}

.band blockquote strong { color: var(--bronze); font-weight: 500; font-style: italic; }

.band figcaption {
  margin-top: 2rem;
  font-size: 0.86rem;
  color: rgba(250, 247, 242, 0.6);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.band figcaption::before {
  content: '';
  width: 2.2rem;
  height: 1px;
  background: var(--bronze);
}

/* ---- tools --------------------------------------------------------------- */

.tools { display: grid; gap: 0; }

.tool {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2.4rem 0;
}
.tool + .tool { border-top: 1px solid var(--hairline); }

.tool-title h3 { font-size: 1.55rem; max-width: 16ch; }
.tool-title .tool-tag {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  border: 1px solid var(--bronze-soft);
  padding: 0.35rem 0.8rem;
}

.tool-body p { color: var(--muted); font-size: 0.99rem; }
.tool-body p + p { margin-top: 0.9rem; }

.text-link {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 2px;
  transition: color 0.25s ease;
}
.text-link:hover { color: var(--bronze); }

.tool-body .text-link { display: inline-block; margin-top: 1.2rem; }

/* ---- prose blocks -------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink-soft); }
.prose .muted { color: var(--muted); }

/* ---- FAQ ----------------------------------------------------------------- */

.faq { max-width: 100%; }

.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.45rem 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 520;
  font-variation-settings: 'opsz' 40;
  color: var(--ink);
  transition: color 0.25s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--bronze); }

.faq summary::after {
  content: '+';
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--bronze);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq .faq-a {
  padding: 0 0 1.6rem;
  color: var(--muted);
  max-width: var(--measure);
  font-size: 0.99rem;
}

/* ---- diagram (solutions) ------------------------------------------------- */

.diagram {
  border: 1px solid var(--hairline);
  padding: clamp(1.5rem, 4vw, 3rem);
  margin: 2.2rem 0;
  background: var(--ivory-deep);
}

.diagram-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.2rem;
  align-items: stretch;
}

.diagram-node { text-align: center; padding: 1.4rem 1rem; border: 1px solid var(--hairline); background: var(--ivory); display: flex; flex-direction: column; justify-content: center; }
.diagram-node.is-accent { border-color: var(--bronze-soft); }

.diagram-node .dn-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.5rem;
}
.diagram-node .dn-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 540;
  color: var(--ink);
  line-height: 1.3;
}
.diagram-node .dn-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }

.diagram-arrow {
  align-self: center;
  color: var(--bronze);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.diagram-arrow small { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.diagram-caption { margin-top: 1.4rem; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* ---- about --------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.portrait { position: relative; }
.portrait img { width: 100%; height: auto; filter: saturate(0.92); }
.portrait::after {
  content: '';
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border: 1px solid var(--bronze-soft);
  z-index: -1;
}

.credentials { list-style: none; margin-top: 2rem; }
.credentials li {
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  font-size: 0.97rem;
}
.credentials li:last-child { border-bottom: 1px solid var(--hairline); }
.credentials .cred-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  padding-top: 0.25rem;
}

/* ---- contact ------------------------------------------------------------- */

.contact-list { list-style: none; margin-top: 1.8rem; }
.contact-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hairline);
  font-size: 1rem;
}
.contact-list li:last-child { border-bottom: 1px solid var(--hairline); }
.contact-list .c-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  padding-top: 0.3rem;
}
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--bronze-soft); padding-bottom: 1px; }
.contact-list a:hover { border-bottom-color: var(--bronze); }

/* ---- page header (inner pages) ------------------------------------------ */

.page-head { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 18ch; }
.page-head .lede { margin-top: 1.6rem; }

/* ---- footer -------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: rgba(250, 247, 242, 0.75);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--hairline-light);
}

.footer .wordmark { color: var(--ivory); font-size: 1.35rem; }
.footer-tag { margin-top: 0.9rem; max-width: 34ch; color: rgba(250, 247, 242, 0.55); }

.footer h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.1rem;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.6rem; }
.footer a { color: rgba(250, 247, 242, 0.75); text-decoration: none; transition: color 0.25s ease; }
.footer a:hover { color: var(--ivory); }

.footer-legal {
  padding-top: 2.2rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(250, 247, 242, 0.45);
  max-width: 88ch;
}
.footer-legal p + p { margin-top: 0.7rem; }

.footer-bottom {
  margin-top: 2.2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.45);
}

/* ---- reveal animation ---------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---- responsive ----------------------------------------------------------- */

@media (max-width: 860px) {
  .section-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-head { position: static; }
  .tool { grid-template-columns: 1fr; gap: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 13rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; }

  .diagram-flow { grid-template-columns: 1fr; }
  .diagram-arrow { transform: rotate(90deg); padding: 0.4rem 0; }
  .diagram-arrow small { transform: rotate(-90deg); display: none; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.4rem clamp(1.25rem, 4vw, 2.5rem) 1.8rem;
    gap: 1.2rem;
  }
  .nav-links.is-open { display: flex; }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .steps li { grid-template-columns: 3rem 1fr; }
  .credentials li, .contact-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}
