/* ===========================
   Mem Hack Week NYC — site styles
   Brand palette: Paper / Canvas / Latte / Ink / Cornflower / Tomato
   =========================== */

@font-face {
  font-family: "Ritual";
  src: url("fonts/Ritual.woff2") format("woff2-variations"),
       url("fonts/Ritual.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Mem brand palette */
  --paper:      #FFFFFF;
  --canvas:     #FCF8F1;
  --latte:      #F1E7D3;
  --ink:        #100F31;
  --ink-70:     rgba(16, 15, 49, 0.70);
  --ink-50:     rgba(16, 15, 49, 0.50);
  --ink-30:     rgba(16, 15, 49, 0.30);
  --ink-15:     rgba(16, 15, 49, 0.15);
  --ink-08:     rgba(16, 15, 49, 0.08);
  --cornflower: #6792FF;
  --cornflower-soft: #DDE6FF;
  --cornflower-dark: #3A6AE6;
  --tomato:     #FF5C45;
  --tomato-soft: #FFE2DB;
  --tomato-dark: #D93D28;

  /* Semantic aliases */
  --bg:            var(--canvas);
  --bg-warm:       var(--latte);
  --surface:       var(--paper);
  --text:          var(--ink);
  --text-muted:    var(--ink-70);
  --text-subtle:   var(--ink-50);
  --border:        rgba(16, 15, 49, 0.12);
  --border-strong: rgba(16, 15, 49, 0.24);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Ritual", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 15, 49, 0.05);
  --shadow-md: 0 6px 24px rgba(16, 15, 49, 0.08);
  --shadow-lg: 0 16px 48px rgba(16, 15, 49, 0.12);
}

/* Per-project accent */
body[data-project="floating-mem"] {
  --accent:      var(--tomato);
  --accent-soft: var(--tomato-soft);
  --accent-dark: var(--tomato-dark);
}

body[data-project="huddle-mode"] {
  --accent:      var(--cornflower);
  --accent-soft: var(--cornflower-soft);
  --accent-dark: var(--cornflower-dark);
}

body[data-project="smart-views"] {
  --accent:      var(--ink);
  --accent-soft: rgba(16, 15, 49, 0.10);
  --accent-dark: var(--ink);
}

body[data-project="overview"] {
  --accent:      var(--tomato);
  --accent-soft: var(--tomato-soft);
  --accent-dark: var(--tomato-dark);
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* ===== Site header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 248, 241, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--ink);
}

.logo__lockup {
  height: 22px;
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.logo:hover .logo__lockup {
  transform: scale(1.03);
}

.logo__divider {
  width: 1px;
  height: 18px;
  background: var(--ink-30);
  flex-shrink: 0;
}

.logo__text {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--ink-08);
}

.nav-link.is-active {
  color: var(--ink);
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
}

.nav-link--overview.is-active::after     { background: var(--tomato); }
.nav-link--floating-mem.is-active::after { background: var(--tomato); }
.nav-link--huddle-mode.is-active::after  { background: var(--cornflower); }
.nav-link--smart-views.is-active::after  { background: var(--ink); }

/* ===== Page layout ===== */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}

/* ===== Hero ===== */

.hero {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero__kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

body[data-project="smart-views"] .hero__kicker {
  color: var(--ink);
  background: rgba(16, 15, 49, 0.08);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 18px;
  color: var(--ink);
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
  max-width: 640px;
  font-weight: 400;
}

/* ===== Project cards (overview landing) ===== */

.project-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 56px;
}

@media (min-width: 720px) {
  .project-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--tomato));
}

.project-card--floating-mem { --card-accent: var(--tomato); }
.project-card--huddle-mode  { --card-accent: var(--cornflower); }
.project-card--smart-views  { --card-accent: var(--ink); }

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--card-accent);
}

.project-card__tag {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}

.project-card__tagline {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.project-card__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--card-accent);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-card__cta span {
  transition: transform 0.2s ease;
}

.project-card:hover .project-card__cta span {
  transform: translateX(3px);
}

/* ===== Content ===== */

.content {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
}

.content > *:first-child { margin-top: 0; }

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}

.content h2 {
  font-size: 32px;
  margin: 64px 0 18px;
  padding-top: 8px;
  position: relative;
}

.content h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 14px;
}

.content h3 {
  font-size: 23px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.content h4 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 32px 0 8px;
}

.content p {
  margin: 0 0 20px;
}

.content strong {
  font-weight: 600;
  color: var(--ink);
}

.content em {
  font-style: italic;
  color: var(--ink);
}

.content a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(16, 15, 49, 0.14);
  transition: color 0.15s ease, border-bottom-color 0.15s ease;
}

.content a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.content ul, .content ol {
  padding-left: 22px;
  margin: 0 0 22px;
}

.content li {
  margin: 0 0 10px;
}

.content li > p {
  margin: 0 0 8px;
}

.content ul li::marker {
  color: var(--accent);
}

.content ol li::marker {
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--latte);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
}

.content blockquote p:last-child {
  margin-bottom: 0;
}

.content blockquote em {
  color: var(--accent-dark);
  font-style: italic;
}

.content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(16, 15, 49, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}

.content pre {
  background: var(--ink);
  color: var(--canvas);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
  margin: 24px 0;
}

.content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 52px 0;
  position: relative;
}

.content hr::after {
  content: "·  ·  ·";
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 14px;
  color: var(--text-subtle);
  letter-spacing: 0.4em;
  font-size: 14px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.content th, .content td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.content tbody tr:last-child td { border-bottom: none; }

.content th {
  font-weight: 600;
  background: var(--latte);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ===== NYC Skyline ===== */

.skyline {
  position: relative;
  margin-top: 48px;
  padding: 24px 0 0;
  overflow: hidden;
  background: var(--bg);
}

.skyline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
}

.skyline__svg {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: auto;
  max-height: 180px;
}

.skyline__city {
  fill: var(--ink);
  stroke: var(--ink);
}

.skyline__horizon {
  stroke: var(--ink);
  opacity: 0.55;
}

.skyline__sun {
  fill: var(--tomato);
  filter: drop-shadow(0 0 10px rgba(255, 92, 69, 0.55));
  animation: sun-breathe 6s ease-in-out infinite;
  transform-origin: 900px 40px;
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.92; }
}

@media (prefers-reduced-motion: reduce) {
  .skyline__sun { animation: none; }
}

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--latte);
}

.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 28px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
}

/* ===== Responsive ===== */

@media (max-width: 720px) {
  body { font-size: 16px; }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px;
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link { font-size: 13px; padding: 6px 10px; }

  .logo__lockup { height: 20px; }
  .logo__text { font-size: 13.5px; }

  .page { padding: 36px 20px 72px; }

  .hero { margin-bottom: 36px; padding-bottom: 28px; }
  .hero__kicker { margin-bottom: 16px; }
  .hero__subtitle { font-size: 17px; }

  .content h2 { font-size: 28px; margin-top: 48px; }
  .content h3 { font-size: 21px; }

  .content blockquote { font-size: 16px; padding: 14px 18px; }

  .site-footer__inner { flex-direction: column; align-items: flex-start; }

  .skyline { margin-top: 32px; padding: 16px 0 0; }
  .skyline__svg { max-height: 120px; }
}
