/* ==========================================================================
   nikhilunarkant.com — global stylesheet
   Fonts:  DM Serif Display (headings) · Poppins (body)
   ========================================================================== */

:root {
  /* Palette */
  --ink:        #31363d;   /* near-black for headings & dark surfaces */
  --text:       #4b4f58;   /* body text on light backgrounds */
  --muted:      #707680;
  --steel:      #93afc5;   /* signature steel-blue section background */
  --steel-deep: #7e9cb4;
  --light:      #f2f5f7;   /* light grey section background */
  --paper:      #ffffff;
  --dark:       #3a3a3a;   /* dark section background */
  --accent:     #2e6fae;   /* accent blue (rules, links, focus) */
  --line:       #e2e7ec;

  /* Type */
  --serif: "DM Serif Display", Georgia, serif;
  --sans:  "Poppins", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1140px;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(30, 40, 55, .06);
  --shadow-md: 0 12px 32px rgba(30, 40, 55, .14);
  --shadow-lg: 0 24px 60px rgba(20, 28, 40, .28);
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;          /* 17px, as the original */
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2.7rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(2.1rem, 3.8vw, 3.05rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.5rem; }

p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: .55em; }

::selection { background: var(--steel); color: #fff; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .8em 1.9em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease,
              border-color .25s ease, transform .15s ease, box-shadow .25s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #1f2329; box-shadow: var(--shadow-md); }

.btn-light {
  background: #fff;
  color: var(--ink);
}
.btn-light:hover { background: var(--light); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .75);
}
.btn-outline-light:hover { background: #fff; color: var(--ink); }

.btn-lg { font-size: 1.05rem; padding: .95em 2.3em; }

/* ---------- Header / navigation ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  font-weight: 500;
  letter-spacing: .01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: auto; filter: brightness(0) invert(1); }
.brand span { font-size: 1.02rem; white-space: nowrap; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a:not(.btn) {
  color: rgba(255, 255, 255, .85);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .4em 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:not(.btn):hover {
  color: #fff;
  text-decoration: none;
  border-bottom-color: rgba(255, 255, 255, .5);
}
.site-nav a.active {
  color: #fff;
  border-bottom-color: var(--steel);
}

.site-nav .btn { margin-left: .6rem; }

/* Mobile nav */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: calc(100% + .4rem);
    left: 4%;
    right: 4%;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
    background: rgba(35, 38, 43, .97);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav a:not(.btn) { padding: .55em 0; }
  .site-nav .btn { margin: .8rem 0 .2rem; }
}

/* ---------- Hero (front page) ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 7rem;
  background: url("../assets/img/hero.webp") center/cover no-repeat;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(46, 49, 54, .78) 0%,
              rgba(46, 49, 54, .86) 60%,
              rgba(46, 49, 54, .94) 100%);
}
.hero .container { position: relative; }

.hero h1 {
  color: #fff;
  max-width: 21ch;
  margin-bottom: 1.2rem;
}

.hero-quote {
  font-style: italic;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, .82);
  max-width: 52ch;
  border-left: 3px solid var(--steel);
  padding-left: 1.1rem;
  margin: 0 0 2.4rem;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .85);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.hero-scroll:hover { color: #fff; text-decoration: none; }
.hero-scroll svg { animation: bob 2.2s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- Page hero (sub-pages) ---------- */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 52vh;
  padding: 9rem 0 4.5rem;
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(46, 49, 54, .72) 0%,
              rgba(46, 49, 54, .88) 100%);
}
.page-hero .container { position: relative; }

.page-hero .accent-bar { margin-bottom: 1.6rem; }

.page-hero h1 {
  color: #fff;
  font-size: clamp(3rem, 6.5vw, 5rem);
  margin: 0;
}

.page-hero .lead {
  margin: 1rem 0 0;
  font-size: 1.12rem;
  color: rgba(255, 255, 255, .85);
  max-width: 56ch;
}

.accent-bar {
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Sections ---------- */

.section { padding: 6.5rem 0; }
.section-tight { padding: 4.5rem 0; }

.section-light { background: var(--light); }
.section-steel { background: var(--steel); }
.section-dark  { background: var(--dark); color: rgba(255, 255, 255, .88); }

.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-steel h2, .section-steel h3 { color: var(--ink); }

.section-header { max-width: 62ch; margin-bottom: 3.2rem; }
.section-header.center { margin-inline: auto; text-align: center; }
.section-header .accent-bar { margin-bottom: 1.4rem; }
.section-header.center .accent-bar { margin-inline: auto; }

.eyebrow {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-steel .eyebrow { color: #2c3e50; }
.section-dark .eyebrow  { color: var(--steel); }

/* ---------- Card grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.card h3 { font-size: 1.5rem; margin-bottom: .8rem; }

.card .card-num {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--steel-deep);
  letter-spacing: .06em;
  margin-bottom: 1.1rem;
}

.card .btn { margin-top: auto; align-self: flex-start; }
.card p + .btn { margin-top: 1.6rem; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Split (image + text) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

@media (max-width: 900px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 2.6rem; }
  .split-media { max-width: 440px; }
}

/* ---------- CTA band ---------- */

.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 1.6rem; }
.cta-band p {
  max-width: 56ch;
  margin: 0 auto 2.2rem;
}

/* ---------- Publications ---------- */

.book-cover img {
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 100%;
  margin-inline: auto;
}

.buy-block { margin-bottom: 1.9rem; }
.buy-block h4 {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: .8rem;
}
.buy-links { display: flex; flex-wrap: wrap; gap: .7rem; }

.discover-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.discover-list li {
  position: relative;
  padding-left: 1.9em;
  margin-bottom: .85em;
}
.discover-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--steel);
}

.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
  border-left: 4px solid var(--steel);
  padding-left: 1.4rem;
  margin: 0;
}

.newsletter-embed {
  display: flex;
  justify-content: center;
}
.newsletter-embed iframe {
  width: 100%;
  max-width: 620px;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.6rem; }
}

.contact-meta { list-style: none; padding: 0; margin: 2rem 0 2.4rem; }
.contact-meta li {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.1rem;
  color: var(--ink);
}
.contact-meta svg { flex: none; color: #2c3e50; }
.contact-meta a { color: var(--ink); }

.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2.6rem 2.4rem;
  box-shadow: var(--shadow-md);
}
.form-card h3 { margin-bottom: 1.6rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .35rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7em .9em;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 111, 174, .15);
}
.field textarea { resize: vertical; min-height: 140px; }

/* ---------- Footer ---------- */

.site-footer {
  background: #2c3036;
  color: rgba(255, 255, 255, .72);
  padding: 3.6rem 0 2.2rem;
  font-size: .95rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.6rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.footer-brand img { width: 26px; filter: brightness(0) invert(1); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}
.footer-nav a {
  color: rgba(255, 255, 255, .72);
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.footer-nav a:hover { color: #fff; text-decoration: none; }

.footer-contact { line-height: 2; text-align: right; }
.footer-contact a { color: rgba(255, 255, 255, .85); }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 1.6rem;
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

@media (max-width: 720px) {
  .footer-grid { flex-direction: column; }
  .footer-contact { text-align: left; }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

.card-grid .reveal:nth-child(2) { transition-delay: .12s; }
.card-grid .reveal:nth-child(3) { transition-delay: .24s; }

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