/* ============================================================
   Portfolio site — styles specific to index.html
   ============================================================ */

/* --- Scroll progress -------------------------------------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --- Header ----------------------------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    backdrop-filter var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: rgb(6 6 7 / 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  flex: none;
}

.brand__mark {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(127 163 79 / 0.18);
}

.brand__name {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
}

.nav {
  display: flex;
  gap: var(--s-6);
  font-size: var(--t-small);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav a:hover { color: var(--text); }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex: none;
}

.btn--sm { padding: var(--s-3) var(--s-5); }

/* The page is a single linear scroll and the quote CTA stays visible, so the
   anchor nav is dropped on small screens rather than hidden behind a menu. */
/* Links move into the disclosure panel here — see base.css. */

/* --- Hero ------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + var(--s-8)) var(--s-9);
  overflow: hidden;
}

/* A slow, very low-contrast drift behind the headline. Large blur
   radius keeps it reading as light rather than as a shape. */
.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: min(120vw, 1400px);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgb(127 163 79 / 0.14),
    rgb(127 163 79 / 0.05) 45%,
    transparent 70%
  );
  filter: blur(20px);
  animation: drift 26s var(--ease-in-out) infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.js [data-hero-step] { opacity: 0; }
.js [data-hero].is-done [data-hero-step] { opacity: 1; }

.hero__eyebrow { margin-bottom: var(--s-6); }

.hero__title {
  margin-bottom: var(--s-6);
  max-width: 14ch;
}

.hero__lead { margin-bottom: var(--s-7); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  max-width: 44rem;
}

.hero__stats dt {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--s-2);
}

.hero__stats dd {
  margin: 0;
  font-size: var(--t-lead);
  letter-spacing: var(--tr-snug);
}

.hero__scroll {
  position: absolute;
  bottom: var(--s-6);
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero__scroll-line {
  width: 1px;
  height: var(--s-8);
  background: linear-gradient(to bottom, var(--line-strong), transparent);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: trickle 2.4s var(--ease-in-out) infinite;
}

@keyframes trickle {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

@media (max-width: 640px) {
  .hero__scroll { display: none; }
}

/* --- Marquee ---------------------------------------------- */

.marquee {
  border-block: 1px solid var(--line);
  padding-block: var(--s-5);
  overflow: hidden;
  background: rgb(255 255 255 / 0.015);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.75rem);
  color: var(--text-dim);
  white-space: nowrap;
  animation: slide 42s linear infinite;
}

/* The track holds the list twice; translating by exactly -50% puts the
   duplicate where the original was, so the loop has no visible seam. */
@keyframes slide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.marquee__track.is-js-driven { animation: none; }

.marquee__track span:nth-child(even) { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .hero__glow { animation: none; }
  .hero__scroll-line::after { animation: none; }
}

/* --- Section heads ---------------------------------------- */

.section__head {
  max-width: 46rem;
  margin-bottom: var(--s-9);
}

.section__head .eyebrow { margin-bottom: var(--s-5); }
.section__title { margin-bottom: var(--s-5); }

/* --- Projects --------------------------------------------- */

.projects {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-8);
}

.project__link {
  display: grid;
  gap: var(--s-6);
  text-decoration: none;
  color: inherit;
}

.project__media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink-100);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}

.project__media img {
  position: absolute;
  left: 0;
  top: -3rem;
  width: 100%;
  height: calc(100% + 6rem);
  object-fit: cover;
  /* Images are graded consistently here rather than in an editor, so all
     four demos read as one studio's work regardless of source. */
  filter: saturate(0.82) contrast(1.06) brightness(0.82);
  /* Hover uses the independent `scale` property so Motion keeps sole
     ownership of `transform` for the scroll parallax. */
  transition:
    scale var(--dur-slow) var(--ease-out),
    filter var(--dur-slow) var(--ease-out);
}

/* Warm scrim so type and the gold accent sit inside the photo's light. */
.project__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    38% 50% at var(--mx, 50%) var(--my, 50%),
    rgb(169 204 133 / 0.2) 0%,
    transparent 70%
  );
  transition: opacity var(--dur-base) var(--ease-out);
}

.project__link:hover .project__media::before { opacity: 1; }

.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgb(6 6 7 / 0.66) 0%,
    rgb(6 6 7 / 0.12) 45%,
    rgb(6 6 7 / 0.3) 100%
  );
  transition: opacity var(--dur-slow) var(--ease-out);
}

.project__link:hover .project__media img,
.project__link:focus-visible .project__media img {
  scale: 1.04;
  filter: saturate(0.95) contrast(1.06) brightness(0.92);
}

.project__link:hover .project__media::after { opacity: 0.7; }

.project__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-5);
  align-items: start;
}

.project__index {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  color: var(--accent);
  padding-top: 0.4em;
}

.project__meta { display: grid; gap: var(--s-3); }

.project__sector {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.project__name {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
}

.project__note {
  color: var(--text-muted);
  max-width: 46ch;
}

.project__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-small);
  color: var(--accent-text);
  margin-top: var(--s-2);
}

.project__cta span {
  transition: transform var(--dur-base) var(--ease-out);
}

.project__link:hover .project__cta span { transform: translateX(6px); }

@media (min-width: 900px) {
  .projects { gap: var(--s-10); }

  .project__link {
    grid-template-columns: 1.35fr 1fr;
    gap: var(--s-8);
    align-items: center;
  }

  /* Alternate which side the photo sits on so the column of cards has a
     rhythm instead of reading as a list. */
  .project:nth-child(even) .project__media { order: 2; }

  .project__body {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .project__index { padding-top: 0; }
}

/* --- Cards ------------------------------------------------ */

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 62rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--ink-050);
  padding: var(--s-7) var(--s-6);
  display: grid;
  gap: var(--s-4);
  align-content: start;
  transition: background-color var(--dur-base) var(--ease-out);
}

.card:hover { background: var(--ink-100); }

.card__num {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  color: var(--accent);
}

.card h3 { letter-spacing: var(--tr-snug); }

.card p {
  color: var(--text-muted);
  font-size: var(--t-small);
  line-height: var(--lh-loose);
}

/* --- Process ---------------------------------------------- */

.process__inner {
  display: grid;
  gap: var(--s-9);
}

.process__intro h2 { margin-block: var(--s-5); }

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-5);
  padding-block: var(--s-6);
  border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step__num {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  color: var(--accent);
  padding-top: 0.5em;
}

.step h3 {
  letter-spacing: var(--tr-snug);
  margin-bottom: var(--s-3);
}

.step p {
  color: var(--text-muted);
  max-width: 52ch;
}

@media (min-width: 1000px) {
  .process__inner {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--s-9);
    align-items: start;
  }
  .process__intro { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}

/* --- Pricing ---------------------------------------------- */

.tiers {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  align-items: stretch;
  max-width: 48rem;
  margin-inline: auto;
}

@media (min-width: 44rem) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-7) var(--s-6);
  background: var(--ink-050);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.tier--feature {
  background: var(--ink-100);
  border-color: rgb(127 163 79 / 0.36);
  box-shadow: var(--shadow-deep);
}

.tier__flag {
  position: absolute;
  top: 0;
  right: var(--s-6);
  translate: 0 -50%;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
}

.tier__name {
  font-size: var(--t-h3);
  letter-spacing: var(--tr-snug);
}

.tier__price {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 2rem + 3vw, 4rem);
  line-height: 1;
  letter-spacing: var(--tr-tight);
  display: flex;
  align-items: baseline;
  gap: 0.06em;
}

.tier__price span {
  font-size: 0.45em;
  color: var(--text-dim);
}

.tier__price small {
  font-family: var(--font-sans);
  font-size: 0.26em;
  color: var(--text-muted);
  letter-spacing: var(--tr-normal);
  margin-left: 0.4em;
}

.tier__for {
  color: var(--text-muted);
  font-size: var(--t-small);
  line-height: var(--lh-loose);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.tier__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
  font-size: var(--t-small);
  color: var(--text-muted);
}

.tier__list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-4);
  align-items: baseline;
  padding-block: var(--s-3);
  border-top: 1px solid var(--line);
}

.tier__list li:last-child { border-bottom: 1px solid var(--line); }

.tier__perk { color: var(--text-muted); }

.tier__val {
  color: var(--text);
  text-align: right;
}

/* Rows a tier doesn't include stay in place rather than being dropped, so the
   two lists can be read across; they recede instead of disappearing. */
.tier__list li.is-off .tier__perk { color: var(--text-dim); }
.tier__val.is-off { color: var(--text-dim); }

.tier__btn {
  margin-top: auto;
  padding-top: var(--s-4);
  width: 100%;
}

.pricing__note {
  margin-top: var(--s-6);
  color: var(--text-dim);
  font-size: var(--t-small);
  text-align: center;
}

/* --- Contact ---------------------------------------------- */

.contact__inner {
  display: grid;
  gap: var(--s-9);
}

.contact__aside h2 { margin-block: var(--s-5); }

.contact__direct {
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--s-4);
  justify-items: start;
}

.contact__mail {
  display: grid;
  gap: var(--s-2);
  text-decoration: none;
}

.contact__mail-label {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact__mail-addr {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  letter-spacing: var(--tr-snug);
  word-break: break-word;
  transition: color var(--dur-fast) var(--ease-out);
}

.contact__mail:hover .contact__mail-addr { color: var(--accent-text); }

/* --- Form ------------------------------------------------- */

.form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
  padding: var(--s-7) var(--s-6);
  background: var(--ink-050);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-content: start;
}

.field {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--s-2);
}

.field--half { grid-column: span 1; }

@media (max-width: 560px) {
  .field--half { grid-column: 1 / -1; }
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--s-4);
  background: var(--ink-000);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--t-small);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.field textarea { resize: vertical; min-height: 7rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--paper-400); }

.field input:hover,
.field textarea:hover { border-color: var(--paper-400); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--ink-050);
}

.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Error text is empty until JS fills it, so it takes no space when valid. */
.field__error {
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-normal);
  color: #ff9a8a;
  min-height: 0;
}

.field.is-invalid input,
.field.is-invalid textarea { border-color: #ff9a8a; }

.form__submit { grid-column: 1 / -1; }

.form__status {
  grid-column: 1 / -1;
  font-size: var(--t-small);
  color: var(--text-muted);
  min-height: 1.2em;
}

.form__status.is-error { color: #ff9a8a; }
.form__status.is-success { color: var(--accent-text); }

@media (min-width: 1000px) {
  .contact__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-9);
    align-items: start;
  }
}

/* --- Footer ----------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-8) var(--s-7);
}

.footer__inner {
  display: grid;
  gap: var(--s-6);
  align-items: center;
}

.footer__brand {
  font-size: var(--t-h2);
  letter-spacing: var(--tr-tight);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  font-size: var(--t-small);
}

.footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer__nav a:hover { color: var(--text); }

.footer__fine {
  font-size: var(--t-eyebrow);
  line-height: var(--lh-loose);
  color: var(--text-dim);
  max-width: 40ch;
}

@media (min-width: 800px) {
  .footer__inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--s-7);
  }
  .footer__nav { justify-content: center; }
  .footer__fine { text-align: right; max-width: 32ch; }
}
