/* iGenius Group POC — extras beyond Tailwind utilities (plain CSS; @apply isn't available to external files with the Play CDN) */

:root {
  --ink: #1E2A33;
  --paper: #F5F2EC;
  --stone: #D9D3C7;
  --gum: #3F6B5C;
  --ochre: #C8893B;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-padding-top: 88px; }
body { overflow-x: hidden; }
::selection { background: var(--ochre); color: var(--paper); }

/* ---------- Nav ---------- */
#nav .nav-text, #nav .nav-link { color: var(--paper); }
#nav .nav-mark { border-color: rgba(245, 242, 236, .5); color: var(--paper); }
#nav .nav-cta { background: var(--paper); color: var(--ink); transition: background .3s, color .3s; }
#nav .nav-link { position: relative; opacity: .85; transition: opacity .2s; }
#nav .nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
#nav .nav-link:hover { opacity: 1; }
#nav .nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

#nav[data-state="scrolled"] { background: rgba(245, 242, 236, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(30, 42, 51, .08); }
#nav[data-state="scrolled"] .nav-text,
#nav[data-state="scrolled"] .nav-link { color: var(--ink); }
#nav[data-state="scrolled"] .nav-mark { border-color: rgba(30, 42, 51, .4); color: var(--ink); }
#nav[data-state="scrolled"] .nav-cta { background: var(--ink); color: var(--paper); }
#nav.menu-open { background: var(--ink); }
#nav.menu-open .nav-text { color: var(--paper); }
#nav.menu-open .nav-mark { border-color: rgba(245, 242, 236, .5); color: var(--paper); }

.mobile-menu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.mobile-menu > nav { overflow: hidden; min-height: 0; }
.mobile-menu.open { grid-template-rows: 1fr; }
.mobile-menu:not(.open) > nav { padding-bottom: 0; padding-top: 0; }
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* ---------- Buttons ---------- */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: .6rem;
  border-radius: 9999px; padding: .95rem 1.6rem; font-weight: 500; font-size: .95rem;
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn-primary { background: var(--ochre); color: var(--ink); }
.btn-primary::after { content: "→"; transition: transform .3s var(--ease); }
.btn-primary:hover { background: var(--paper); }
.btn-primary:hover::after { transform: translateX(4px); }
.btn-ghost { border: 1px solid rgba(245, 242, 236, .4); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(245, 242, 236, .08); }

/* ---------- Hero ---------- */
.hero-img { filter: grayscale(.35) contrast(1.05); transform: scale(1.08); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-in { opacity: 0; transform: translateY(24px); animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.scroll-cue { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

.grain {
  pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Marquee ---------- */
.marquee { animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Shared ---------- */
.section-label {
  display: flex; align-items: center; gap: .75rem;
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gum);
}
.section-label::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.section-label--dark { color: #9CB8AC; }

.photo { filter: grayscale(.25) sepia(.08) contrast(1.02); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- What we buy ---------- */
.signals { border-top: 1px solid rgba(30, 42, 51, .12); }
.signals li {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 0; font-size: .9rem; color: #3A4751;
  border-bottom: 1px solid rgba(30, 42, 51, .12);
}
.signals li::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--ochre); flex: none; }

/* ---------- Timeline ---------- */
.timeline-track { display: none; }
.step { position: relative; padding-left: 2rem; }
.step-dot {
  position: absolute; left: 0; top: .35rem; width: 11px; height: 11px; border-radius: 9999px;
  background: var(--paper); border: 2px solid var(--gum);
}
.step::before { /* vertical line on mobile */
  content: ""; position: absolute; left: 4.5px; top: 1.3rem; bottom: -3rem; width: 2px; background: rgba(63, 107, 92, .25);
}
.step:last-child::before { display: none; }

@media (min-width: 768px) {
  .timeline-track { display: block; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(63, 107, 92, .2); }
  .timeline-fill { display: block; height: 100%; width: 100%; background: var(--gum); transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease); }
  .timeline.is-visible .timeline-fill { transform: scaleX(1); }
  .step { padding-left: 0; padding-top: 2.5rem; }
  .step::before { display: none; }
  .step-dot { top: -4.5px; }
}

/* ---------- Portfolio ---------- */
.pf-card { position: relative; overflow: hidden; border-radius: 2px; min-height: 420px; color: var(--paper); isolation: isolate; }
.pf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.pf-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(30, 42, 51, .95) 10%, rgba(30, 42, 51, .35) 60%, rgba(30, 42, 51, .15)); transition: background .5s; }
.pf-body { position: absolute; inset: auto 0 0 0; padding: 1.75rem; }
.pf-tag { display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; padding: .35rem .7rem; border: 1px solid rgba(245, 242, 236, .35); border-radius: 9999px; backdrop-filter: blur(4px); }
.pf-line { margin-top: .4rem; color: rgba(245, 242, 236, .7); font-size: .95rem; }
.pf-more { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; line-height: 1.6; color: rgba(245, 242, 236, .85); transition: max-height .6s var(--ease), opacity .4s, margin .4s; }
.pf-metric { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(245, 242, 236, .2); font-size: .85rem; color: rgba(245, 242, 236, .7); }
.pf-metric span { font-family: Fraunces, serif; font-size: 1.6rem; color: var(--ochre); margin-right: .4rem; }
.pf-card:hover .pf-img, .pf-card:focus-within .pf-img { transform: scale(1.06); }
.pf-card:hover .pf-overlay { background: linear-gradient(to top, rgba(30, 42, 51, .97) 25%, rgba(30, 42, 51, .6)); }
.pf-card:hover .pf-more, .pf-card:focus-within .pf-more { max-height: 8rem; opacity: 1; margin-top: .8rem; }
@media (hover: none) { .pf-more { max-height: 8rem; opacity: 1; margin-top: .8rem; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid rgba(30, 42, 51, .15); }
.faq-item { border-bottom: 1px solid rgba(30, 42, 51, .15); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.6rem 0; text-align: left; font-family: Fraunces, serif; font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 400;
  transition: color .2s;
}
.faq-q:hover { color: var(--gum); }
.faq-icon { position: relative; flex: none; width: 2.25rem; height: 2.25rem; border: 1px solid rgba(30, 42, 51, .25); border-radius: 9999px; transition: background .3s, border-color .3s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .35s var(--ease); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 3.5rem 1.8rem 0; max-width: 42rem; line-height: 1.7; color: #3A4751; }
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }

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