/* ============================================================
   Foundry — landing page for the landing-page company.
   Philosophy: the site IS the product demo. Light, warm, calm.
   One accent. Comfortable (not cavernous) space. No frameworks.
   Instrument Sans (everything) + Instrument Serif (italic accents).
   ============================================================ */

:root {
  --paper: #faf8f4;
  --paper-2: #f1ede5;
  --ink: #1c1a16;
  --ink-soft: #6d675c;
  --accent: #e8500a;
  --accent-deep: #c84304;
  --hairline: rgba(28, 26, 22, 0.12);
  --radius: 16px;
  --font: "Instrument Sans", sans-serif;
  --serif: "Instrument Serif", serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { display: block; max-width: 100%; }
a { color: inherit; }
em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.04em;
  color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn--solid:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--hairline);
}
.btn--quiet:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.btn--big { padding: 1rem 2.1rem; font-size: 1.02rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem clamp(1.25rem, 5vw, 4rem);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav__brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav__dot { color: var(--accent); }
.nav__links { display: flex; gap: 1.7rem; }
.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: 0.55rem 1.2rem; font-size: 0.88rem; }

/* ---------- shared section scaffolding ---------- */
main > section {
  padding: clamp(3.2rem, 6vw, 5.25rem) clamp(1.25rem, 5vw, 4rem);
  max-width: 72rem;
  margin: 0 auto;
}
.section-head { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); }
.section-head__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.section-head__title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.section-head__sub {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(3.8rem, 8vw, 6.5rem);
  padding-bottom: clamp(2.8rem, 5vw, 4.2rem);
}
.hero__title {
  font-size: clamp(2.7rem, 7.2vw, 5.6rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.03;
  margin-bottom: 1.7rem;
}
.hero__sub {
  max-width: 36rem;
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

/* ---------- before / after ---------- */
.case { margin-bottom: clamp(2.4rem, 4.5vw, 3.6rem); }
.case:last-child { margin-bottom: 0; }

.case__shots {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: center;
}
.case__arrow {
  position: absolute;
  left: calc(100% / 2.55);
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(200, 67, 4, 0.35);
}

.shot { position: relative; }
.shot__tag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 1;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(28, 26, 22, 0.68);
  color: var(--paper);
}
.shot__tag--accent { background: var(--accent); }
.shot--before .frame { filter: saturate(0.85); }

/* browser-style frame around screenshots */
.frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: #fff;
  box-shadow: 0 18px 44px -22px rgba(28, 26, 22, 0.3);
}
.frame__bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--hairline);
}
.frame__bar i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(28, 26, 22, 0.18);
}
.frame img { width: 100%; aspect-ratio: 36 / 25; object-fit: cover; object-position: top; }

.case__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1.4rem;
  padding: 1.05rem 0.3rem 0;
}
.case__title { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.015em; }
.case__desc { flex: 1 1 22rem; color: var(--ink-soft); font-size: 0.98rem; }
/* ---------- process ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.5vw, 1.8rem);
}
.step {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem 1.9rem;
}
.step__num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.step__title { font-size: 1.18rem; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.step__body { color: var(--ink-soft); font-size: 0.99rem; }

/* ---------- pricing ---------- */
.pricing__card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  max-width: 46rem;
}
.pricing__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  padding-bottom: 1.4rem;
}
.pricing__num {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pricing__per { font-size: 0.45em; font-weight: 500; color: var(--ink-soft); }
.pricing__label { color: var(--ink-soft); font-size: 0.96rem; }
.pricing__plus { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--accent); }
.pricing__list { list-style: none; display: grid; gap: 0.6rem; padding-top: 1rem; }
.pricing__list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-soft);
  font-size: 0.99rem;
}
.pricing__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- collapsibles (details/summary) ---------- */
.fold { border-top: 1px solid var(--hairline); }
.fold summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.2rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 1.05rem;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.fold[open] summary::after { transform: rotate(45deg); color: var(--accent); border-color: var(--accent); }
.fold summary:hover::after { border-color: var(--accent); color: var(--accent); }
.fold__body { padding: 0.1rem 0.2rem 1.25rem; color: var(--ink-soft); max-width: 40rem; }
.fold[open] .fold__body { animation: foldIn 0.3s ease; }
@keyframes foldIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- faq ---------- */
.faq__list { max-width: 46rem; border-bottom: 1px solid var(--hairline); }

/* ---------- contact ---------- */
.contact {
  text-align: center;
  background: var(--paper-2);
  border-radius: calc(var(--radius) * 1.6);
  margin-bottom: clamp(1.5rem, 4vw, 3rem) !important;
}
.contact__title {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.contact__sub {
  max-width: 30rem;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.contact__form { max-width: 34rem; margin: 0 auto; }
.contact__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  text-align: left;
}
.field {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.85rem 1.05rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: var(--ink-soft); opacity: 0.75; }
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 80, 10, 0.14);
}
.field--wide { grid-column: 1 / -1; }
textarea.field { resize: vertical; min-height: 5.2rem; }

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.3rem clamp(1.25rem, 5vw, 4rem) 2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.footer__tag { font-family: var(--serif); font-style: italic; }

/* ---------- reveal animation (JS adds .js to <html>) ---------- */
.js .fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .fade-up.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .steps { grid-template-columns: 1fr; }
  .case__shots { grid-template-columns: 1fr; }
  .case__arrow {
    position: static;
    transform: rotate(90deg);
    margin: -0.2rem auto;
  }
  .shot--before { max-width: 78%; }
  .case__meta { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .contact__fields { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .fade-up { opacity: 1; transform: none; }
}
