/* =========================================================
   BLACK FLAG SITES — style.css
   Dark maritime-luxe. Bone white on near-black. Gold metal.
   ========================================================= */

:root {
  /* Core palette */
  --black:        #0a0a0a;
  --ink:          #0c0b0a;
  --surface:      #141210;
  --surface-2:    #1b1815;
  --bone:         #f5f0e8;
  --bone-dim:     rgba(245, 240, 232, 0.62);
  --bone-faint:   rgba(245, 240, 232, 0.40);
  --gold:         #c2a367;
  --gold-bright:  #ddc183;
  --gold-deep:    #9c7f4a;

  /* Lines */
  --hair:         rgba(245, 240, 232, 0.08);
  --hair-gold:    rgba(194, 163, 103, 0.22);

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Metal gradient */
  --metal: linear-gradient(140deg, #9c7f4a 0%, #e7cf93 32%, #c2a367 58%, #f2e3bb 78%, #9c7f4a 100%);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--bone);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- Atmosphere: grain + glow ---------- */
body::before {
  /* fine film grain */
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.045;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -5%, rgba(194,163,103,0.13), transparent 70%),
    radial-gradient(40% 40% at 88% 12%, rgba(194,163,103,0.06), transparent 70%),
    radial-gradient(50% 50% at 10% 60%, rgba(194,163,103,0.05), transparent 70%);
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { position: relative; }
.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  font-weight: 700; color: var(--gold);
  display: inline-flex; align-items: center; gap: 0.7em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold-deep);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: ""; width: 26px; height: 1px; background: var(--gold-deep);
}

h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.02; letter-spacing: -0.02em; }
.metal-text {
  background: var(--metal);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.italic { font-style: italic; font-weight: 900; }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 18px 0 0; }
.section-head p { color: var(--bone-dim); font-size: 1.08rem; margin-top: 18px; max-width: 560px; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 15px 28px; border-radius: 100px; font-weight: 700;
  font-size: 0.98rem; letter-spacing: 0.01em; transition: all 0.35s var(--ease);
  white-space: nowrap;
}
.btn-gold { background: var(--metal); color: #1a1306; box-shadow: 0 8px 30px rgba(194,163,103,0.22); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(194,163,103,0.34); }
.btn-ghost { border: 1px solid var(--hair-gold); color: var(--bone); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(194,163,103,0.07); }
.btn .arr { transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Top bar (logo) ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand .name {
  font-family: var(--display); font-weight: 900; font-size: 1.05rem;
  letter-spacing: 0.02em; line-height: 1;
}
.brand .name small { display: block; font-family: var(--sans); font-weight: 600;
  font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.topbar .top-cta { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--bone-dim); }
.topbar .top-cta a { color: var(--gold); font-weight: 700; }

/* ---------- Floating pill nav ---------- */
.pill-nav {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(0);
  z-index: 200;
  display: flex; align-items: center; gap: 4px;
  padding: 7px;
  background: rgba(18, 16, 14, 0.72);
  border: 1px solid var(--hair-gold);
  border-radius: 100px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6), inset 0 1px 0 rgba(245,240,232,0.05);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  max-width: calc(100vw - 24px);
}
.pill-nav.hidden { transform: translateX(-50%) translateY(140%); opacity: 0; }
.pill-nav a {
  padding: 11px 17px; border-radius: 100px; font-size: 0.9rem; font-weight: 600;
  color: var(--bone-dim); transition: color 0.25s, background 0.25s; white-space: nowrap;
}
.pill-nav a:hover { color: var(--bone); }
.pill-nav a.active { color: var(--bone); background: rgba(194,163,103,0.12); }
.pill-nav .home { display: flex; padding: 11px 13px; }
.pill-nav .home svg { width: 18px; height: 18px; }
.pill-nav .nav-cta { background: var(--metal); color: #1a1306; font-weight: 700; }
.pill-nav .nav-cta:hover { color: #1a1306; }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 110px; text-align: center; }
.hero .slots {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.78rem; letter-spacing: 0.06em; color: var(--bone-dim);
  border: 1px solid var(--hair-gold); border-radius: 100px; padding: 8px 16px;
  margin-bottom: 34px;
}
.hero .slots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(221,193,131,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(221,193,131,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(221,193,131,0); }
  100% { box-shadow: 0 0 0 0 rgba(221,193,131,0); }
}
.hero h1 { font-size: clamp(2.7rem, 7.5vw, 5.6rem); margin: 0 auto; max-width: 14ch; }
.hero .lede {
  color: var(--bone-dim); font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 580px; margin: 30px auto 0; line-height: 1.6;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero .trust {
  margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.hero .trust span { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone-faint); }
.hero .trust .logos { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; align-items: center; }
.hero .trust .logos a {
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--bone-dim);
  letter-spacing: 0.01em; transition: color 0.3s; position: relative;
}
.hero .trust .logos a:hover { color: var(--gold); }

/* ---------- Marquee strip ---------- */
.strip {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  padding: 22px 0; overflow: hidden; white-space: nowrap;
}
.strip .track { display: inline-flex; gap: 48px; animation: scroll 34s linear infinite; }
.strip .track span {
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--bone-faint);
  display: inline-flex; align-items: center; gap: 48px;
}
.strip .track span::after { content: "✦"; color: var(--gold-deep); font-size: 0.8rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Generic section spacing ---------- */
.block { padding: 110px 0; }

/* ---------- Problem ---------- */
.problem .big {
  font-family: var(--display); font-weight: 900; font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.12; letter-spacing: -0.02em; max-width: 18ch;
}
.problem .big em { font-style: italic; color: var(--bone-dim); }
.problem .row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: end; }
.problem .stat-list { display: grid; gap: 26px; }
.problem .stat { border-left: 2px solid var(--gold-deep); padding-left: 18px; }
.problem .stat .num { font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: var(--gold-bright); }
.problem .stat .lbl { color: var(--bone-dim); font-size: 0.95rem; margin-top: 4px; }

/* ---------- Features ---------- */
.features .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  background: linear-gradient(180deg, var(--surface), var(--ink));
  border: 1px solid var(--hair); border-radius: 18px; padding: 32px 28px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s;
  position: relative; overflow: hidden;
}
.feat::after {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(194,163,103,0.10), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.feat:hover { border-color: var(--hair-gold); transform: translateY(-4px); }
.feat:hover::after { opacity: 1; }
.feat .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--hair-gold); color: var(--gold-bright); margin-bottom: 20px;
}
.feat .ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 1.3rem; font-weight: 900; }
.feat p { color: var(--bone-dim); font-size: 0.96rem; margin-top: 10px; }
.feat.wide { grid-column: span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.feat.wide .tag { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.feat.wide h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 12px; }
.feat.wide .code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.82rem;
  background: #0a0908; border: 1px solid var(--hair); border-radius: 12px; padding: 20px;
  color: var(--bone-dim); line-height: 1.7; overflow-x: auto;
}
.feat.wide .code .c { color: var(--gold-bright); }
.feat.wide .code .k { color: #8fb3a0; }

/* ---------- Work ---------- */
.work .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case {
  border: 1px solid var(--hair); border-radius: 20px; overflow: hidden;
  background: var(--surface); transition: transform 0.45s var(--ease), border-color 0.45s;
  display: flex; flex-direction: column;
}
.case:hover { transform: translateY(-6px); border-color: var(--hair-gold); }
.case .thumb {
  aspect-ratio: 16/11; position: relative; overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(194,163,103,0.12), transparent 65%),
    linear-gradient(160deg, #1c1916, #0c0b0a);
}
.case .thumb .mark {
  font-family: var(--display); font-weight: 900; font-size: 2.4rem; letter-spacing: -0.02em;
  text-align: center; padding: 0 18px;
}
.case .thumb .mark small { display:block; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.case .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case .trade { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-faint); }
.case .body h3 { font-size: 1.3rem; }
.case .body p { color: var(--bone-dim); font-size: 0.92rem; flex: 1; }
.case .visit { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-weight: 700; font-size: 0.88rem; }
.case .visit .arr { transition: transform 0.3s; }
.case:hover .visit .arr { transform: translate(3px,-3px); }
.case.flagship .thumb { background:
    radial-gradient(70% 90% at 50% 0%, rgba(194,163,103,0.22), transparent 65%),
    linear-gradient(160deg, #221d16, #0c0b0a); }
.case.flagship .badge {
  position: absolute; top: 14px; left: 14px; font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 700; color: #1a1306; background: var(--metal);
  padding: 5px 11px; border-radius: 100px;
}

/* ---------- Process ---------- */
.process .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.step { padding: 0 30px; border-left: 1px solid var(--hair); position: relative; }
.step:first-child { border-left: none; padding-left: 0; }
.step .n { font-family: var(--display); font-weight: 900; font-size: 1rem; color: var(--gold);
  border: 1px solid var(--hair-gold); width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px; }
.step h3 { font-size: 1.5rem; }
.step p { color: var(--bone-dim); margin-top: 10px; font-size: 0.98rem; }

/* ---------- Pricing ---------- */
.pricing .grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; align-items: stretch; }
.plan {
  border-radius: 22px; padding: 40px; display: flex; flex-direction: column;
  border: 1px solid var(--hair-gold); position: relative; overflow: hidden;
  background: linear-gradient(170deg, var(--surface-2), var(--ink));
}
.plan.core::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 100% 0%, rgba(194,163,103,0.16), transparent 60%);
}
.plan .label { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.plan h3 { font-size: 1.9rem; margin-top: 8px; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 6px; flex-wrap: wrap; }
.plan .price .amt { font-family: var(--display); font-weight: 900; font-size: 3.2rem; line-height: 1; }
.plan .price .per { color: var(--bone-dim); font-size: 0.98rem; }
.plan .price .plus { color: var(--bone-faint); font-size: 0.9rem; margin: 0 4px; }
.plan .sub { color: var(--bone-dim); font-size: 0.98rem; margin-bottom: 26px; }
.plan ul { display: grid; gap: 13px; margin-bottom: 30px; }
.plan li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.96rem; color: var(--bone); }
.plan li svg { width: 17px; height: 17px; color: var(--gold-bright); flex-shrink: 0; margin-top: 3px; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan.upgrade { border-color: var(--hair); background: var(--surface); }
.plan.upgrade .price .amt { font-size: 2.4rem; }
.plan.upgrade li svg { color: var(--bone-dim); }
.plan .note { font-size: 0.82rem; color: var(--bone-faint); margin-top: 14px; text-align: center; }

/* ---------- FAQ ---------- */
.faq .list { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--hair); }
.qa { border-bottom: 1px solid var(--hair); }
.qa button {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 26px 4px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--bone);
}
.qa .plus { flex-shrink: 0; width: 24px; height: 24px; position: relative; }
.qa .plus::before, .qa .plus::after {
  content: ""; position: absolute; background: var(--gold); transition: transform 0.35s var(--ease);
  top: 50%; left: 50%;
}
.qa .plus::before { width: 16px; height: 2px; transform: translate(-50%,-50%); }
.qa .plus::after { width: 2px; height: 16px; transform: translate(-50%,-50%); }
.qa.open .plus::after { transform: translate(-50%,-50%) scaleY(0); }
.qa .ans { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.qa .ans p { color: var(--bone-dim); padding: 0 4px 26px; max-width: 65ch; font-size: 1rem; }

/* ---------- CTA / Contact ---------- */
.contact { padding: 120px 0; }
.contact .panel {
  border: 1px solid var(--hair-gold); border-radius: 28px; padding: 64px 48px;
  text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--ink));
}
.contact .panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 0%, rgba(194,163,103,0.16), transparent 60%);
}
.contact img.crest { width: 64px; height: 64px; margin: 0 auto 24px; position: relative; }
.contact h2 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); position: relative; }
.contact p { color: var(--bone-dim); max-width: 480px; margin: 18px auto 34px; position: relative; font-size: 1.08rem; }
.contact .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.contact .meta { margin-top: 28px; font-size: 0.9rem; color: var(--bone-faint); position: relative; }
.contact .meta a { color: var(--gold); font-weight: 600; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--hair); padding: 56px 0 120px; }
footer .row { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
footer .brand .name { font-size: 0.98rem; }
footer .tag { color: var(--bone-faint); font-size: 0.86rem; max-width: 320px; }
footer .links { display: flex; gap: 24px; flex-wrap: wrap; }
footer .links a { color: var(--bone-dim); font-size: 0.9rem; transition: color 0.25s; }
footer .links a:hover { color: var(--gold); }
footer .copy { color: var(--bone-faint); font-size: 0.8rem; width: 100%; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--hair); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .strip .track, .hero .slots .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features .grid, .work .grid, .process .grid { grid-template-columns: 1fr 1fr; }
  .feat.wide { grid-column: span 2; grid-template-columns: 1fr; }
  .problem .row { grid-template-columns: 1fr; gap: 40px; }
  .pricing .grid { grid-template-columns: 1fr; }
  .step { border-left: none; padding: 0; }
  .step + .step { border-top: 1px solid var(--hair); padding-top: 30px; margin-top: 6px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .block { padding: 80px 0; }
  .hero { padding: 130px 0 80px; }
  .features .grid, .work .grid, .process .grid { grid-template-columns: 1fr; }
  .feat.wide { grid-column: span 1; }
  .topbar .top-cta { display: none; }
  .pill-nav a:not(.home):not(.nav-cta) { display: none; }
  .pill-nav a.active { display: block; }
  .contact .panel { padding: 48px 24px; }
  footer .row { flex-direction: column; align-items: flex-start; }
}
