/* allinlance.com — quiet field notebook UI */

:root {
  --paper: #f7f4ee;
  --paper-soft: #fffaf0;
  --paper-blue: #edf3f1;
  --ink: #252723;
  --muted: #6f756e;
  --faint: #999486;
  --line: #ded5c8;
  --line-strong: #cfc2b1;
  --night: #304f64;
  --night-blue: #123d5a;
  --night-deep: #223947;
  --note: #fff2bf;
  --note-line: #e6d28b;
  --tag-bg: #ece6da;
  --max-read: 700px;
  --max-page: 1120px;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", "Iowan Old Style", "Songti SC", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --shadow: 0 22px 60px rgba(18, 61, 90, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(247, 244, 238, 0.98) 0%, rgba(247, 244, 238, 0.9) 45%, rgba(237, 243, 241, 0.94) 100%),
    linear-gradient(90deg, rgba(48, 79, 100, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(48, 79, 100, 0.028) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--note);
  color: var(--ink);
}

a {
  color: var(--night);
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(48, 79, 100, 0.35);
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: var(--night);
}

img {
  display: block;
  max-width: 100%;
}

.shell,
.container,
.article-container {
  width: min(var(--max-page), calc(100% - 40px));
  margin: 0 auto;
}

.article-container,
.readable {
  max-width: var(--max-read);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(222, 213, 200, 0.9);
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav-inner {
  width: min(var(--max-page), calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: auto;
  border-radius: 8px;
}

.brand span {
  transform: translateY(-1px);
}

.site-nav .links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.site-nav .links a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav .links a:hover {
  color: var(--night);
}

.page-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.hero-section {
  position: relative;
  min-height: min(760px, calc(100vh - 68px));
  padding: 78px 0 62px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(28, 27, 22, 0.76) 0%, rgba(36, 34, 27, 0.58) 34%, rgba(37, 39, 35, 0.12) 62%, rgba(37, 39, 35, 0.04) 100%),
    url("/assets/img/field-notes/morning-light-field-notes.webp") center / cover no-repeat;
  color: #fff8eb;
}

.hero-grid {
  min-height: min(620px, calc(100vh - 208px));
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(610px, 100%);
  min-width: 0;
}

.hero-section .eyebrow,
.hero-section h1 {
  color: #fff7e6;
}

.hero-section .lede {
  color: rgba(255, 248, 235, 0.82);
}

.eyebrow,
.article-category {
  margin: 0 0 16px;
  color: var(--night);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 670px;
  margin-bottom: 24px;
  font-size: clamp(2.45rem, 5vw, 4.65rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

h4 {
  margin: 2em 0 0.55em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

p {
  margin-bottom: 1.18em;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

li {
  margin: 0.4em 0;
}

li::marker {
  color: var(--faint);
}

strong {
  color: var(--ink);
  font-weight: 700;
}

code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--night-deep);
  font-family: var(--mono);
  font-size: 0.88em;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  line-height: 1.58;
}

.reader-language {
  max-width: 620px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 248, 235, 0.22);
}

.reader-language-label {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reader-language blockquote {
  margin: 0;
  padding: 10px 0;
  color: rgba(255, 248, 235, 0.92);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.34rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reader-language blockquote + blockquote {
  border-top: 1px solid rgba(255, 248, 235, 0.16);
}

.hero-visual {
  min-width: 0;
}

.image-note {
  position: relative;
  margin: 0;
}

.image-note img {
  width: 100%;
  height: clamp(500px, 58vh, 620px);
  object-fit: cover;
  object-position: center 72%;
  border: 1px solid rgba(18, 61, 90, 0.16);
  border-radius: 7px;
  background: var(--paper-soft);
  box-shadow: var(--shadow);
}

.image-note figcaption {
  position: absolute;
  right: -16px;
  bottom: 24px;
  width: min(330px, 84%);
  padding: 15px 17px;
  border: 1px solid rgba(222, 213, 200, 0.9);
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 16px 44px rgba(34, 57, 71, 0.12);
  color: #4f574e;
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.42;
}

.section-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.section-title {
  margin: 0;
}

.field-note-callout {
  max-width: 720px;
  margin: 32px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--note-line);
  background: var(--note);
  color: #5e5438;
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.55;
}

.field-note-callout p:last-child {
  margin-bottom: 0;
}

.latest-note-card,
.note-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.62);
}

.note-card-image,
.note-row-image,
.article-hero-image img {
  width: 100%;
  border: 1px solid rgba(48, 79, 100, 0.14);
  border-radius: 7px;
  background: var(--paper-soft);
  object-fit: cover;
}

.note-card-image {
  height: 280px;
  margin-bottom: 24px;
  object-position: center;
}

.latest-note-card h3 {
  max-width: 680px;
  margin: 14px 0 16px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.06;
}

.latest-note-card h3 a,
.note-row h2 a {
  color: var(--ink);
  text-decoration: none;
}

.latest-note-card h3 a:hover,
.note-row h2 a:hover {
  color: var(--night);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.latest-note-card p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.04rem;
}

.image-led-card {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.72), rgba(237, 243, 241, 0.58));
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.quote-grid blockquote {
  min-height: 118px;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(48, 79, 100, 0.15);
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.62);
  color: var(--night-deep);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.4;
}

.read-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
}

.read-link:hover {
  text-decoration: underline;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tag-bg);
  color: #4f574e;
  font-size: 0.76rem;
  line-height: 1;
}

.tag.mono {
  font-family: var(--mono);
}

.note-list {
  display: grid;
  gap: 0;
}

.note-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.note-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.date {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note-row h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.note-row p {
  max-width: 650px;
  color: var(--muted);
}

.note-row-image {
  height: 230px;
  margin-bottom: 18px;
  object-position: center;
}

.article-header {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.65rem);
}

.article-lede {
  max-width: 700px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.article-hero-image {
  margin: 34px 0 0;
}

.article-hero-image img {
  max-height: 430px;
  object-position: center;
}

.article-body {
  padding: 46px 0 70px;
  font-size: 1.06rem;
  line-height: 1.75;
}

.article-body h2 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.article-body h2:first-child {
  margin-top: 0;
}

.pullquote {
  margin: 2.3em 0;
  padding: 22px 24px;
  border-left: 3px solid var(--night);
  background: rgba(255, 250, 240, 0.62);
  color: var(--night-deep);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.35;
}

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

.reader-note-card {
  width: min(92%, 650px);
  margin: 2.15em 0 1.15em 34px;
  padding: 18px 22px 20px;
  border: 1px solid rgba(48, 79, 100, 0.2);
  border-left: 5px solid #557d8f;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(237, 243, 241, 0.92), rgba(255, 250, 240, 0.72));
  box-shadow: 0 18px 42px rgba(18, 61, 90, 0.1);
}

.reader-note-card .reader-note-label {
  margin: 0 0 10px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.reader-note-card blockquote {
  margin: 0;
  color: #263f4d;
  font-family: var(--serif);
  font-size: clamp(1.32rem, 2.6vw, 1.68rem);
  font-weight: 600;
  line-height: 1.34;
}

.references {
  margin-top: 3em;
  padding-top: 1.6em;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.references h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.references li {
  line-height: 1.55;
}

.site-footer {
  padding: 34px 0 48px;
  color: var(--faint);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 10px;
}

.site-footer a:hover {
  color: var(--night);
}

@media (max-width: 900px) {
  html {
    font-size: 17px;
  }

  .shell,
  .container,
  .article-container,
  .site-nav-inner {
    width: min(100% - 28px, 680px);
  }

  .site-nav-inner {
    min-height: 62px;
    gap: 14px;
  }

  .brand {
    flex: 0 1 auto;
    font-size: 1.25rem;
    gap: 8px;
  }

  .brand img {
    width: 30px;
  }

  .site-nav .links {
    gap: 14px;
    font-size: 0.9rem;
  }

  .page-section {
    padding: 44px 0;
  }

  .hero-section {
    min-height: 0;
    padding: 58px 0 46px;
    background:
      linear-gradient(180deg, rgba(24, 23, 19, 0.62) 0%, rgba(30, 28, 22, 0.48) 52%, rgba(30, 28, 22, 0.24) 100%),
      url("/assets/img/field-notes/morning-light-field-notes.webp") 82% center / cover no-repeat;
  }

  .hero-section .shell {
    width: min(100% - 28px, 680px);
  }

  .hero-grid {
    min-height: 520px;
    display: block;
    gap: 24px;
  }

  h1 {
    font-size: clamp(2rem, 8.2vw, 2.55rem);
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero-copy .lede {
    max-width: 100%;
    font-size: 1.02rem;
  }

  .hero-copy h1,
  .hero-copy .lede,
  .reader-language {
    overflow-wrap: anywhere;
  }

  .reader-language {
    margin-top: 22px;
    padding-top: 16px;
  }

  .image-note img {
    height: 190px;
    object-position: center 72%;
  }

  .image-note figcaption {
    display: none;
  }

  .section-grid {
    display: block;
  }

  .section-title {
    margin-bottom: 20px;
  }

  .latest-note-card,
  .note-panel {
    padding: 24px;
  }

  .note-card-image,
  .note-row-image {
    height: 190px;
  }

  .article-hero-image {
    margin-top: 26px;
  }

  .article-hero-image img {
    height: 230px;
    max-height: none;
    object-position: left 66%;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .quote-grid blockquote {
    min-height: 0;
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 24px 0;
  }

  .article-header {
    padding: 50px 0 30px;
  }

  .article-body {
    padding: 36px 0 56px;
    font-size: 1.02rem;
  }

  .pullquote {
    padding: 18px 20px;
  }

  .reader-note-card {
    width: 100%;
    margin-left: 0;
    padding: 16px 18px 18px;
  }
}
