/* ============================================
   neilbrews.com — warm editorial coffee site
   ============================================ */

:root {
  /* Palette */
  --cream: #f4ebdc;
  --cream-deep: #ece1cc;
  --paper: #f8f1e3;
  --espresso: #2a1810;
  --espresso-soft: #4a2f23;
  --ink: #1d130c;
  --terracotta: #c25a3a;
  --terracotta-deep: #a04528;
  --brass: #b08945;
  --rule: #2a181030;

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.1  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a {
  color: var(--espresso);
  text-decoration: none;
  border-bottom: 1px solid var(--terracotta);
  transition: color 0.25s ease, border-color 0.25s ease;
}
a:hover {
  color: var(--terracotta);
}

/* ============================================
   NAV
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  background: rgba(244, 235, 220, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav__logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}
.nav__logo-mark {
  font-size: 18px;
  transform: translateY(-1px);
}
.nav__logo-accent {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 500;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__cta {
  background: var(--espresso);
  color: var(--cream) !important;
  padding: 8px 16px;
  border-radius: 100px;
  transition: background 0.25s ease;
}
.nav__cta::after { display: none; }
.nav__cta:hover {
  background: var(--terracotta) !important;
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__links li:last-child { display: block; }
  .nav__links { display: flex; gap: 0; }
  .nav__links li:not(:last-child) { display: none; }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 90px) var(--gutter) 60px;
  position: relative;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 60px;
  font-variation-settings: "opsz" 144;
}
.hero__line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero__line:nth-child(1) { animation-delay: 0.15s; }
.hero__line:nth-child(2) { animation-delay: 0.30s; }
.hero__line:nth-child(3) { animation-delay: 0.45s; }
.hero__line:nth-child(4) { animation-delay: 0.60s; }
.hero__line--italic {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 300;
  padding-left: clamp(40px, 8vw, 120px);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero__body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.hero__portrait {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgba(42, 24, 16, 0.3);
}
.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}
.hero__portrait-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(42, 24, 16, 0.7);
  padding: 6px 12px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.hero__intro p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--espresso-soft);
}
.hero__lede {
  font-size: 19px !important;
  color: var(--espresso) !important;
}
.hero__lede strong {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.stat__num {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.stat__label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  line-height: 1.4;
}

.hero__scroll {
  margin-top: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}
.hero__scroll-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  transform-origin: left;
  animation: lineSlide 2.5s ease-in-out infinite;
}
@keyframes lineSlide {
  0% { transform: scaleX(0); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  51% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@media (max-width: 860px) {
  .hero__body { grid-template-columns: 1fr; }
  .hero__portrait { aspect-ratio: 3/2; max-height: 380px; }
  .hero__line--italic { padding-left: 30px; }
  .hero__stats { gap: 16px; }
}

/* ============================================
   SECTION SHARED
   ============================================ */

.section {
  padding: clamp(60px, 9vw, 120px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.section--alt {
  max-width: none;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section--alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  margin-bottom: 60px;
  max-width: 720px;
}
.section__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-block;
  margin-bottom: 16px;
}
.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 16px;
}
.section__kicker {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--espresso-soft);
  max-width: 540px;
}

/* ============================================
   JOURNAL
   ============================================ */

.journal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.entry {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 36px 32px;
  position: relative;
  transition: background 0.3s ease;
}
.entry:hover {
  background: var(--paper);
}
.entry:nth-child(2n) {
  border-right: none;
}
@media (max-width: 800px) {
  .entry { border-right: none !important; padding: 28px 4px; }
}

.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.entry__method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  padding: 5px 12px;
  border: 1px solid var(--terracotta);
  border-radius: 100px;
}
.entry__date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}

.entry__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 14px;
}

.entry__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--espresso-soft);
  margin-bottom: 24px;
}

.entry__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
}
.entry__specs > div {
  display: flex;
  flex-direction: column;
}
.entry__specs dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-bottom: 2px;
}
.entry__specs dd {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}

/* ============================================
   GEAR
   ============================================ */

.gear {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.gear__item {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.gear__item:hover {
  transform: translateY(-4px);
}

.gear__img {
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  border-radius: 3px;
  margin-bottom: 16px;
  position: relative;
  filter: saturate(0.95) contrast(1.02);
  box-shadow: 0 12px 30px -12px rgba(42, 24, 16, 0.25);
}
.gear__img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent 60%, rgba(42, 24, 16, 0.15));
}

.gear__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 6px;
}
.gear__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--espresso-soft);
}

/* ============================================
   HACKS
   ============================================ */

.hacks {
  list-style: none;
  counter-reset: hack;
  border-top: 1px solid var(--rule);
}

.hack {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 50px);
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  transition: padding-left 0.3s ease;
}
.hack:hover {
  padding-left: 12px;
}

.hack__num {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--terracotta);
  letter-spacing: -0.02em;
}

.hack__body h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 10px;
}
.hack__body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--espresso-soft);
  margin-bottom: 14px;
  max-width: 680px;
}

.hack__verdict {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  display: inline-block;
}
.hack__verdict--yes {
  background: var(--espresso);
  color: var(--cream);
}
.hack__verdict--no {
  background: transparent;
  color: var(--espresso-soft);
  border: 1px solid var(--rule);
}

/* ============================================
   CAFES
   ============================================ */

.cafes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.cafe {
  background: var(--paper);
  padding: 32px;
  transition: background 0.3s ease;
}
.cafe:hover {
  background: var(--cream-deep);
}

.cafe__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 12px;
}
.cafe__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cafe__hood {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  white-space: nowrap;
}

.cafe__note {
  font-size: 15px;
  line-height: 1.65;
  color: var(--espresso-soft);
  margin-bottom: 18px;
}

.cafe__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  padding: 5px 12px;
  border: 1px solid var(--terracotta);
  border-radius: 100px;
  display: inline-block;
}

/* ============================================
   INVITE
   ============================================ */

.section--invite {
  background: var(--espresso);
  color: var(--cream);
  max-width: none;
  padding: clamp(80px, 12vw, 140px) var(--gutter);
  position: relative;
  overflow: hidden;
}
.section--invite::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(194, 90, 58, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(176, 137, 69, 0.1), transparent 50%);
}

.invite {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.invite__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-block;
  margin-bottom: 24px;
}

.invite__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 100px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 40px;
}
.invite__title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}

.invite__body {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(244, 235, 220, 0.85);
  margin-bottom: 22px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.invite__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--terracotta);
  color: var(--cream) !important;
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.005em;
  padding: 18px 32px;
  border-radius: 100px;
  border: none;
  margin-top: 32px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.invite__cta:hover {
  background: var(--terracotta-deep);
  transform: translateY(-2px);
}
.invite__cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}
.invite__cta:hover svg {
  transform: translateX(4px);
}

.invite__small {
  margin-top: 36px;
  font-size: 14px;
  color: rgba(244, 235, 220, 0.6);
}
.invite__small a {
  color: var(--brass);
  border-bottom-color: var(--brass);
}
.invite__small a:hover {
  color: var(--cream);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--cream);
  padding: 50px var(--gutter);
  border-top: 1px solid var(--rule);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.footer__line {
  font-family: var(--display);
  font-size: 16px;
  color: var(--espresso);
  margin-bottom: 8px;
}
.footer__line--small {
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  color: var(--espresso-soft);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .nav__logo-text { font-size: 18px; }
  .hero__meta { font-size: 10px; }
  .hero__stats { grid-template-columns: 1fr; gap: 14px; }
  .entry__specs { grid-template-columns: repeat(2, 1fr); }
  .cafe { padding: 24px; }
}
