/* ============================================================
   NobleNox Designs — Design System
   ============================================================ */

:root {
  /* Colour */
  --bg: #0B0526;
  --sf: #140C42;
  --ink: #F2F2F4;
  --mu: #AFAEC6;
  --br: #FBCD84;
  --ln: #2A1E72;
  --ln-soft: rgba(42, 30, 114, 0.55);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max: 1180px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-btn: 8px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--br);
  outline-offset: 3px;
}

/* Skip link */
.skip {
  position: absolute;
  top: -100px;
  left: 1.25rem;
  background: var(--br);
  color: var(--bg);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ---------- Layout — generous side breathing room ---------- */
.w {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.6rem;
}

@media (min-width: 640px) {
  .w { padding-inline: 2.5rem; }
}

@media (min-width: 900px) {
  .w { padding-inline: 3.25rem; }
}

@media (min-width: 1200px) {
  .w { padding-inline: 4rem; }
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 5, 38, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

header .w {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.05rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.logo img {
  border-radius: 6px;
  width: 28px;
  height: 28px;
}

nav {
  display: flex;
  gap: 0.1rem 1.4rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--mu);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  padding: 0.25rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--br);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.1rem);
  max-width: 13.5ch;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  margin-bottom: 1.1rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.big {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
  max-width: 24ch;
  color: var(--ink);
}

.mu { color: var(--mu); }

.tag {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

/* Gold tags only outside work cards */
.mu .tag,
.hero .tag,
.cs .tag {
  color: var(--br);
}

/* ---------- Hero (centered, no colour bar) ---------- */
.hero {
  padding: 5.75rem 0 4.75rem;
  text-align: center;
}

.hero h1 {
  margin-inline: auto;
}

.hero > p {
  color: var(--mu);
  max-width: 40ch;
  margin: 1.45rem auto 2.15rem;
  font-size: 1.08rem;
  line-height: 1.65;
  letter-spacing: -0.012em;
}

.hero .btn.o { margin-left: 0.5rem; }

/* ---------- Buttons — soft rectangle ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--br);
  color: #0B0526;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
  padding: 0.78rem 1.5rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s var(--ease);
}

.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }

.btn.o {
  background: transparent;
  color: var(--ink);
  border-color: var(--ln);
  margin-left: 0.5rem;
}

.btn.o:hover {
  border-color: var(--br);
  color: var(--br);
  filter: none;
}

/* ---------- Sections ---------- */
section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--ln);
}

/* ---------- Cards & Grid ---------- */
.g {
  display: grid;
  gap: 1.85rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.3s ease, transform 0.35s var(--ease), box-shadow 0.35s ease;
}

.card:hover {
  border-color: rgba(251, 205, 132, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card a {
  text-decoration: none;
  display: block;
  color: inherit;
}

/* Image */
.ph {
  aspect-ratio: 4 / 3;
  background: #0B0526;
  overflow: hidden;
}

.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.card:hover .ph img {
  transform: scale(1.035);
}

/* Text under image — tight, centered, premium */
.card a > div:not(.ph) {
  padding: 1.35rem 1.1rem 1.5rem;
  text-align: center;
  background: #0C0818;
}

.card h3 {
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0 0 0.28rem 0;
  text-align: center;
}

.card .tag {
  display: block;
  margin: 0;
  color: rgba(242, 242, 244, 0.62) !important;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.4;
  text-align: center;
}

/* Pricing cards stay left-aligned */
.card .price {
  color: var(--br);
  font-weight: 600;
  font-size: 1.08rem;
  margin-top: 0.85rem;
  letter-spacing: -0.02em;
}

.card:has(.price) > a > div,
.card:has(.price) a > div {
  text-align: left;
  background: #0E0820;
}

.card:has(.price) h3 {
  text-align: left;
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 270px) 1fr;
  align-items: center;
}

.about img {
  border-radius: var(--radius);
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ---------- Process ---------- */
ol.s {
  padding-left: 1.3rem;
  color: var(--mu);
  list-style: decimal;
}

ol.s li {
  margin: 0.5rem 0;
  padding-left: 0.4rem;
}

ol.s li::marker {
  color: var(--br);
  font-weight: 600;
}

/* ---------- Case studies ---------- */
.cb {
  display: grid;
  gap: 1.85rem;
  margin: 2.25rem 0 2.75rem;
  max-width: 58ch;
}

.cb h3 { margin-bottom: 0.3rem; }

ul.l {
  padding-left: 1.1rem;
  color: var(--mu);
}

ul.l li { margin: 0.22rem 0; }

.chips {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mu);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.chips i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--ln);
  flex-shrink: 0;
}

.gal {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  align-items: start;
}

.gal img {
  border-radius: var(--radius);
  width: 100%;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--ln);
  padding: 3.5rem 0 2.1rem;
  margin-top: 0.5rem;
}

.footer-grid {
  display: grid;
  gap: 2.4rem 2.75rem;
  grid-template-columns: 1.35fr 1fr 1fr;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--mu);
  max-width: 30ch;
  margin-top: 0.7rem;
  font-size: 0.94rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mu);
  margin-bottom: 0.95rem;
}

.footer-col a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--br); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.6rem;
  border-top: 1px solid var(--ln);
  color: var(--mu);
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.soc {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.soc a {
  color: var(--mu);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.soc a:hover { color: var(--br); }

/* ---------- Forms ---------- */
form {
  display: grid;
  gap: 1.1rem;
  max-width: 520px;
  margin-inline: auto;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.015em;
  text-align: left;
}

input, select, textarea {
  font: inherit;
  font-family: var(--font-body);
  background: var(--sf);
  color: var(--ink);
  border: 1px solid var(--ln);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  letter-spacing: -0.012em;
  transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--br);
}

/* ---------- Subtle entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp 0.55s var(--ease) forwards;
  }
  .fade-up.d1 { animation-delay: 0.07s; }
  .fade-up.d2 { animation-delay: 0.14s; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.9rem;
  }
  .about { grid-template-columns: 1fr; }
  .btn.o {
    margin-left: 0;
    margin-top: 0.55rem;
  }
  .hero { padding: 4rem 0 3.5rem; }
  section { padding: 3.5rem 0; }
  .w { padding-inline: 1.45rem; }
}

@media (max-width: 420px) {
  .w { padding-inline: 1.25rem; }
  nav { gap: 0.85rem; }
  .btn, .btn.o { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .card:hover { transform: none; }
  .card:hover .ph img { transform: none; }
}

/* ---------- v4 ---------- */
.cs { padding: 4.5rem 0 4rem; text-align: left; }
.cs h1 { max-width: none; margin-bottom: 0.5rem; }
.cb { gap: 0; max-width: none; margin: 2.5rem 0; border-bottom: 1px solid var(--ln); }
.cb > div { display: grid; grid-template-columns: 11rem minmax(0, 62ch); column-gap: 2.5rem; row-gap: 0.4rem; padding: 1.75rem 0; border-top: 1px solid var(--ln); }
.cb h3 { grid-column: 1; grid-row: 1; margin: 0; color: var(--br); font-size: 1rem; }
.cb > div > :not(h3) { grid-column: 2; }
.gal { grid-template-columns: repeat(2, 1fr); }
.gal img:first-child, .gal img:last-child { grid-column: 1 / -1; }
.card > div { padding: 1.6rem 1.5rem 1.75rem; text-align: left; }
.card > div > p.mu { margin-top: 0.4rem; }
.card:not(:has(a)):hover { transform: none; box-shadow: none; border-color: rgba(255, 255, 255, 0.07); }
.g.two { grid-template-columns: repeat(2, 1fr); }
.g.feat { grid-template-columns: repeat(2, 1fr); }
.g.feat .card:first-child { grid-column: 1 / -1; }
.g.feat .card:first-child .ph { aspect-ratio: 3 / 2; }
ol.s { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; counter-reset: step; margin-top: 1.5rem; }
ol.s li { counter-increment: step; margin: 0; padding: 1.35rem 1.4rem; border: 1px solid var(--ln); border-radius: var(--radius); }
ol.s li::before { content: counter(step); display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--br); margin-bottom: 0.7rem; }
.cta { text-align: center; }
.cta h2 { margin-inline: auto; }
.cta p { color: var(--mu); max-width: 44ch; margin: 0 auto 1.8rem; }
@media (max-width: 720px) {
  .g.two, .g.feat, .gal { grid-template-columns: 1fr; }
  .cb > div { grid-template-columns: 1fr; }
  .cb h3 { grid-row: auto; }
  .cb > div > :not(h3) { grid-column: 1; }
  .cs { padding: 3rem 0; }
}

/* ---------- v5 ---------- */
.hero-wrap { background: radial-gradient(70% 90% at 50% -10%, rgba(98, 66, 235, 0.42), transparent 70%), radial-gradient(45% 60% at 88% 15%, rgba(251, 205, 132, 0.13), transparent 70%), radial-gradient(40% 50% at 8% 40%, rgba(60, 40, 170, 0.28), transparent 70%); }
.hero-wrap .hero { padding: 7rem 0 6rem; }
.hero-wrap h1 { max-width: 17ch; }
.hero-wrap .hero > p { max-width: 46ch; }
.price span { font-weight: 500; font-size: 0.95rem; color: var(--mu); margin-left: 0.35rem; }
textarea { min-height: 9rem; resize: vertical; }
form .btn { width: 100%; }
@media (max-width: 720px) { .hero-wrap .hero { padding: 4.5rem 0 4rem; } }

/* ---------- v7: justified gallery ---------- */
.gal { display: flex; flex-direction: column; gap: 1.1rem; }
.gal .r { display: flex; gap: 1.1rem; align-items: flex-start; }
.gal .r img { flex: var(--ar) 1 0%; min-width: 0; width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 720px) { .gal .r { flex-direction: column; } .gal .r img { flex: none; } }
