/* ==========================================================================
   TaskBay — Design System
   ========================================================================== */

:root {
  /* Palette */
  --bg: #FAF7F2;
  --bg-elev: #FFFFFF;
  --bg-alt: #F2EDE3;
  --ink: #0F0F0F;
  --ink-soft: #2B2B2B;
  --muted: #6B6B6B;
  --muted-soft: #9A9A9A;
  --line: #E8E2D5;
  --line-strong: #D6CFBE;
  --accent: #E85D2F;
  --accent-hover: #CC4A1F;
  --forest: #1B4332;
  --forest-soft: #2D6A4F;
  --cream: #FFF8E7;
  --yellow: #FFC857;
  --success: #2D6A4F;

  /* Typography */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Spacing & radius */
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15,15,15,.04), 0 1px 1px rgba(15,15,15,.03);
  --shadow: 0 4px 16px -4px rgba(15,15,15,.08), 0 2px 4px rgba(15,15,15,.04);
  --shadow-lg: 0 20px 50px -12px rgba(15,15,15,.15), 0 8px 20px rgba(15,15,15,.06);

  /* Layout */
  --container: 1280px;
  --nav-h: 72px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 6.5vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
}

.italic-accent { font-style: italic; color: var(--accent); }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  transform: rotate(-6deg);
  transition: transform .3s ease;
}

.brand:hover .brand-mark { transform: rotate(6deg); }

.brand-name em {
  font-style: italic;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color .2s;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}

.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-actions .btn:not(.btn-primary) { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  padding: 32px;
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .94rem;
  font-weight: 500;
  transition: all .2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn-ghost { padding: 8px 14px; }
.btn-ghost:hover { background: var(--bg-alt); }

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }

.btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   HERO (index)
   ========================================================================== */

.hero {
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 64px;
  align-items: end;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.035em;
  line-height: .95;
}

.hero h1 .underline-accent {
  position: relative;
  display: inline-block;
}
.hero h1 .underline-accent::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: 4px;
  height: 14px;
  background: var(--accent);
  z-index: -1;
  border-radius: 4px;
  transform: skew(-8deg, -1deg);
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-meta .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--muted);
}

.hero-meta .item strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 400;
}

.search-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.search-card .eyebrow { margin-bottom: 8px; }
.search-card h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin-bottom: 20px; }

.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(232,93,47,.12);
}

.field textarea { min-height: 110px; resize: vertical; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 80px; }
}

/* Decorative blob */
.hero-blob {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at center, rgba(232,93,47,.18), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   Marquee (trust strip)
   ========================================================================== */

.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll 36s linear infinite;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink-soft);
  align-items: center;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track span::after {
  content: "✦";
  color: var(--accent);
  font-size: 1rem;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Section Header
   ========================================================================== */

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 32px;
  flex-wrap: wrap;
}

.section-head h2 { margin: 8px 0 0; max-width: 720px; }
.section-head p { color: var(--muted); max-width: 460px; margin: 0; }

/* ==========================================================================
   Categories
   ========================================================================== */

.cats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cat {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  transition: all .25s ease;
  cursor: pointer;
  overflow: hidden;
}
.cat:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}
.cat:hover .cat-icon { transform: rotate(-6deg) scale(1.08); }

.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  transition: transform .3s ease;
  font-size: 1.4rem;
}
.cat:nth-child(2n) .cat-icon { background: #FFE4DC; }
.cat:nth-child(3n) .cat-icon { background: #DDF1E5; }
.cat:nth-child(4n) .cat-icon { background: #E7E0F5; }
.cat:nth-child(5n) .cat-icon { background: #FFEBC2; }

.cat-name { font-weight: 500; font-size: .95rem; margin-bottom: 4px; }
.cat-count { font-size: .8rem; color: var(--muted); }

@media (max-width: 1000px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cats { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Service Cards
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .services-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

.svc-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.svc-thumb svg { width: 100%; height: 100%; }

.svc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15,15,15,.85);
  color: #fff;
  font-size: .7rem;
  font-family: var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.svc-save {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all .2s;
}
.svc-save:hover { background: #fff; transform: scale(1.08); }
.svc-save svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; }
.svc-save.active svg { fill: var(--accent); stroke: var(--accent); }

.svc-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.svc-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
}
.svc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--ink);
}
.svc-author .name { font-weight: 500; }
.svc-author .level { color: var(--muted); font-size: .78rem; }

.svc-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.svc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.svc-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  font-weight: 500;
}
.svc-rating svg { width: 14px; height: 14px; fill: var(--yellow); }
.svc-rating .count { color: var(--muted); font-weight: 400; }

.svc-price .from { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.svc-price .price { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--ink); }

/* ==========================================================================
   How it Works
   ========================================================================== */

.hiw {
  background: var(--ink);
  color: var(--bg);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.hiw h2 { color: var(--bg); }
.hiw .eyebrow { color: var(--accent); }
.hiw .section-head p { color: rgba(250,247,242,.65); }

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 64px;
}
@media (max-width: 820px) { .hiw-steps { grid-template-columns: 1fr; } }

.hiw-step {
  padding: 32px;
  border-left: 1px solid rgba(250,247,242,.15);
  position: relative;
}
.hiw-step:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 820px) {
  .hiw-step { border-left: 0; border-top: 1px solid rgba(250,247,242,.15); padding: 32px 0; }
  .hiw-step:first-child { border-top: 0; padding-top: 0; }
}

.hiw-num {
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
}
.hiw-step h4 {
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.hiw-step p { color: rgba(250,247,242,.7); font-size: .98rem; }

.hiw-bg {
  position: absolute;
  bottom: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,93,47,.25), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
  padding: 120px 0;
  text-align: center;
  position: relative;
}

.cta h2 {
  max-width: 900px;
  margin: 0 auto 24px;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.cta p { color: var(--muted); font-size: 1.1rem; max-width: 540px; margin: 0 auto 36px; }

.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

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

footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.foot-col h5 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 18px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a { font-size: .92rem; color: var(--ink-soft); }
.foot-col a:hover { color: var(--accent); }

.foot-brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 16px;
  max-width: 320px;
}

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Browse Page
   ========================================================================== */

.page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 12px;
}
.page-head p { color: var(--muted); max-width: 600px; margin: 0; }

.browse-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 48px 0 96px;
}
@media (max-width: 920px) { .browse-layout { grid-template-columns: 1fr; gap: 24px; } }

.filters {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  height: max-content;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.filters h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
  color: var(--muted);
}

.filter-group { margin-bottom: 28px; }
.filter-group:last-child { margin-bottom: 0; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .92rem;
  cursor: pointer;
  user-select: none;
}
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.check .count { color: var(--muted); margin-left: auto; font-size: .82rem; }

@media (max-width: 920px) { .filters { position: static; } }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.results-bar .count {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}
.results-bar select {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: .9rem;
  cursor: pointer;
}

.services-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .services-grid.col-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid.col-3 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Service Detail
   ========================================================================== */

.svc-detail {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  padding: 56px 0 96px;
}
@media (max-width: 920px) { .svc-detail { grid-template-columns: 1fr; gap: 32px; } }

.crumbs {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 8px; }

.svc-detail h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 20px;
}

.author-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.author-strip .avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.author-strip .name { font-weight: 600; font-size: 1.05rem; }
.author-strip .info { display: flex; gap: 14px; color: var(--muted); font-size: .85rem; align-items: center; }
.author-strip .info .dot { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }

.svc-gallery {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--bg-alt);
}
.svc-gallery svg { width: 100%; height: 100%; }

.detail-section { margin-bottom: 40px; }
.detail-section h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.detail-section p { color: var(--ink-soft); line-height: 1.7; }

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list li {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: .95rem;
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 600;
  margin-top: 1px;
}

.pricing-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  height: max-content;
}

.tier-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tier-tab {
  flex: 1;
  padding: 12px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s;
}
.tier-tab.active { color: var(--ink); border-color: var(--accent); }

.tier-content { display: none; }
.tier-content.active { display: block; }

.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.tier-name { font-weight: 600; font-size: 1.05rem; }
.tier-price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink);
}
.tier-desc { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }

.tier-meta {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: .85rem;
}
.tier-meta div { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.tier-meta svg { width: 14px; height: 14px; }

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: .9rem;
}
.tier-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--ink-soft);
}
.tier-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

/* ==========================================================================
   Forms (post task, login)
   ========================================================================== */

.form-page {
  padding: 56px 0 96px;
}

.form-container {
  max-width: 720px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 48px;
  box-shadow: var(--shadow);
}
@media (max-width: 640px) { .form-card { padding: 28px; } }

.steps-indicator {
  display: flex;
  gap: 4px;
  margin-bottom: 36px;
}
.step-dot {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}
.step-dot.active { background: var(--accent); }

.form-h {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.form-sub { color: var(--muted); margin-bottom: 32px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) { .field-grid { grid-template-columns: 1fr; } }

.chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.selected {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  gap: 12px;
}

.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 2rem;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 32px;
}

.auth-card .field input { padding: 14px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: .82rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-btn {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  background: #fff;
  transition: all .15s;
  margin-bottom: 8px;
}
.oauth-btn:hover { background: var(--bg-alt); border-color: var(--ink); }

.auth-foot {
  text-align: center;
  margin-top: 24px;
  font-size: .92rem;
  color: var(--muted);
}
.auth-foot a { color: var(--accent); font-weight: 500; }

/* ==========================================================================
   Profile
   ========================================================================== */

.profile-hero {
  background: var(--ink);
  color: var(--bg);
  padding: 56px 0 80px;
  position: relative;
}
.profile-hero .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
@media (max-width: 720px) {
  .profile-hero .container { grid-template-columns: 1fr; text-align: center; }
}

.avatar-xl {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 3.5rem;
  border: 4px solid var(--bg);
}

.profile-hero h1 { color: var(--bg); margin-bottom: 6px; font-size: 2.6rem; }
.profile-hero .tagline { color: rgba(250,247,242,.7); font-size: 1.05rem; }

.profile-stats {
  display: flex;
  gap: 32px;
  margin-top: 14px;
}
.profile-stats div { font-size: .85rem; color: rgba(250,247,242,.6); }
.profile-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--bg);
  font-weight: 400;
}

.profile-body {
  padding: 56px 0 96px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}
@media (max-width: 820px) { .profile-body { grid-template-columns: 1fr; } }

.profile-side h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
  color: var(--muted);
}

.skills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.skill {
  padding: 6px 12px;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: .82rem;
}

.review-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.review-card:last-child { border-bottom: 0; }
.review-head {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}
.review-head .name { font-weight: 600; font-size: .95rem; }
.review-head .meta { color: var(--muted); font-size: .82rem; }
.review-stars { display: inline-flex; gap: 2px; color: var(--yellow); }

/* ==========================================================================
   Toast / Notifications
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { width: 16px; height: 16px; color: var(--accent); }

/* ==========================================================================
   Reveal animations on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}
