/* =========================================================
   Creative Cube - styles
   Brand colors live here. Change --accent to reskin the site.
   ========================================================= */
:root {
  /* Day / light theme */
  --bg:        #ffffff;   /* page background */
  --bg-alt:    #f4f5f8;   /* light gray - alternating sections */
  --surface:   #ffffff;   /* cards */
  --border:    #e4e7ec;   /* light border */
  --text:      #16181d;   /* near-black text */
  --muted:     #5c6270;   /* gray body text */
  --accent:    #f5a623;   /* brand amber (from the Creative Cube logo) */
  --accent-2:  #ef8a1a;   /* deeper amber for gradient contrast on white */
  --navy:      #0d1633;   /* brand navy (used for the logos band) */
  --radius:    16px;
  --maxw:      1140px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --shadow:    0 1px 2px rgba(16,18,29,.05), 0 12px 32px -16px rgba(16,18,29,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem;
  font-weight: 600; color: var(--accent); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #0b0b0f; font-weight: 600;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; font-size: 0.95rem; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(245,166,35,.5); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--full { width: 100%; padding: 16px; }

/* ---------- Brand / logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand__logo { width: 32px; height: 32px; display: block; flex: none; }
.brand__name { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.12rem; letter-spacing: .01em; text-transform: uppercase; color: var(--text); }
.brand__name em { font-style: normal; font-weight: 400; color: var(--muted); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__call { color: var(--text) !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s var(--ease); }

/* ---------- Hero ---------- */
.hero { padding: clamp(60px, 10vw, 120px) 0 clamp(60px, 8vw, 100px); position: relative; }
.hero::before {
  content: ""; position: absolute; top: -20%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,166,35,.22), transparent 60%);
  filter: blur(40px); z-index: 0; pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 22px; }
.hero__lead { color: var(--muted); font-size: 1.12rem; max-width: 34em; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero__tag { color: var(--muted); font-style: italic; font-size: 0.95rem; }

/* 3D cube: each face shows one thing we do */
.hero__art { position: relative; display: grid; place-items: center; perspective: 950px; cursor: grab; touch-action: none; }
.hero__art.dragging { cursor: grabbing; }
.scene { width: 200px; height: 200px; position: relative; transform-style: preserve-3d; animation: spin 20s linear infinite; }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.face {
  position: absolute; width: 200px; height: 200px;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  border: 1.5px solid var(--accent); border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,166,35,.1), rgba(13,22,51,.05));
  box-shadow: inset 0 0 40px rgba(245,166,35,.14);
  backdrop-filter: blur(3px);
  backface-visibility: hidden;   /* hide the far sides so labels never read reversed */
}
.face svg { width: 62px; height: 62px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(245,166,35,.45)); }
.face__label {
  font-family: "Space Grotesk"; font-weight: 600; font-size: .92rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text);
}
.front  { transform: translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }
@keyframes spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }

/* orbiting creative sparks */
.spark {
  position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px 2px rgba(245,166,35,.6);
}
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--r, 150px)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--r, 150px)) rotate(-360deg); }
}
.spark--1 { --r: 140px; animation: orbit 8s linear infinite; }
.spark--2 { --r: 168px; animation: orbit 12s linear infinite reverse; opacity: .75; }
.spark--3 { --r: 116px; width: 6px; height: 6px; animation: orbit 15s linear infinite; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 620px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section__head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 16px; }
.section__sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- C.U.B.E. cards ---------- */
.cube-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); }
/* Integrated drop-cap initial: the C.U.B.E. letter IS the first letter of the word */
.card__title {
  display: flex; align-items: baseline; gap: 1px; line-height: 1;
  position: relative; padding-bottom: 16px; margin-bottom: 18px;
}
.card__title::after {
  content: ""; position: absolute; left: 2px; bottom: 0; width: 28px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width .3s var(--ease);
}
.card:hover .card__title::after { width: 52px; }
.card__initial {
  font-family: "Space Grotesk"; font-weight: 700; font-size: 3.4rem; line-height: .68;
  letter-spacing: -0.04em;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 16px rgba(245,166,35,.35));
  transition: transform .25s var(--ease);
}
.card__rest { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--text); }
.card:hover .card__initial { transform: translateY(-2px); }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 30px; position: relative; overflow: hidden; transition: border-color .25s;
}
.svc:hover { border-color: var(--accent); }
.svc__num { font-family: "Space Grotesk"; font-size: 2.4rem; font-weight: 700; color: var(--border); margin-bottom: 10px; }
.svc:hover .svc__num { color: var(--accent); transition: color .25s; }
.svc h3 { font-size: 1.4rem; margin-bottom: 18px; }
.svc ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.svc li { color: var(--muted); font-size: 0.98rem; padding-left: 22px; position: relative; }
.svc li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Clients ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px 46px; }
.logo-img {
  width: 150px; height: 54px; object-fit: contain; object-position: center;
  opacity: .68; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.logo-img:hover { opacity: 1; transform: translateY(-3px); }
/* legacy text-logo fallback */
.logo { font-family: "Space Grotesk"; font-weight: 600; font-size: 1.35rem; color: var(--muted); opacity: .65; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact .section__head { text-align: left; margin: 0; }
.contact__copy h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }
.contact__list { list-style: none; margin-top: 30px; display: flex; flex-direction: column; gap: 22px; }
.contact__list li { display: flex; flex-direction: column; gap: 4px; }
.contact__label { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--accent); font-weight: 600; }
.contact__list a { color: var(--text); text-decoration: none; font-size: 1.05rem; }
.contact__list a:hover { color: var(--accent); }

.form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 8px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 14px; color: var(--text); font-family: inherit; font-size: .98rem; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; }
.form__note { margin-top: 14px; font-size: .92rem; text-align: center; }
.form__note.ok { color: #4ade80; }
.form__note.err { color: #f87171; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 34px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__meta { color: var(--muted); font-size: .88rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* Scale the whole cube (keeps face/depth geometry correct) instead of resizing faces */
  .hero__art { order: -1; height: 190px; transform: scale(0.6); transform-origin: center; }
  .spark { display: none; }
  .cube-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 34px; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); padding: 0 24px;
  }
  .nav__links.open { max-height: 420px; padding: 12px 24px 24px; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav__links .btn { margin-top: 12px; border-bottom: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 520px) {
  .cube-grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}

/* =========================================================
   Multi-page additions
   ========================================================= */

/* Active nav link */
.nav__links a.active { color: var(--text); }
.nav__links a.active:not(.btn) { position: relative; }
.nav__links a.active:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent);
}

/* Interior page hero */
.page-hero { padding: clamp(64px, 9vw, 110px) 0 clamp(20px, 4vw, 40px); text-align: center; position: relative; }
.page-hero::before {
  content: ""; position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 640px; height: 420px; max-width: 90%;
  background: radial-gradient(circle, rgba(245,166,35,.16), transparent 65%);
  filter: blur(30px); z-index: 0; pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin-bottom: 18px; }
.page-hero__lead { color: var(--muted); font-size: 1.12rem; max-width: 44em; margin: 0 auto; }

/* Services page - jump links */
.svc-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.svc-jump a {
  color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; transition: .2s var(--ease);
}
.svc-jump a:hover { color: var(--text); border-color: var(--accent); }

/* Services page - category head */
.cat__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.cat__num { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.cat__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

/* Services page - detail cards */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.detail {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.detail:hover { border-color: var(--accent); transform: translateY(-4px); }
.detail h3 { font-size: 1.18rem; margin-bottom: 10px; }
.detail__icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,166,35,.15), rgba(255,194,75,.07));
  border: 1px solid var(--border); color: var(--accent); margin-bottom: 16px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.detail__icon svg { width: 24px; height: 24px; }
.detail:hover .detail__icon { border-color: var(--accent); transform: translateY(-2px); }
.detail p { color: var(--muted); font-size: .95rem; }

/* Home - clickable service cards + more link */
a.svc { text-decoration: none; color: inherit; display: block; }
.svc__more { display: inline-block; margin-top: 18px; color: var(--accent); font-weight: 600; font-size: .92rem; }

/* Center CTA */
.center-cta { display: flex; justify-content: center; gap: 14px; margin-top: 44px; }

/* Home - about teaser */
.about-teaser { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.about-teaser h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.about-teaser .btn { margin-top: 22px; }
.cube-mini { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cube-mini li {
  display: flex; align-items: baseline; gap: 1px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; font-family: "Space Grotesk"; font-weight: 600; font-size: 1.05rem;
}
.cube-mini .mini-initial {
  font-family: "Space Grotesk"; font-weight: 700; font-size: 1.7rem; line-height: .8; letter-spacing: -0.03em;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* About - mission block */
.mission { text-align: center; max-width: 760px; margin: 0 auto; }
.mission__quote { font-family: "Space Grotesk"; font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; margin: 18px 0 24px; }
.mission__tag { color: var(--muted); font-style: italic; margin-bottom: 28px; }
.mission h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }

/* Contact page - larger info list */
.contact__list--lg li { gap: 6px; }
.contact__list--lg a, .contact__list--lg span:not(.contact__label) { font-size: 1.15rem; }

/* Proposal page */
.proposal-wrap { display: grid; grid-template-columns: 1.5fr .75fr; gap: 40px; align-items: start; }
.form--wide { padding: 34px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field select {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 14px; color: var(--text); font-family: inherit; font-size: .98rem;
}
.field select:focus { outline: none; border-color: var(--accent); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.checks label { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--text); font-size: .95rem; margin: 0; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: var(--accent); }
.proposal-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.proposal-side__tag { color: var(--muted); font-style: italic; font-size: .9rem; margin-top: 22px; }

/* Footer nav */
.footer__inner { flex-wrap: wrap; }
.footer__nav { display: flex; gap: 22px; }
.footer__nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer__nav a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .about-teaser { grid-template-columns: 1fr; }
  .proposal-wrap { grid-template-columns: 1fr; }
  .nav__links a.active:not(.btn)::after { display: none; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .cube-mini { grid-template-columns: 1fr; }
  .center-cta { flex-direction: column; }
  .footer__nav { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scene { animation: none; }
  .spark { animation: none; opacity: 0; }
  * { scroll-behavior: auto; }
}

/* ---------- AI-pivot additions ---------- */
.hero__kicker {
  font-family: "Space Grotesk"; font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: -0.01em; margin: -8px 0 18px;
}
.cat__lead { color: var(--muted); font-size: 1.02rem; max-width: 46em; margin: -14px 0 28px; }

/* ---------- Day theme: card depth + dark logos band ---------- */
.card, .svc, .detail, .form, .proposal-side, .cube-mini li { box-shadow: var(--shadow); }

/* Keep the "Trusted by" logos on a dark band (the client logos are white) */
#clients { background: var(--navy); }
#clients .section__head h2 { color: #fff; }
.logo-img { opacity: .82; }
.logo-img:hover { opacity: 1; }

/* ---------- Hero: automation-hub animation (cube = the hub) ---------- */
.hero__auto { position: relative; display: grid; place-items: center; }
.hero__auto svg { width: 100%; max-width: 480px; height: auto; }
.flow-dot circle { filter: drop-shadow(0 0 6px rgba(245,166,35,.7)); }
.hub-glow { transform-box: fill-box; transform-origin: center; animation: hubPulse 3.4s ease-in-out infinite; }
@keyframes hubPulse { 0%,100% { opacity:.18; transform:scale(.94); } 50% { opacity:.4; transform:scale(1.08); } }
@media (max-width: 900px) {
  .hero__auto { order: -1; }
  .hero__auto svg { max-width: 330px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-dot, .flow-check { display: none; }
  .hub-glow { animation: none; }
}

/* ---------- Full-width hero with connected three-pillar network ---------- */
.hero--full { padding-bottom: clamp(24px, 4vw, 48px); }
.hero__copy--center { max-width: 800px; margin: 0 auto; text-align: center; }
.hero__copy--center .hero__lead { margin-left: auto; margin-right: auto; }
.hero__copy--center .hero__cta { justify-content: center; }
.hero__network { width: 100%; max-width: 1600px; margin: 30px auto 0; display: flex; justify-content: center; overflow: hidden; }
.hero__network svg { width: 100%; min-width: 900px; height: auto; }
@media (max-width: 700px) { .hero__network svg { min-width: 720px; } }
