/* ==========================================================================
   Layout — Open State (Light Theme)
   ========================================================================== */

/* Sections */
.section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.section__inner {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}

/* Hero */
.section--hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
}

.section--hero .section__inner {
  max-width: var(--content-width-wide);
}

/* Narrative sections (2-5) — animated ambient colour wash */
.section--narrative {
  background-color: transparent;
}

.section--narrative > .section__inner {
  position: relative;
  z-index: 1;
}

.section--narrative::before {
  content: '';
  position: absolute;
  inset: -100px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(196, 101, 58, 0.06), transparent 45%),
    radial-gradient(circle at 80% 65%, rgba(155, 126, 200, 0.05), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(26, 58, 106, 0.04), transparent 45%);
  background-size: 130% 130%;
  filter: blur(80px);
  animation: narrative-wash 12s ease-in-out infinite alternate;
  will-change: background-position;
}

.section--narrative:nth-of-type(even)::before {
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

@keyframes narrative-wash {
  0%   { background-position:   0%   0%, 100% 100%,  50%   0%; }
  50%  { background-position:  80%  40%,  20%  60%,  60%  80%; }
  100% { background-position: 100% 100%,   0%   0%,  20%  40%; }
}

@media (prefers-reduced-motion: reduce) {
  .section--narrative::before { animation: none; }
}

/* About — same ambient colour wash as narrative sections */
.section--about {
  position: relative;
  background-color: transparent;
  border-top: 1px solid var(--color-border);
}

.section--about > .section__inner {
  position: relative;
  z-index: 1;
}

.section--about::before {
  content: '';
  position: absolute;
  inset: -100px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(196, 101, 58, 0.02), transparent 45%),
    radial-gradient(circle at 80% 65%, rgba(155, 126, 200, 0.015), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(26, 58, 106, 0.015), transparent 45%);
  background-size: 130% 130%;
  filter: blur(80px);
  animation: narrative-wash 15s ease-in-out infinite alternate-reverse;
  will-change: background-position;
}

/* About — inline headline layout (Soleo-style) */
.about-headline {
  --reveal: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
}

.about-headline__group,
.about-headline__name {
  white-space: nowrap;
}

.about-headline__group {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.about-headline__gradient {
  background: linear-gradient(90deg, var(--color-text), var(--color-light-purple), var(--color-rust), var(--color-text));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-sweep 8s ease-in-out infinite;
}

.about-headline__is,
.about-headline__name {
  color: var(--color-text);
}

.about-headline__photo {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: clamp(115px, 14vw, 200px);
  height: calc(var(--reveal) * clamp(115px, 14vw, 200px));
  margin: calc(var(--reveal) * 0.4em) 0;
  opacity: var(--reveal);
  transform: rotate(-4deg) scale(calc(0.6 + var(--reveal) * 0.4));
  transform-origin: 50% 50%;
  transition: transform var(--duration-hover) ease;
  will-change: height, opacity, transform;
}

.about-headline__group {
  transform: translateY(calc((1 - var(--reveal)) * 0.35em));
}
.about-headline__name {
  transform: translateY(calc((1 - var(--reveal)) * -0.35em));
}

/* Forced full-reveal (used when the user clicks the About nav link) */
.about-headline.is-revealed { --reveal: 1 !important; }

/* Scrapbook frame: textured white card sits behind, rotated the other way */
.about-headline__photo::before {
  content: '';
  position: absolute;
  inset: -10% -8%;
  background-color: #fafaf6;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    linear-gradient(140deg, #ffffff 0%, #f4f1ea 100%);
  background-size: 180px 180px, 100% 100%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12), inset 0 0 40px rgba(120,100,70,0.06);
  transform: rotate(6deg);
  z-index: 0;
  border-radius: 2px;
}

.about-headline__photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--color-hero-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: filter var(--duration-hover) ease;
}

.about-headline__photo:hover img {
  filter: grayscale(1);
}

.about-headline__photo:hover {
  transform: rotate(-2deg) scale(1.03);
}

/* Past clients marquee */
.clients {
  margin-top: var(--space-xl);
  text-align: center;
}

.clients__label {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: #000000;
  margin: 0 0 var(--space-md);
  line-height: 1.1;
}

/* Break out of section__inner max-width to make the strip full-viewport-wide */
.clients__marquee {
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.clients__track {
  display: inline-flex;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
  padding: 1rem 0;
  animation: clients-marquee 20s linear infinite;
  white-space: nowrap;
}

.clients__track img {
  height: clamp(32px, 4vw, 48px);
  width: auto;
  opacity: 1;
  filter: grayscale(1) brightness(0);
  transition: opacity var(--duration-hover) ease, filter var(--duration-hover) ease;
}

.clients__track img:hover {
  opacity: 0.4;
  filter: grayscale(1) brightness(0);
}

@keyframes clients-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.clients__label + .clients__thanks {
  margin: 0 auto 1rem;
}

.clients__thanks {
  margin: 0 auto 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-light);
  opacity: 0.7;
  text-align: center;
  max-width: none;
}

.about-tagline {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-body);
  color: var(--color-text-light);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.logo-wall {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-lg);
}

.logo-wall__item {
  height: 2rem;
  filter: grayscale(100%);
  opacity: 0.4;
  transition: filter var(--duration-hover) ease,
              opacity var(--duration-hover) ease;
}

.logo-wall__item:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Footer */
.site-footer {
  position: relative;
  background-color: transparent;
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  overflow: hidden;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: -100px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(196, 101, 58, 0.06), transparent 45%),
    radial-gradient(circle at 80% 65%, rgba(155, 126, 200, 0.05), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(26, 58, 106, 0.04), transparent 45%);
  background-size: 130% 130%;
  filter: blur(80px);
  animation: narrative-wash 20s ease-in-out infinite alternate;
  will-change: background-position;
}

.footer-intro {
  max-width: 36rem;
  margin: 0 auto var(--space-md);
  text-align: center;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.footer-cta__icon {
  width: clamp(32px, 4vw, 44px);
  height: clamp(32px, 4vw, 44px);
  flex-shrink: 0;
}

.footer-cta__email {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.125rem, 2.6vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--duration-hover) ease, opacity var(--duration-hover) ease;
}

.footer-cta__email:hover {
  border-bottom-color: var(--color-text);
  opacity: 1;
}

.footer-cta__copy {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--color-text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-hover) ease;
}

.footer-cta__copy svg {
  width: clamp(18px, 2vw, 22px);
  height: clamp(18px, 2vw, 22px);
}

.footer-cta__copy:hover { color: var(--color-text); }

.footer-cta__copied {
  position: absolute;
  top: -1.4em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.footer-cta__copy.is-copied .footer-cta__copied { opacity: 1; }

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.acknowledgement {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.5625rem;
  color: var(--color-text-light);
  opacity: 0.6;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.7;
  text-align: left;
}

.acknowledgement p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  max-width: none;
}

.acknowledgement__flag {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  color: var(--color-text);
  margin-top: 0.15em;
  transition: transform var(--duration-hover) ease;
}

.acknowledgement__flag rect,
.acknowledgement__flag circle {
  transition: fill var(--duration-hover) ease;
}

.acknowledgement__flag:hover .acknowledgement__flag-top    { fill: #000000; }
.acknowledgement__flag:hover .acknowledgement__flag-bottom { fill: #CC0000; }
.acknowledgement__flag:hover .acknowledgement__flag-sun    { fill: #FFCD00; }

/* Desktop breakpoints */
@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .section__inner {
    padding: var(--space-2xl) var(--space-lg);
  }
}
