/* ==========================================================================
   Smarter Freelancer — Global Stylesheet
   Palette: Indigo (trust/tech) + Amber (CTA) + White/Slate (reading comfort)
   Mobile-first. Loads on every page via <link href="/css/style.css">.
   ========================================================================== */

:root {
  /* Brand */
  --indigo-900: #312E81;
  --indigo-700: #4338CA;
  --indigo-600: #4F46E5;
  --indigo-500: #6366F1;
  --indigo-100: #E0E7FF;
  --indigo-50:  #EEF2FF;

  --amber-500: #F59E0B;
  --amber-600: #D97706;

  /* Neutrals */
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --white:     #FFFFFF;

  /* Roles */
  --bg:        var(--white);
  --bg-soft:   var(--slate-50);
  --text:      var(--slate-800);
  --text-soft: var(--slate-500);
  --heading:   var(--slate-900);
  --border:    var(--slate-200);
  --primary:   var(--indigo-600);
  --primary-dark: var(--indigo-700);
  --cta:       var(--amber-500);
  --cta-dark:  var(--amber-600);

  /* Type */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --maxw-reading: 720px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(49, 46, 129, .14);
}

/* ----- Reset ----- */
*, *::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: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn-cta {
  background: var(--cta);
  color: var(--slate-900);
  box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
}
.btn-cta:hover { background: var(--cta-dark); color: var(--slate-900); transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--indigo-100);
}
.btn-ghost:hover { background: var(--indigo-50); color: var(--primary-dark); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.brand-name .accent { color: var(--primary); }

.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .97rem;
  color: var(--slate-700);
  padding: 7px 13px;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--indigo-50); color: var(--primary-dark); }

@media (min-width: 760px) {
  .header-inner { flex-direction: row; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
  .main-nav { gap: 6px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--indigo-100), transparent 60%),
    linear-gradient(180deg, var(--indigo-50), var(--white));
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 760px; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--indigo-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 .hl { color: var(--primary); }
.hero-sub {
  font-size: 1.15rem;
  color: var(--slate-600);
  max-width: 620px;
  margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section { padding: 54px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { margin-bottom: 30px; max-width: 640px; }
.section-head .eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cta-dark);
  margin-bottom: 8px;
  display: block;
}
.section-head p { color: var(--slate-600); margin: 0; }

/* ==========================================================================
   Article grid + cards
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 620px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--indigo-100); }

/* Gradient thumb (used until a real image is added) */
.card-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-900));
  position: relative;
}
.card-thumb.tag-review   { background: linear-gradient(135deg, #7C3AED, var(--indigo-900)); }
.card-thumb.tag-compare  { background: linear-gradient(135deg, var(--indigo-500), #0EA5E9); }
.card-thumb.tag-howto    { background: linear-gradient(135deg, #0EA5E9, #0F766E); }
.card-thumb.tag-design   { background: linear-gradient(135deg, var(--amber-500), #DB2777); }
.card-thumb.tag-tools    { background: linear-gradient(135deg, var(--indigo-600), #7C3AED); }
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, .28);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 8px; line-height: 1.3; }
.card-body h3 a { color: var(--heading); }
.card-body h3 a:hover { color: var(--primary); }
.card-excerpt { color: var(--slate-600); font-size: .96rem; margin-bottom: 16px; flex: 1; }
.card-more {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.card-more::after { content: "→"; transition: transform .15s ease; }
.card:hover .card-more::after { transform: translateX(3px); }

/* ==========================================================================
   Generic content page (about / contact / legal / articles)
   ========================================================================== */
.page-header {
  background: linear-gradient(180deg, var(--indigo-50), var(--white));
  border-bottom: 1px solid var(--border);
  padding: 48px 0 36px;
}
.page-header .container { max-width: var(--maxw-reading); }
.page-header h1 { margin-bottom: .3em; }
.page-header .lead { color: var(--slate-600); font-size: 1.12rem; margin: 0; }

.prose { max-width: var(--maxw-reading); margin: 0 auto; padding: 44px 20px 60px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--slate-900); }

/* Callout / disclosure box */
.callout {
  background: var(--indigo-50);
  border: 1px solid var(--indigo-100);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0 0 28px;
  font-size: .96rem;
  color: var(--slate-700);
}
.callout strong { color: var(--primary-dark); }

.disclosure-top {
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .88rem;
  color: var(--slate-500);
  margin-bottom: 26px;
}

/* ==========================================================================
   Contact form (works with Netlify Forms — no backend needed)
   ========================================================================== */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  max-width: var(--maxw-reading);
  margin: 0 auto;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--slate-700);
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  padding: 12px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--indigo-100);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 44px 0 28px;
  margin-top: 10px;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name .accent { color: var(--indigo-500); }
.footer-tagline { color: var(--slate-500); font-size: .95rem; margin: 10px 0 0; max-width: 360px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--slate-300); font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-disclosure { font-size: .82rem; color: var(--slate-500); padding-top: 22px; line-height: 1.6; }
.footer-disclosure a { color: var(--slate-300); text-decoration: underline; }
.footer-copy { font-size: .82rem; color: var(--slate-500); padding-top: 14px; }

@media (min-width: 760px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ----- Accessibility ----- */
a:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--indigo-500);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
