/* ============================================
   Tech & Tired — techandtired.com
   Technology for life with chronic illness
   ============================================ */

:root {
  --green-deep: #27500A;
  --green-mid: #3B6D11;
  --green-soft: #6B8F4A;
  --green-tint: #EDF3E4;
  --orange: #D85A30;
  --orange-soft: #F5C4B3;
  --cream: #F7FAF4;
  --white: #FFFFFF;
  --ink: #34372F;
  --ink-soft: #5C6055;
  --rule: #DCE5D2;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --max-width: 1080px;
  --pad-x: 24px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--green-deep);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1.2em; }

a { color: var(--green-mid); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { color: var(--orange); text-decoration-color: var(--orange-soft); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.amp {
  font-family: var(--serif);
  font-style: italic;
  color: var(--orange);
  font-weight: 600;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-mid);
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.wrap--narrow { max-width: 720px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.wordmark .amp {
  font-size: 1.25em;
  margin: 0 -0.06em;
  position: relative;
  top: 0.04em;
}

.wordmark:hover { color: var(--green-deep); }

.logo-img {
  display: block;
  height: 48px;
  width: auto;
}

.soon {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-mid);
  background: var(--green-tint);
  border-radius: 999px;
  padding: 4px 12px;
}

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

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--green-deep); border-bottom-color: var(--orange); }
.site-nav a[aria-current="page"] { color: var(--green-deep); border-bottom-color: var(--green-mid); }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(56px, 10vw, 110px) 0 clamp(48px, 8vw, 90px);
  text-align: center;
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto 26px;
}

.hero .lede {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.tagline-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  max-width: 640px;
  margin: 36px auto 0;
}

.tagline-rule::before,
.tagline-rule::after {
  content: "";
  height: 1px;
  background: var(--rule);
  flex: 1;
}

.tagline-rule span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-mid);
  white-space: nowrap;
}

/* ---------- Ampersand divider ---------- */

.amp-divider {
  text-align: center;
  padding: 8px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--orange);
  user-select: none;
}

/* ---------- Sections ---------- */

.section { padding: clamp(40px, 7vw, 72px) 0; }

.section--tint { background: var(--green-tint); }

.section-head { margin-bottom: 36px; }
.section-head .eyebrow { display: block; margin-bottom: 10px; }

/* ---------- Article cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease, transform 160ms ease;
}

.card:hover {
  border-color: var(--green-soft);
  transform: translateY(-2px);
}

.card .eyebrow { margin-bottom: 12px; }

.card h3 { margin-bottom: 10px; }

.card h3 a {
  color: var(--green-deep);
  text-decoration: none;
}

.card h3 a:hover { color: var(--orange); }

.card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
  flex: 1;
}

.card .read {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-mid);
  text-decoration: none;
}

.card .read::after { content: " →"; }
.card .read:hover { color: var(--orange); }

/* ---------- Prose (article + start here) ---------- */

.prose { padding: clamp(40px, 7vw, 72px) 0; }

.prose h1 { margin-bottom: 18px; }
.prose h2 { margin: 1.8em 0 0.6em; }

.prose .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 2.2em;
}

.prose blockquote {
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 22px;
  margin: 1.6em 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--green-deep);
}

.prose ul, .prose ol { margin: 0 0 1.2em 1.3em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- Contact form ---------- */

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

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 11px 14px;
}

.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--green-soft); }

.contact-form textarea { min-height: 150px; resize: vertical; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: var(--green-deep);
  border: none;
  border-radius: 8px;
  padding: 12px 26px;
  cursor: pointer;
  justify-self: start;
  transition: background 160ms ease;
}

.btn:hover { background: var(--orange); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 48px;
  margin-top: 24px;
}

.site-footer .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer .fm {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green-deep);
  text-decoration: none;
}

.site-footer .fnote {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .site-header .wrap { justify-content: center; text-align: center; }
  .site-nav { justify-content: center; gap: 20px; }
  .hero { text-align: left; }
  .hero h1, .hero .lede { margin-left: 0; }
  .tagline-rule { margin-left: 0; }
}
