/* ==========================================
   FONT DECLARATIONS
   ========================================== */
@font-face {
  font-family: "Bagnard Sans";
  src: url("BagnardSans.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================
   CSS CUSTOM PROPERTIES
   ========================================== */
:root {
  --bg: #ffffff;
  --bg-gradient: linear-gradient(140deg, rgba(16, 191, 160, 0.05) 0%, rgba(6, 169, 135, 0.03) 45%, #ffffff 90%);
  --blob-1: rgba(16, 191, 160, 0.2);
  --blob-2: rgba(6, 169, 135, 0.16);
  --blob-3: rgba(3, 109, 88, 0.12);
  --bg-soft: rgba(255, 255, 255, 0.6);
  --bg-soft-notes: rgba(255, 255, 255, 0.7);
  --text: #0e1b16;
  --muted: #5a726b;
  --accent: #10bfa0;
  --accent-2: #06a987;
  --card: #ffffff;
  --card-border: #e6eeec;
  --shadow: 0 8px 22px rgba(10, 40, 20, 0.08);
  --radius: 18px;
  --maxw: 980px;
  --maxw-article: 960px;
  --pad: clamp(16px, 3.5vw, 28px);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  scroll-behavior: smooth;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 12% 18%, var(--blob-1), transparent 45%),
    radial-gradient(circle at 82% 8%, var(--blob-2), transparent 55%),
    radial-gradient(circle at 70% 85%, var(--blob-3), transparent 50%);
  filter: blur(90px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

/* ==========================================
   LAYOUT
   ========================================== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 1;
}

main {
  padding: 60px 0 60px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: var(--bg-soft);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
}

nav ul {
  position: relative;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
  padding: .4rem;
  border-radius: 999px;
}

.nav-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: calc(100% - .3rem);
  border-radius: 999px;
  background: rgba(16, 191, 160, 0.14);
  box-shadow: 0 8px 22px rgba(10, 40, 20, 0.08);
  transform: translate3d(0, -50%, 0);
  transition: transform .35s ease, width .35s ease, opacity .2s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  width: 0;
  list-style: none;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  transition: color 0.3s ease;
  z-index: 1;
}

nav a.active {
  color: var(--accent);
  font-weight: 700;
}

nav a:hover {
  color: var(--accent);
}

nav a:focus,
nav a:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: .95rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
  margin-top: 60px;
}

/* ==========================================
   HERO SECTIONS
   ========================================== */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(4.2rem, 10vw, 6rem);
  margin-bottom: 12px;
  font-family: "Bagnard Sans", var(--font);
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 64ch;
  margin: 0 auto;
}

/* Homepage hero adjustments */
.hero.home {
  padding: 0;
  margin-bottom: 32px;
}

.hero.home h1 {
  font-size: clamp(4.4rem, 10vw, 6rem);
  margin: 0 0 10px;
}

/* Contact page hero adjustments */
.hero.contact h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
}

/* ==========================================
   SECTIONS
   ========================================== */
section {
  padding: 0;
}

section + section {
  margin-top: 60px;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 1.3rem;
  color: var(--muted);
  text-align: center;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  padding: .78rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03231c;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(10, 40, 20, 0.12);
  color: var(--accent);
}

.btn.primary:hover {
  color: #03231c;
}

.cta {
  display: flex;
  gap: .8rem;
  margin-top: 1.1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card h2 {
  font-size: 1.4rem;
  margin: 0;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.note {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#about .note {
  text-align: left;
  align-items: flex-start;
}

#about .note ul {
  margin: 0 0 0 42px;
  padding: 0;
}

/* ==========================================
   BLOG - FEATURED POSTS
   ========================================== */
.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(16, 191, 160, 0.12);
  padding: .4rem .9rem;
  border-radius: 999px;
}

.feature-meta {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: .95rem;
}

.feature h2 {
  font-size: clamp(2rem, 4.6vw, 2.8rem);
  margin: 8px 0 16px;
}

.feature p {
  color: var(--muted);
  max-width: 62ch;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 18px 0;
}

.feature-tags span {
  font-size: .85rem;
  background: rgba(16, 191, 160, 0.1);
  color: var(--text);
  padding: .3rem .8rem;
  border-radius: 999px;
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 24px;
}

/* ==========================================
   BLOG - POSTS GRID
   ========================================== */
.posts-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 18px;
}

.posts-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.posts-header p {
  margin: 0;
  color: var(--muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  transition: transform .2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  text-decoration: none;
  color: inherit;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.post-card h3 {
  font-size: 1.25rem;
  margin: 12px 0 10px;
}

.post-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: auto;
}

.tag-row span {
  background: rgba(14, 27, 22, 0.06);
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .85rem;
}

.empty-state {
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.7);
}

/* ==========================================
   BLOG POST / ARTICLE CONTENT
   ========================================== */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  color: var(--muted);
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.meta {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1rem;
}

.post {
  margin: 0 0 32px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.section-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.section-box:last-of-type {
  margin-bottom: 0;
}

.section-box section {
  margin-bottom: 28px;
}

.section-box section:last-of-type {
  margin-bottom: 0;
}

section h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

ul, ol {
  margin-left: 1.4rem;
}

/* Code blocks */
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .95rem;
  background: #e9edeb;
  color: #0e1b16;
  padding: .12rem .4rem;
  border-radius: 6px;
}

pre {
  background: #f3f5f4;
  border-radius: 14px;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid #e2e8e6;
  margin: 18px 0;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  display: block;
}

.code-block {
  position: relative;
  margin: 18px 0;
}

.code-block pre {
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid #ced4d1;
  background: #ffffff;
  color: #0e1b16;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(10, 40, 20, 0.07);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: #0e1b16;
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -36px;
  right: 0;
  background: #0e1b16;
  color: #ffffff;
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(10,40,20,0.25);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.copy-btn:hover::after,
.copy-btn:focus-visible::after,
.copy-btn.copied::after {
  opacity: 1;
  transform: translateY(0);
}

/* Callouts and special sections */
.callout {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 1rem;
}

.grid-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(16,191,160,0.08);
}

.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 1rem 0;
}

.pros-cons div {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(16, 191, 160, 0.05);
}

.pros-cons h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

/* Tables */
.comparison {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.comparison th,
.comparison td {
  border: 1px solid var(--card-border);
  padding: 0.85rem 1rem;
  text-align: left;
}

.comparison thead {
  background: rgba(16, 191, 160, 0.12);
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 32px;
}

/* ==========================================
   CONTACT FORM
   ========================================== */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-weight: 600;
  color: var(--text);
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .8rem;
}

.contact-value {
  color: var(--muted);
  font-size: 1rem;
}

.contact-form {
  margin-top: 32px;
  gap: 24px;
}

.contact-form form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  min-height: 52px;
}

.contact-form textarea {
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 191, 160, 0.14);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
