:root {
  --ink: #163143;
  --ink-2: #25475c;
  --paper: #fffdf7;
  --ivory: #f7f4eb;
  --mist: #eceee7;
  --line: #d8d2c2;
  --blue: #4c7898;
  --blue-soft: #dfeaf0;
  --sage: #5f7f70;
  --sage-soft: #e3ebe3;
  --clay: #9d6d58;
  --rose: #a55d70;
  --gold: #b8914f;
  --muted: #5f6d70;
  --shadow-soft: 0 18px 46px rgba(16, 38, 54, 0.1);
  --shadow-strong: 0 28px 70px rgba(16, 38, 54, 0.18);
  --display-font: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --text-font: Avenir, "Avenir Next", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-page: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--text-font);
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.86), rgba(255, 253, 247, 0.18) 42%, rgba(255, 253, 247, 0.74)),
    linear-gradient(180deg, rgba(223, 234, 240, 0.28), rgba(227, 235, 227, 0.2) 46%, rgba(184, 145, 79, 0.09));
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

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

h1,
h2 {
  font-family: var(--display-font);
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: 5.55rem;
  line-height: 0.98;
}

h2 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: 3.15rem;
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}

li + li {
  margin-top: 8px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px max(22px, calc((100vw - var(--max-page)) / 2));
  background: rgba(247, 244, 235, 0.92);
  border-bottom: 1px solid rgba(216, 210, 194, 0.82);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: grid;
  gap: 3px;
  min-width: 250px;
}

.brand-wordmark {
  width: 178px;
  max-width: 100%;
  height: auto;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 720;
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(223, 234, 240, 0.82);
  outline: none;
}

.site-nav .nav-cta {
  margin-left: 4px;
  color: var(--paper);
  background: var(--ink);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  background: var(--ink-2);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 68px;
  align-items: center;
  width: min(var(--max-page), calc(100% - 44px));
  min-height: 620px;
  margin: 0 auto;
  padding: 52px 0 42px;
}

.hero-wordmark {
  width: min(620px, 100%);
  margin: 0 0 26px;
}

.kicker {
  display: block;
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.25;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 790px;
  margin-bottom: 30px;
  color: #475a5f;
  font-size: 1.28rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 760;
  white-space: nowrap;
}

.button.primary {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 14px 26px rgba(16, 38, 54, 0.15);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--ink-2);
  outline: none;
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.78);
  border-color: var(--line);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.hero-portrait {
  margin: 0;
  padding: 30px;
  background: rgba(255, 253, 247, 0.74);
  border: 1px solid rgba(216, 210, 194, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.hero-portrait img {
  width: min(270px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 24px;
  object-fit: cover;
  border: 1px solid rgba(16, 38, 54, 0.12);
  border-radius: 50%;
  box-shadow: var(--shadow-strong);
}

.hero-portrait figcaption {
  display: grid;
  gap: 8px;
  text-align: center;
}

.hero-portrait strong {
  font-family: var(--display-font);
  font-size: 1.3rem;
  font-weight: 600;
}

.hero-portrait span {
  color: var(--muted);
  line-height: 1.55;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(var(--max-page), calc(100% - 44px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-strip div {
  min-height: 156px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px 28px;
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip span {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.45rem;
  font-weight: 600;
}

.signal-strip p {
  margin-bottom: 0;
}

.tab-section {
  width: min(var(--max-page), calc(100% - 44px));
  margin: 0 auto;
  padding: 46px 0 86px;
}

.tab-list {
  position: sticky;
  top: 74px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 10px;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(216, 210, 194, 0.96);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(16, 38, 54, 0.07);
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab-button {
  min-height: 44px;
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 720;
}

.tab-button:hover,
.tab-button:focus-visible {
  background: var(--blue-soft);
  outline: none;
}

.tab-button[aria-selected="true"] {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 10px 22px rgba(16, 38, 54, 0.14);
}

.tab-panels {
  min-width: 0;
}

.tab-panel {
  padding: 62px 0 0;
  scroll-margin-top: 150px;
  outline: none;
}

.panel-heading {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin-bottom: 0;
}

.essay-layout,
.bio-body,
.product-intro,
.haiku-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.62fr);
  gap: 54px;
  align-items: start;
}

.lead-copy p,
.bio-main p,
.product-intro p,
.haiku-intro p {
  max-width: 760px;
  font-size: 1.08rem;
}

.lead-copy p:last-child,
.bio-main p:last-child,
.product-intro p:last-child,
.haiku-intro p:last-child {
  margin-bottom: 0;
}

.principle-grid,
.practice-grid,
.product-grid,
.blog-grid {
  display: grid;
  gap: 14px;
}

.principle-grid article,
.practice-grid article,
.product-grid article,
.blog-grid article,
.bio-aside,
.phone-card,
.featured-haiku,
.haiku-card {
  background: rgba(255, 253, 247, 0.88);
  border: 1px solid rgba(216, 210, 194, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.principle-grid article,
.practice-grid article,
.product-grid article,
.blog-grid article {
  min-height: 168px;
  padding: 24px;
}

.principle-grid span,
.practice-grid span,
.product-grid span,
.blog-grid span,
.haiku-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 720;
  text-transform: uppercase;
}

.principle-grid p,
.practice-grid p,
.product-grid p,
.blog-grid p {
  margin-bottom: 0;
}

.bio-body {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
}

.bio-aside {
  display: grid;
  gap: 26px;
  padding: 28px;
}

.bio-aside h3 {
  margin-bottom: 12px;
  font-family: var(--display-font);
  font-size: 1.35rem;
  font-weight: 600;
}

.text-link {
  justify-self: start;
  color: var(--blue);
  font-weight: 720;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--ink);
  outline: none;
}

.product-intro {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  margin-bottom: 28px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.lifaria-wordmark {
  width: min(360px, 100%);
  align-self: center;
  justify-self: end;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 36px;
}

.screen-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.phone-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin: 0;
  padding: 22px;
}

.phone-shell {
  width: min(238px, 100%);
  aspect-ratio: 620 / 1348;
  overflow: hidden;
  background: var(--paper);
  border: 8px solid #0c2130;
  border-radius: 34px;
  box-shadow: var(--shadow-strong);
}

.phone-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-card figcaption {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.practice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.haiku-intro {
  margin-bottom: 34px;
}

.featured-haiku {
  align-self: stretch;
  display: grid;
  align-content: center;
  margin: 0;
  padding: 28px;
  color: var(--paper);
  background: var(--ink);
  border-color: rgba(16, 38, 54, 0.5);
}

.featured-haiku span {
  display: block;
  margin-bottom: 14px;
  color: #dfc6a7;
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
}

.featured-haiku p {
  margin-bottom: 0;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 1.42rem;
  line-height: 1.45;
}

.haiku-tools {
  display: grid;
  grid-template-columns: 170px minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 34px;
  padding: 16px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(216, 210, 194, 0.96);
  border-radius: 8px;
}

.haiku-tools label {
  color: var(--ink);
  font-weight: 720;
}

.haiku-tools input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.haiku-tools input:focus {
  border-color: var(--blue);
  outline: none;
}

.haiku-count {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.haiku-archive {
  display: grid;
  gap: 34px;
}

.empty-state {
  margin: 0;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(216, 210, 194, 0.96);
  border-radius: 8px;
}

.haiku-month {
  display: grid;
  gap: 14px;
}

.haiku-month h3 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.7rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.haiku-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.haiku-card {
  min-width: 0;
  padding: 18px;
}

.haiku-card h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.haiku-card pre {
  margin: 0;
  color: var(--muted);
  font-family: var(--display-font);
  font-size: 0.98rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.blog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-grid article:first-child {
  grid-column: 1 / -1;
  min-height: 190px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 30px max(22px, calc((100vw - var(--max-page)) / 2));
  color: rgba(255, 253, 247, 0.72);
  background: var(--ink);
}

.site-footer span:first-child {
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 1.2rem;
  font-weight: 600;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 3.1rem;
  }

  .hero-section,
  .essay-layout,
  .bio-body,
  .product-intro,
  .haiku-intro {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: 0;
    gap: 34px;
  }

  .hero-portrait {
    max-width: 520px;
  }

  .signal-strip,
  .product-grid,
  .screen-showcase {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-strip div:last-child {
    border-bottom: 0;
  }

  .panel-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lifaria-wordmark {
    justify-self: start;
  }

  .phone-shell {
    width: 230px;
  }

  .haiku-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  h1 {
    font-size: 4.1rem;
  }

  h2 {
    font-size: 2.55rem;
  }

  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .hero-section,
  .signal-strip,
  .tab-section {
    width: min(100% - 28px, var(--max-page));
  }

  .hero-section {
    padding: 42px 0 40px;
  }

  .hero-lede,
  .lead-copy p,
  .bio-main p,
  .product-intro p,
  .haiku-intro p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .practice-grid,
  .blog-grid,
  .haiku-tools,
  .haiku-month-grid {
    grid-template-columns: 1fr;
  }

  .haiku-count {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 3.45rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .site-header {
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand-lockup {
    min-width: 150px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-wordmark {
    width: 136px;
  }

  .hero-wordmark {
    width: min(330px, 100%);
    margin-bottom: 18px;
  }

  .site-nav .nav-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-portrait,
  .bio-aside,
  .principle-grid article,
  .practice-grid article,
  .product-grid article,
  .blog-grid article,
  .phone-card,
  .featured-haiku,
  .haiku-card {
    padding: 18px;
  }

  .hero-portrait img {
    width: 170px;
  }

  .signal-strip div {
    min-height: 0;
    padding: 22px 18px;
  }

  .tab-section {
    padding-top: 30px;
    padding-bottom: 52px;
  }

  .tab-list {
    top: 64px;
    gap: 4px;
    padding: 8px;
  }

  .tab-button {
    min-width: 0;
    min-height: 40px;
    flex: 1 1 0;
    padding: 0 6px;
    font-size: 0.76rem;
  }

  .tab-panel {
    padding-top: 132px;
  }

  .phone-shell {
    width: 210px;
    border-width: 7px;
    border-radius: 30px;
  }

  .site-footer {
    display: grid;
    padding: 28px 18px;
  }
}
