/* ============================================================
   COMPONENTS — buttons, rule-links, mockups,
                accordion
   ============================================================ */

/* ── Buttons ────────────────────────────────────────────────
   Near-square, hairline, no glow. The hover is a fill that
   wipes in from the left — a printed-poster gesture rather
   than the glowing gradient pill every template ships with.  */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Sized to the text it holds — the old box was much larger than its
     label, which made the wording look undersized inside it. */
  padding: .62rem 1.25rem;
  border-radius: var(--r-pill);
  /* A pill only reads as a pill at its natural width — stretched across a
     column it becomes a lozenge, so buttons never flex-grow or span 100%. */
  flex: 0 0 auto;
  font-size: .84rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn > span { position: relative; z-index: 1; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .55s var(--ease-out);
}
@media (hover: hover) { .btn:hover::before { transform: scaleX(1); } }

/* Solid: ink ground with Linen type (9.1:1), wiping to Dolphin (5.8:1).
   Amethyst is NOT used as a button fill — Linen on Amethyst is 2.4:1
   and would fail contrast at button text sizes. */
.btn--solid {
  background: var(--fill-strong);
  color: var(--on-fill-strong);
  border: 1px solid var(--fill-strong);
}
.btn--solid::before { background: var(--accent-deep); }
@media (hover: hover) { .btn--solid:hover { color: var(--on-fill-strong); border-color: var(--accent-deep); } }

/* Line: hairline, filling with ink on hover */
.btn--line {
  border: 1px solid var(--rule-strong);
  color: var(--ink);
}
.btn--line::before { background: var(--fill-strong); }
@media (hover: hover) { .btn--line:hover { color: var(--on-fill-strong); border-color: var(--fill-strong); } }

.btn:active { transform: translateY(1px); }

/* ── Rule-link — text over a drawing underline ─────────────── */
.linkrule {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: .45rem;
  width: fit-content;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
}
.linkrule__line {
  display: block;
  height: 1px;
  background: var(--rule-strong);
  overflow: hidden;
}
.linkrule__line::after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .5s var(--ease-out);
}
@media (hover: hover) { .linkrule:hover .linkrule__line::after { transform: scaleX(1); } }

.link-underline {
  color: var(--ink-3);
  border-bottom: 1px solid currentColor;
  transition: color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) { .link-underline:hover { color: var(--ink); } }

/* ============================================================
   DEVICE MOCKUPS — pure CSS, no image assets
   ============================================================ */

.device {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--ground-2);
  box-shadow: var(--shadow-card);
  transition: transform .7s var(--ease-out), border-color var(--dur) var(--ease-out);
}
.device--browser { border-radius: var(--r-lg); }

.device__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--fill-soft);
}
.device__bar i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-2);
  flex-shrink: 0;
}
.device__bar i:first-child { background: var(--accent-deep); }
.device__bar em {
  margin-left: .6rem;
  font-family: var(--font-mono);
  font-size: .56rem;
  font-style: normal;
  letter-spacing: .06em;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device--phone {
  width: min(64%, 236px);
  margin-inline: auto;
  border-radius: 26px;
  padding: 9px;
}
.device__notch {
  display: block;
  width: 40%;
  height: 4px;
  margin: 2px auto 7px;
  border-radius: 99px;
  background: var(--rule-strong);
}

.device__screen {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  padding: clamp(.9rem, 2.2vw, 1.6rem);
}
.device--phone .device__screen {
  aspect-ratio: 9 / 17;
  border-radius: 18px;
  padding: .8rem .7rem;
}

/* Per-project palettes.
   These deliberately sit OUTSIDE the Skay Crafts violet: each mockup shows
   the client's own live branding, so the work reads as real rather than as
   five recolours of the same template. The portfolio's own chrome — type,
   rules, buttons, grounds — stays strictly violet/chrome/black.
   --brand drives the accents inside each screen. */
.screen--playzoo {
  --brand: #E2A529;                                   /* playzoo.in gold */
  background: linear-gradient(160deg, #101a33, #05070d 70%);
}
.screen--cornerstay {
  --brand: #7FB3B8;                                   /* cornerstay teal */
  background: linear-gradient(160deg, #123039, #081418 72%);
}
.screen--roost {
  --brand: #C98B96;                                   /* the roost wine */
  background: linear-gradient(160deg, #2C0C15, #12060A 72%);
}
.screen--farook {
  --brand: #FFFFFF;                                   /* farookjbashadop.com */
  background: #000;
}
.screen--vapr       { --brand: var(--accent-deep); background: linear-gradient(165deg, #1e1236, #0a0a0d 70%); }
.screen--dawood     { --brand: #C8B283;                background: linear-gradient(160deg, #10251C, #0a0a0c 70%); }   /* dawooddecors.com green */
.screen--hionwheels-web {
  --brand: #D9A441;                                   /* hionwheels.com gold */
  background: #1b1a17;
}
.screen--hionwheels { --brand: var(--accent-deep); background: linear-gradient(155deg, #150f24, #0a0a0d 66%); }

/* ── Brand sheet ────────────────────────────────────────────
   For identity work there is no interface to show, so the card
   presents the deliverable itself: wordmark, rule, palette.
   Showing a dashboard here would imply software we did not build.

   For HiOnWheels the deliverables span print and vehicle application
   as well as screen, so the card names them rather than implying a
   single artefact. */
.ui-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .55rem;
  height: 100%;
}
.ui-brand__mark {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
  color: #fff;
}
.ui-brand__sub {
  font-family: var(--font-mono);
  font-size: .55rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.ui-brand__rule {
  display: block;
  height: 1px;
  margin: .5rem 0 .2rem;
  background: rgba(255, 255, 255, .18);
}
/* The deliverables, named. An abstract palette here would be invented —
   the real one is not in this repo — whereas the scope is known, and it
   is the more useful thing for a visitor to read anyway. */
.ui-brand__scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .3rem .7rem;
}
.ui-brand__scope li {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .64);
  white-space: nowrap;
}
.ui-brand__scope li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: .5em;
  border-radius: 50%;
  background: var(--brand);
  vertical-align: middle;
}

/* — abstract UI primitives inside the screens — */
.ui-title {
  display: block;
  font-size: clamp(1.1rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  margin-bottom: .9rem;
  color: #fff;
}
.ui-title.small { font-size: clamp(.85rem, 2.2vw, 1.3rem); letter-spacing: .1em; font-weight: 700; }
.ui-title b { font-weight: inherit; color: var(--brand, #fff); }

/* — per-site primitives — */
.ui-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: .9rem;
}
.ui-serif {
  display: block;
  font-family: var(--font-edit);
  font-size: clamp(1rem, 2.8vw, 1.7rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: .8rem;
}
.ui-serif i { font-style: italic; color: var(--brand); }

.ui-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: .9rem; }
.ui-cards b {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 3 / 2;
  padding: .5rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}
.ui-cards em {
  font-family: var(--font-edit);
  font-style: normal;
  font-size: .68rem;
  color: rgba(255, 255, 255, .82);
}

.ui-photo {
  display: block;
  height: 38%;
  min-height: 54px;
  margin: -.4rem -.4rem .9rem;
  border-radius: 4px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .1), transparent 60%),
    linear-gradient(160deg, #4A2028, #1A0A10);
}

/* farookjbashadop.com — glowing condensed name on pure black */
.ui-glow {
  display: block;
  margin-top: 12%;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, .75), 0 0 46px rgba(255, 255, 255, .35);
}
.screen--farook .ui-sub { text-align: center; margin-top: .8rem; }

.ui-lines { display: flex; flex-direction: column; gap: 6px; }
.ui-lines s, .ui-col s, .ui-book s, .ui-card s, .ui-appbar s {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .13);
  text-decoration: none;
}
.w70 { width: 70%; } .w60 { width: 60%; } .w50 { width: 50%; } .w40 { width: 40%; }

.ui-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: .9rem 0; }
.ui-tiles.three { grid-template-columns: repeat(3, 1fr); }
.ui-tiles i {
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .07);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .1), transparent 55%),
    var(--brand, var(--accent-deep));
  opacity: .2;
}

.ui-split { display: grid; grid-template-columns: 1fr .8fr; gap: 12px; align-items: start; }
.ui-col { display: flex; flex-direction: column; gap: 8px; }
.ui-book {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: .6rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 4px;
  background: rgba(255, 255, 255, .03);
}
.ui-btn {
  display: block;
  padding: .32rem .6rem;
  border-radius: 3px;
  background: var(--brand, var(--accent-deep));
  font-size: .55rem;
  font-weight: 700;
  text-align: center;
  color: #0A0A0C;
}
.ui-btn.full { width: 100%; margin-top: auto; padding: .45rem; }

.ui-app { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.ui-appbar { display: flex; align-items: center; justify-content: space-between; }
.ui-appbar s { width: 46%; height: 7px; }
.ui-appbar i { display: block; width: 13px; height: 13px; border-radius: 50%; background: var(--brand, var(--accent-deep)); opacity: .55; }
.ui-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: .55rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 4px;
  background: rgba(255, 255, 255, .03);
}
.ui-card b { display: block; height: 22px; border-radius: 3px; background: var(--brand, var(--accent-deep)); opacity: .3; }

.ui-dash { display: grid; grid-template-columns: 32px 1fr; gap: 12px; height: 100%; }
.ui-side { display: flex; flex-direction: column; gap: 7px; }
.ui-side i { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .11); }
.ui-side i:first-child { background: var(--brand, var(--accent-deep)); }
.ui-main { display: flex; flex-direction: column; gap: 10px; }
.ui-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ui-kpis b {
  display: block;
  height: 26px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
}
.ui-kpis b:first-child { background: var(--brand, var(--accent-deep)); opacity: .26; }
.ui-chart { display: flex; align-items: flex-end; gap: 5px; height: 46%; min-height: 44px; }
.ui-chart s {
  flex: 1;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: var(--brand, var(--accent-deep));
  opacity: .75;
  text-decoration: none;
}
.ui-chart s:nth-child(6) { background: var(--linen); opacity: 1; }

/* ============================================================
   ACCORDION
   ============================================================ */

.qa { border-bottom: 1px solid var(--rule-soft); }
.qa__q {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.1rem, 2.4vw, 1.5rem) 0;
  text-align: left;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--ink-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.qa__n {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-style: normal;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.qa.is-open .qa__q { color: var(--ink); }
@media (hover: hover) { .qa__q:hover { color: var(--ink); } }

.qa__icon {
  position: relative;
  width: 26px; height: 26px;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease-out);
}
.qa__icon::before,
.qa__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast) linear;
}
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa.is-open .qa__icon { transform: rotate(180deg); color: var(--accent-deep); }
.qa.is-open .qa__icon::after { opacity: 0; }

.qa__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease-out);
}
.qa__a > div { overflow: hidden; }
.qa__a p {
  padding: 0 0 1.5rem 3.4rem;
  max-width: 62ch;
  color: var(--ink-3);
  line-height: 1.68;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease-out) .1s, transform .4s var(--ease-out) .1s;
}
.qa.is-open .qa__a { grid-template-rows: 1fr; }
.qa.is-open .qa__a p { opacity: 1; transform: translateY(0); }


/* ============================================================
   BACK LINK — /projects/, /privacy/, /terms/
   ============================================================ */

/* Small pill back to the homepage, above the page's own header. */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
  padding: .4rem .85rem .4rem .6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) { .backlink:hover { border-color: var(--ink); color: var(--accent-deep); } }
.backlink:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
