/* TriFire Digital — trifire.digital */

:root {
  --ink: #2a211c;
  --ink-deep: #1c1613;
  --paper: #f7f3ec;
  --paper-bright: #fffdf8;
  --flame: #b8431f;
  --flame-hot: #9a3412;
  --flame-deep: #7f2c12;
  --muted: #5c514a;
  --quiet: #6e625a;
  --line: rgba(42, 33, 28, 0.14);
  --water: #08243f;
  --water-ink: #d7ecf6;
  --water-num: #8fd0ea;
  --display: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --measure: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

button, input {
  font: inherit;
}

::selection {
  background: var(--flame);
  color: var(--paper-bright);
}

:focus-visible {
  outline: 2px solid var(--flame-hot);
  outline-offset: 3px;
}

.visually-hidden,
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--flame-hot);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.96;
  text-wrap: balance;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header.scrolled {
  border-bottom-color: rgba(42, 33, 28, 0.28);
}

.nav-container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.footer-brand .brand-logo {
  width: 44px;
  height: 44px;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-menu a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-menu a:hover {
  color: var(--flame-hot);
}

.nav-note {
  border-bottom: 2px solid var(--flame);
  padding-bottom: 0.05rem;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 0.2s ease;
}

.mobile-toggle[aria-expanded="true"] .bar {
  position: absolute;
  left: 11px;
  top: 21px;
  margin: 0;
}

.mobile-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: rotate(-45deg);
}

/* Hero */

.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.25rem 1.5rem 2.75rem;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 3.5rem;
  align-items: center;
}

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

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 100%;
  font-size: clamp(3.4rem, 6.2vw, 5.6rem);
  font-weight: 500;
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lede {
  max-width: 38rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.45;
  animation: rise 0.85s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.85s 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border: 1.5px solid transparent;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-flame {
  background: var(--flame);
  color: var(--paper-bright);
}

.btn-flame:hover {
  background: var(--flame-deep);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: rgba(42, 33, 28, 0.28);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-paper {
  background: var(--paper);
  color: var(--water);
}

.btn-paper:hover {
  background: white;
  transform: translateY(-2px);
}

.btn-ink {
  background: var(--ink-deep);
  color: var(--paper-bright);
}

.btn-ink:hover {
  background: #000;
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.poster {
  --poster-tilt: -1.6deg;
  justify-self: end;
  width: min(calc(100% - 20px), 420px);
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--paper-bright);
  color: var(--ink-deep);
  text-decoration: none;
  border: 1px solid rgba(42, 33, 28, 0.08);
  transform: rotate(var(--poster-tilt));
  box-shadow: 0 18px 40px rgba(42, 33, 28, 0.1);
  animation: poster-in 0.95s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.28s ease;
}

.poster:hover {
  animation: none;
  transform: rotate(0deg) translateY(-6px);
  color: var(--ink-deep);
}

.poster-kicker {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--flame);
}

.poster-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 18%;
  margin-bottom: 1.1rem;
}

.poster-name {
  margin: 0;
  font-family: var(--display);
  font-size: 3rem;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.poster-line {
  margin: 0.7rem 0 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

/* Studio */

.studio {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.5rem 4.5rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.studio h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.6vw, 4.15rem);
}

.studio-body p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.2rem;
}

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

/* Indwell */

.indwell {
  background: var(--water);
  color: var(--paper);
  padding: 4.5rem 1.5rem 3.5rem;
}

.indwell-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.indwell-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2.75rem;
  margin-bottom: 2rem;
}

.kicker-water {
  color: var(--water-num);
}

.indwell h2 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.5rem);
}

.indwell-tag {
  margin: 0.85rem 0 0;
  max-width: 28rem;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--paper);
}

.indwell-mark-wrap {
  justify-self: start;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.indwell-mark {
  width: min(42vw, 320px);
  height: auto;
  border-radius: 18%;
  animation: float-mark 5.5s ease-in-out infinite;
}

.indwell-lead {
  max-width: 42rem;
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--water-ink);
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(215, 236, 246, 0.22);
}

.work-list li {
  padding: 1.5rem 1.75rem 1.6rem 0;
  border-bottom: 1px solid rgba(215, 236, 246, 0.22);
}

.work-list li:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid rgba(215, 236, 246, 0.22);
}

.work-list li:nth-child(even) {
  padding-left: 1.75rem;
}

.work-list h3 {
  margin: 0 0 0.45rem;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.work-list p {
  margin: 0;
  max-width: 34rem;
  color: var(--water-ink);
}

.indwell-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.indwell-foot p {
  margin: 0;
  max-width: 28rem;
  color: var(--water-ink);
}

/* Note */

.note {
  background: #efe6d8;
  color: var(--ink);
}

.note :focus-visible {
  outline-color: var(--ink-deep);
}

.note-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: end;
}

.note h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
}

.note-copy p {
  margin: 0;
  max-width: 26rem;
  font-size: 1.25rem;
}

.form-input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 0.1rem;
  border: 0;
  border-bottom: 2px solid var(--ink-deep);
  border-radius: 0;
  background: transparent;
  color: var(--ink-deep);
  font-size: 1.35rem;
}

.form-input::placeholder {
  color: rgba(26, 16, 12, 0.55);
}

.form-input:focus {
  outline: none;
  background: rgba(255, 250, 243, 0.28);
}

.form-feedback {
  min-height: 1.4rem;
  margin-top: 0.75rem;
  font-weight: 600;
}

.form-feedback.error {
  color: #4a0c08;
}

.form-feedback.success {
  color: var(--ink-deep);
}

.form-guarantee {
  margin: 0.35rem 0 0;
  font-size: 0.98rem;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 250, 243, 0.35);
  border-top-color: var(--paper-bright);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Ways */

.ways {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}

.ways > h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.ways-grid article {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.ways-grid h3 {
  margin: 0 0 0.55rem;
  font-size: 2.6rem;
}

.ways-grid p {
  margin: 0;
  color: var(--muted);
  max-width: 22rem;
}

/* Footer */

.site-footer {
  padding: 1rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand p {
  margin: 0.8rem 0 0;
  color: var(--quiet);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--flame-hot);
}

.footer-scripture {
  margin: 0;
}

.footer-scripture p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.footer-scripture cite {
  display: block;
  margin-top: 0.55rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--quiet);
}

.footer-legal {
  max-width: var(--measure);
  margin: 2rem auto 0;
  color: var(--quiet);
  font-size: 0.95rem;
}

/* Mobile */

@media (max-width: 860px) {
  .mobile-toggle {
    display: block;
    position: relative;
    z-index: 120;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 74px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.15rem;
    padding: 2rem 1.75rem 4rem;
    background: var(--paper);
    border-top: 1px solid var(--line);
  }

  .nav-menu.is-active {
    display: flex;
  }

  .nav-menu a {
    font-family: var(--display);
    font-size: 2.6rem;
    font-weight: 500;
    letter-spacing: -0.03em;
  }

  .nav-note {
    border-bottom-width: 3px;
  }

  .nav-container {
    padding: 0.65rem 1.15rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 1.6rem 1.15rem 1.75rem;
  }

  .hero h1 {
    margin-bottom: 0.85rem;
    font-size: clamp(2.35rem, 11vw, 3rem);
  }

  .lede {
    margin-bottom: 1.15rem;
    font-size: 1.08rem;
    line-height: 1.45;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .indwell-foot .btn,
  .updates-form .btn {
    width: 100%;
  }

  .poster {
    --poster-tilt: 0deg;
    justify-self: stretch;
    width: 100%;
    padding: 1rem 1rem 1.15rem;
    box-shadow: 0 10px 24px rgba(42, 33, 28, 0.08);
    animation-name: rise;
  }

  .poster-icon {
    width: min(64vw, 200px);
    margin-inline: auto;
  }

  .poster-name {
    font-size: 2.15rem;
  }

  .poster-line {
    font-size: 1.05rem;
  }

  .studio {
    padding: 0.25rem 1.15rem 2.5rem;
  }

  .studio-grid {
    gap: 1.15rem;
    padding-top: 1.5rem;
  }

  .studio h2 {
    font-size: clamp(2.05rem, 9vw, 2.7rem);
  }

  .studio-body p {
    font-size: 1.08rem;
  }

  .studio-grid,
  .note-inner,
  .ways-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .work-list {
    grid-template-columns: 1fr;
  }

  .work-list li,
  .work-list li:nth-child(odd),
  .work-list li:nth-child(even) {
    padding: 1.3rem 0;
    border-right: 0;
  }

  .indwell {
    padding: 2.4rem 1.15rem 2rem;
  }

  .indwell-top {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem 1rem;
    margin-bottom: 1.25rem;
  }

  .indwell-intro {
    display: contents;
  }

  .indwell-mark-wrap {
    grid-row: 1 / span 2;
  }

  .indwell-mark {
    width: 92px;
  }

  .indwell .kicker {
    margin-bottom: 0.15rem;
  }

  .indwell h2 {
    font-size: clamp(2.4rem, 11vw, 3.15rem);
  }

  .indwell-tag {
    grid-column: 1 / -1;
    margin-top: 0.15rem;
    font-size: 1.28rem;
  }

  .indwell-lead {
    font-size: 1.12rem;
  }

  .work-list h3 {
    font-size: 1.55rem;
  }

  .note-inner {
    padding: 2.4rem 1.15rem;
    gap: 1.35rem;
  }

  .note h2 {
    font-size: clamp(2.15rem, 9vw, 2.8rem);
  }

  .note-copy p,
  .form-guarantee {
    font-size: 1.05rem;
  }

  .form-input {
    font-size: 1.15rem;
  }

  .ways {
    padding: 2.6rem 1.15rem 1.5rem;
  }

  .ways > h2 {
    font-size: 1.9rem;
  }

  .ways-grid h3 {
    font-size: 2.05rem;
  }

  .site-footer {
    padding: 0.25rem 1.15rem 1.6rem;
  }

  .footer-scripture p {
    font-size: 1.2rem;
  }

  .nav-menu {
    top: 66px;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes poster-in {
  from { opacity: 0; transform: rotate(-8deg) translateY(28px); }
  to { opacity: 1; transform: rotate(var(--poster-tilt)); }
}

@keyframes float-mark {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

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