/* EddyBryant.com — first design pass
   Palette and layout are intentionally kept in one place for easy editing. */

:root {
  color-scheme: light;
  --paper: #edf2f3;
  --paper-deep: #dfe8eb;
  --ink: #202d35;
  --muted: #64737b;
  --green: #344d59;
  --green-dark: #263b46;
  --line: #d1dce0;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --content-width: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: var(--green-dark);
  color: white;
}
.skip-link:focus { top: 1rem; }

.section-wrap,
.header-inner {
  width: min(var(--content-width), calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(237 242 243 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  color: var(--green-dark);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.wordmark span { color: #8a9187; font-weight: 400; }

.primary-navigation {
  display: flex;
  align-items: center;
  gap: clamp(1.3rem, 3vw, 2.6rem);
}
.primary-navigation a {
  color: #4d5a51;
  text-decoration: none;
  font-size: .88rem;
  transition: color .2s ease;
}
.primary-navigation a:hover,
.primary-navigation a:focus-visible { color: #9a6b43; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--green-dark);
  transition: transform .2s ease, opacity .2s ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(210px, .58fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: #788276;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}

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

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.hero h1 em { color: #8a6a50; font-weight: 400; }

.hero-intro {
  max-width: 440px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #9b8c76;
  color: var(--green-dark);
  font-size: .9rem;
  text-decoration: none;
}
.text-link span { font-size: 1.1rem; }

.portrait-frame { margin: 0; }
.portrait-frame img {
  display: block;
  width: 100%;
  max-height: 390px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 35%;
  background: var(--paper-deep);
}
.portrait-frame figcaption {
  padding-top: .7rem;
  color: #64737b;
  font-family: var(--serif);
  font-size: .95rem;
  font-style: italic;
}

.welcome-band {
  background: var(--green);
  color: #f5f3ed;
}
.welcome-inner {
  max-width: 850px;
  padding-block: clamp(4rem, 7vw, 6.5rem);
  text-align: center;
}
.welcome-band .eyebrow { color: #c2c9bd; }
.welcome-band h2 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -.045em;
}
.welcome-text {
  max-width: 690px;
  margin: 0 auto;
  color: #e0e4dc;
  font-size: 1.05rem;
  line-height: 1.9;
}

.explore { padding-block: clamp(4rem, 8vw, 7rem); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.2rem;
}
.section-heading h2,
.detail-grid h2 {
  margin-bottom: 0;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.1;
}
.section-note {
  max-width: 300px;
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .9rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.topic-card {
  position: relative;
  min-height: 245px;
  padding: 1.8rem 1.8rem 2rem 0;
  text-decoration: none;
  transition: background .2s ease, padding .2s ease;
}
.topic-card + .topic-card {
  padding-left: 1.8rem;
  border-left: 1px solid var(--line);
}
.topic-card:hover { background: rgb(48 72 61 / 4%); }
.topic-number {
  color: #9a8066;
  font-size: .75rem;
  letter-spacing: .12em;
}
.topic-card h3 {
  margin: 2rem 0 .6rem;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
}
.topic-card p {
  max-width: 270px;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: .92rem;
}
.topic-arrow {
  position: absolute;
  right: 1.3rem;
  bottom: 1.4rem;
  color: #8a6a50;
  font-size: 1.2rem;
}

.detail-sections { background: #e4ecef; }
.detail-grid {
  display: grid;
  grid-template-columns: .55fr 1fr;
  gap: 3rem;
  padding-block: clamp(3.5rem, 6vw, 5rem);
  border-bottom: 1px solid #d1dce0;
  scroll-margin-top: 90px;
}
.detail-grid .eyebrow { padding-top: .55rem; }
.detail-grid h2 { max-width: 650px; margin-bottom: .8rem; font-size: clamp(2rem, 3.6vw, 3rem); }
.detail-grid p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  background: var(--green-dark);
  color: #e8e9e2;
}
.footer-inner {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-wordmark { color: #f5f3ed; font-size: 1.35rem; }
.footer-wordmark span { color: #b6bcb2; }
.footer-inner p { margin: 0; color: #c3cbc1; font-size: .85rem; }
.copyright { font-size: .78rem !important; }

@media (max-width: 760px) {
  .section-wrap, .header-inner { width: min(100% - 2rem, var(--content-width)); }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: block; }
  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .primary-navigation.is-open { display: flex; flex-direction: column; }
  .primary-navigation a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(5.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-5.5px) rotate(-45deg); }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-block: 2.8rem;
  }
  .hero-copy { grid-row: 2; }
  .portrait-frame { grid-row: 1; width: min(58%, 290px); }
  .hero h1 { font-size: clamp(3.5rem, 14vw, 5.3rem); }
  .portrait-frame img { max-height: 360px; }
  .section-heading { align-items: start; flex-direction: column; gap: .8rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card, .topic-card + .topic-card {
    min-height: 0;
    padding: 1.4rem 2.5rem 1.4rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .topic-card h3 { margin: .8rem 0 .3rem; }
  .topic-card p { margin-bottom: 0; }
  .topic-arrow { right: .3rem; bottom: 1.4rem; }
  .detail-grid { grid-template-columns: 1fr; gap: .8rem; }
  .footer-inner { min-height: 0; flex-wrap: wrap; padding-block: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Four primary category cards */
.topic-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.topic-grid-four .topic-card { padding-right: 1.1rem; }
.topic-grid-four .topic-card + .topic-card { padding-left: 1.1rem; }
@media (max-width: 980px) {
  .topic-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-grid-four .topic-card:nth-child(3) { border-left: 0; }
  .topic-grid-four .topic-card:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .topic-grid-four { grid-template-columns: 1fr; }
  .topic-grid-four .topic-card, .topic-grid-four .topic-card + .topic-card {
    padding: 1.4rem 2.5rem 1.4rem 0; border-left: 0; border-top: 0;
  }
  .topic-grid-four .topic-card:nth-child(n+3) { border-top: 0; }
}
.category-intro { min-height: 65vh; padding-block: clamp(5rem, 11vw, 9rem); }
.category-intro .eyebrow a { color: inherit; text-decoration: none; }
.category-intro h1 { margin: 0 0 1.2rem; color: var(--green-dark); font-family: var(--serif); font-size: clamp(3.5rem, 8vw, 6.5rem); font-weight: 400; letter-spacing: -.055em; line-height: 1; }
.category-lede { max-width: 680px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.35rem, 2.5vw, 1.8rem); line-height: 1.55; }
.category-rule { width: 100%; max-width: 780px; height: 1px; margin: 3rem 0 1.5rem; background: var(--line); }
.category-note { max-width: 580px; margin-bottom: 2rem; color: var(--muted); font-size: .95rem; }


/* Rotating four-photo cube on the home page */
.cube-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.photo-cube-scene {
  --cube-size: clamp(190px, 22vw, 250px);
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 900px;
  margin: .35rem auto 0;
}
.photo-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: eddy-cube-turn 28s infinite linear;
}
.photo-cube-scene:hover .photo-cube,
.photo-cube-scene:focus-within .photo-cube {
  animation-play-state: paused;
}
.cube-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 65%);
  background: #25343c;
  backface-visibility: hidden;
  box-shadow: 0 12px 28px rgb(25 39 46 / 18%);
}
.cube-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cube-face-front  { transform: rotateY(0deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-face-right  { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-face-back   { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-face-top {
  transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
  background: linear-gradient(135deg, #637780, #293b45);
}
.cube-face-bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
  background: linear-gradient(135deg, #293b45, #637780);
}
@keyframes eddy-cube-turn {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
.cube-portrait figcaption {
  padding-top: 1rem;
  color: #64737b;
  font-family: var(--serif);
  font-size: .95rem;
  font-style: italic;
  text-align: center;
}
@media (max-width: 760px) {
  .photo-cube-scene { --cube-size: min(64vw, 240px); }
}
@media (prefers-reduced-motion: reduce) {
  .photo-cube { animation: none; transform: rotateY(-12deg); }
}

/* Refined Verse of the Day link on the Theology page */
.verse-day-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  margin: 1.75rem 0 0;
  padding: 1rem 1.8rem;
  border: 1px solid #b9c9cc;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff 0%, #edf4f5 100%);
  box-shadow: 0 5px 16px rgba(37, 57, 66, .09);
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .015em;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.verse-day-box:hover {
  background: linear-gradient(135deg, #ffffff 0%, #e3eef0 100%);
  box-shadow: 0 8px 20px rgba(37, 57, 66, .14);
  transform: translateY(-2px);
}
.verse-day-box:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 4px;
}


/* Arrange Theology resource links side by side when space allows */
.theology-resource-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}
.theology-resource-links .verse-day-box {
  margin-top: 0;
}

/* Contact link in site footers */
.footer-contact {
  margin-top: .5rem;
  font-size: .9rem;
}
.footer-contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}


/* Theology top-level topic matrix */
.theology-topics { margin-top: 2.2rem; }
.theology-topics-heading {
  margin: 0 0 1.2rem;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 400;
}
.theology-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.theology-topic-card {
  position: relative;
  display: block;
  min-height: 205px;
  padding: 1.5rem 1.8rem 2.6rem;
  border: 1px solid #cbd7d9;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #edf4f5 100%);
  box-shadow: 0 5px 16px rgb(37 57 66 / 7%);
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.theology-topic-card:hover {
  transform: translateY(-3px);
  border-color: #9fb5ba;
  box-shadow: 0 10px 22px rgb(37 57 66 / 12%);
}
.theology-topic-card:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 4px;
}
.theology-topic-card h3 {
  margin: 1.1rem 0 .55rem;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
}
.theology-topic-card p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.7;
}
.theology-topic-card .topic-arrow {
  right: 1.3rem;
  bottom: 1.1rem;
}
.theology-topic-card .topic-status {
  position: absolute;
  right: 1.25rem;
  bottom: 1.2rem;
  color: #78878b;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 650px) {
  .theology-topic-grid { grid-template-columns: 1fr; }
  .theology-topic-card { min-height: 175px; }
}
