/* ==========================================================================
   KING AGENCY — site.css
   Tailwind (CDN) handles layout and colour. This file holds type details,
   animation entry states and the hand-built product mockups.
   Rule for this project: absolutely no gradients. Flat fills and hairlines only.
   ========================================================================== */

:root {
  --ink-950: #08080a;
  --ink-900: #0c0c0e;
  --ink-850: #111114;
  --ink-800: #16161a;
  --bone: #f2f0ec;
  --bone-400: #a5a5ac;
  --brass: #c6a15b;
  --hairline: rgba(255, 255, 255, 0.1);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fixed header offset for anchor scrolling. */
:target {
  scroll-margin-top: 96px;
}

section[id] {
  scroll-margin-top: 80px;
}

/* --- Typography -------------------------------------------------------- */

.display {
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.serif-accent {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rule {
  height: 1px;
  background-color: var(--hairline);
  transform-origin: left center;
}

/* Swiss-style column rules without background images. */
.grid-lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}

.grid-lines > span {
  border-left: 1px solid rgba(255, 255, 255, 0.045);
}

@media (min-width: 1024px) {
  .grid-lines {
    grid-template-columns: repeat(12, 1fr);
  }
}

/* --- Focus visibility -------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* --- Animation entry states -------------------------------------------
   Applied only once JS confirms GSAP is available, so content stays
   visible if the CDN fails or scripts are blocked.                       */

html.anim-ready [data-anim="fade-up"],
html.anim-ready [data-anim="fade"],
html.anim-ready [data-anim="card"] {
  opacity: 0;
  will-change: transform, opacity;
}

html.anim-ready [data-anim="fade-up"],
html.anim-ready [data-anim="card"] {
  transform: translate3d(0, 24px, 0);
}

html.anim-ready [data-anim="line"] {
  transform: scaleX(0);
}

html.anim-ready .line-mask > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  will-change: transform;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

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

.marquee {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  white-space: nowrap;
}

/* --- FAQ accordion ----------------------------------------------------- */

.faq-item summary {
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] .faq-plus span:last-child {
  transform: rotate(90deg) scaleX(0);
}

.faq-plus span {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-answer {
  overflow: hidden;
}

/* --- Product mockups (pure CSS, no raster assets) ---------------------- */

.device {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: var(--ink-900);
  border-radius: 28px;
  padding: 8px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.device-screen {
  overflow: hidden;
  border-radius: 22px;
  background-color: var(--ink-850);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.device-notch {
  position: absolute;
  left: 50%;
  top: 14px;
  height: 4px;
  width: 44px;
  transform: translateX(-50%);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.14);
  z-index: 2;
}

.panel {
  border: 1px solid var(--hairline);
  background-color: var(--ink-900);
}

.bar {
  background-color: var(--brass);
}

.bar-muted {
  background-color: rgba(255, 255, 255, 0.14);
}

.sparkline {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.anim-ready [data-anim],
  html.anim-ready .line-mask > span {
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee {
    transform: none !important;
  }
}

/* --- Legal pages -------------------------------------------------------- */

.legal {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--bone-400);
}

.legal > * + * {
  margin-top: 1.1rem;
}

.legal section {
  margin-top: 3.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--hairline);
}

.legal section:first-of-type {
  margin-top: 2.5rem;
}

.legal h2 {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--bone);
  margin-bottom: 1.1rem;
}

.legal h2 .num {
  display: inline-block;
  width: 2.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--brass);
  vertical-align: 2px;
}

.legal h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bone);
  margin-top: 1.9rem;
  margin-bottom: 0.65rem;
}

.legal ul,
.legal ol {
  padding-left: 0;
  list-style: none;
}

.legal li {
  position: relative;
  padding-left: 1.25rem;
  margin-top: 0.6rem;
}

.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 1px;
  background-color: var(--brass);
}

.legal a {
  color: var(--brass);
  text-decoration: underline;
  text-decoration-color: rgba(198, 161, 91, 0.45);
  text-underline-offset: 4px;
}

.legal a:hover {
  text-decoration-color: var(--brass);
}

.legal strong {
  font-weight: 500;
  color: var(--bone);
}

.legal .callout {
  border: 1px solid var(--hairline);
  background-color: var(--ink-900);
  padding: 1.35rem 1.5rem;
  font-size: 0.875rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal th,
.legal td {
  border-bottom: 1px solid var(--hairline);
  padding: 0.85rem 1rem 0.85rem 0;
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-400);
}

.legal td {
  color: var(--bone-400);
}

/* Numbered lists keep their numbers instead of the dash marker. */
.legal ol {
  counter-reset: legal-step;
}

.legal ol > li {
  counter-increment: legal-step;
  padding-left: 1.6rem;
}

.legal ol > li::before {
  content: counter(legal-step) ".";
  top: 0;
  width: auto;
  height: auto;
  background-color: transparent;
  color: var(--brass);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
