/* Fonts */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/dm-sans-400.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/dm-sans-400-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/dm-sans-500.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/dm-sans-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/fraunces-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/fraunces-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/fraunces-400-italic.woff2') format('woff2');
}

/* Variables */
:root {
    --color-deep: #1a2f38;
    --color-teal: #2d5a5a;
    --color-warm: #e8e0d5;
    --color-cream: #faf8f5;
    --color-accent: #c9a227;
    --color-muted: #6b7c7c;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-cream);
    color: var(--color-deep);
    line-height: 1.6;
    font-size: 17px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    padding: 28px 0;
    position: relative;
    z-index: 10;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-deep);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-link {
    font-size: 0.9375rem;
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-teal);
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--color-warm);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.footer-text::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.footer-links {
    display: flex;
    gap: 24px;
}


.footer-links a {
    font-size: 0.875rem;
    color: var(--color-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-deep);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* Homepage             */
/* ==================== */

.hero {
    padding: 80px 0 100px;
    position: relative;
}

.hero-content {
    max-width: 680px;
    animation: fadeUp 0.6s ease-out;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--color-deep);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-muted);
    margin-bottom: 40px;
    max-width: 540px;
}

.email-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.email-form input[type="email"] {
    flex: 1;
    min-width: 260px;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--color-warm);
    border-radius: 8px;
    background: white;
    color: var(--color-deep);
    transition: border-color 0.2s ease;
}

.email-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-teal);
}

.email-form input[type="email"]::placeholder {
    color: var(--color-muted);
}

.email-form button {
    padding: 16px 32px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    background: var(--color-deep);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.email-form button:hover {
    background: var(--color-teal);
}

.email-form button:active {
    transform: scale(0.98);
}

.form-note {
    font-size: 0.875rem;
    color: var(--color-muted);
}

.hero-decoration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-warm) 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 900px) {
    .hero-decoration {
        display: none;
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.section-dark {
    background: var(--color-deep);
    color: white;
    position: relative;
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 16px;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 48px;
}

.step {
    position: relative;
    animation: fadeUp 0.6s ease-out backwards;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-warm);
    line-height: 1;
    margin-bottom: 16px;
}

.section-dark .step-number {
    color: var(--color-teal);
    opacity: 0.6;
}

.step h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    color: var(--color-muted);
    font-size: 1rem;
}

.section-dark .step p {
    color: rgba(255, 255, 255, 0.7);
}

/* Problem */
.problem-text {
    max-width: 640px;
    font-size: 1.125rem;
    line-height: 1.7;
}

.problem-text p {
    margin-bottom: 24px;
}

.problem-text p:last-child {
    margin-bottom: 0;
}

/* Audience */
.section-warm {
    background: var(--color-warm);
    padding: 60px 0;
}

.audience-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.audience-item {
    background: white;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--color-warm);
}

.audience-item h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.audience-item p {
    color: var(--color-muted);
    font-size: 0.9375rem;
}

/* Trust */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.trust-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent);
}

.trust-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.trust-item p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 100px 0;
}

.final-cta h2 {
    margin-bottom: 16px;
}

.final-cta > p {
    color: var(--color-muted);
    margin-bottom: 40px;
    font-size: 1.125rem;
}

.final-cta .email-form {
    justify-content: center;
    max-width: 500px;
    margin: 0 auto 16px;
}

.final-cta .form-note {
    text-align: center;
}

/* Success banner */
.success-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-teal);
    color: white;
    text-align: center;
    padding: 16px 24px;
    font-weight: 500;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.success-banner.show {
    transform: translateY(0);
}

/* ==================== */
/* Blog index           */
/* ==================== */

.page-header {
    padding: 60px 0 0;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.page-description {
    color: var(--color-muted);
    font-size: 1.125rem;
    margin-bottom: 48px;
}

.post-list {
    list-style: none;
    padding-bottom: 100px;
}

.post-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--color-warm);
}

.post-item:first-child {
    padding-top: 0;
}

.post-date {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.post-date::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.post-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-title a {
    color: var(--color-deep);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--color-teal);
}

.post-excerpt {
    color: var(--color-muted);
    font-size: 1rem;
}

/* ==================== */
/* Blog post            */
/* ==================== */

article {
    padding: 60px 0 80px;
}

.post-header {
    margin-bottom: 24px;
}

.post-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-content {
    line-height: 1.7;
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
}

.post-content h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content a {
    color: var(--color-teal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--color-deep);
}

.post-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 20px;
    margin: 32px 0;
    font-style: italic;
    color: var(--color-muted);
}

.post-content code {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-warm);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-content pre {
    background: var(--color-deep);
    color: var(--color-cream);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content p + ul,
.post-content p + ol {
    margin-top: -18px;
}

.post-content hr {
  width: 40%;
  margin: 3rem auto;
  border: none;
  border-top: 1px solid var(--color-warm);
}

.post-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--color-warm);
}

.back-link {
    font-size: 0.9375rem;
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-deep);
}

/* ==================== */
/* Privacy              */
/* ==================== */

.privacy-page {
    padding-top: 60px;
    padding-bottom: 100px;
}

.privacy-page h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.last-updated {
    font-size: 0.9375rem;
    color: var(--color-muted);
    margin-bottom: 48px;
}

.privacy-page h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 12px;
}

.privacy-page p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.privacy-page a {
    color: var(--color-teal);
}

.privacy-page ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.privacy-page li {
    margin-bottom: 8px;
}

/* ==================== */
/* 404                  */
/* ==================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    min-height: 60vh;
}

.error-page .content {
    max-width: 400px;
}

.error-page h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.error-page p {
    font-size: 1.125rem;
    color: var(--color-muted);
    margin-bottom: 32px;
}

.button {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    background: var(--color-deep);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.button:hover {
    background: var(--color-teal);
}

/* better tables for comparisons. Might be an issue if we use others in blogposts */
.post-content table {
  border-collapse: collapse;
  table-layout: fixed;
  width: calc(100% + 120px);
  margin: 2rem -60px;

}

@media (max-width: 800px) {
  .post-content table {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}


.post-content th,
.post-content td {
  border: 1px solid var(--color-warm);
  padding: 0.75rem 1rem;
  vertical-align: top;
  text-align: left;
}

.post-content th {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--color-warm);
}

.post-content td:first-child {
  width: 25%;
  font-weight: 500;
}

.post-content td:last-child {
  background: rgba(45, 90, 90, 0.04);
}

@media (max-width: 640px) {
  .post-content table {
    display: block;
    overflow-x: auto;
  }
}
