/*
Theme Name: CI 360
Theme URI: https://ci360.example
Author: CI 360 Studio
Author URI: https://ci360.example
Description: A dark, instrument-panel styled WordPress theme for CI 360°, a full-circle technology consultancy. Built around an animated dial motif, with custom sections for Founders, Services, Stories and Blogs.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: ci360
Tags: dark, agency, technology, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================================================
   0. DESIGN TOKENS
========================================================= */
:root{
  --c-black: #05070A;
  --c-panel: #0D1117;
  --c-panel-2: #10151C;
  --c-line: rgba(233,237,241,0.09);
  --c-line-strong: rgba(233,237,241,0.16);
  --c-cyan: #35E1E0;
  --c-cyan-dim: #1B8B8A;
  --c-text: #E9EDF1;
  --c-muted: #8B98A5;
  --c-muted-2: #5C6672;

  --f-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-s: 4px;
  --radius-m: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light){
  :root{ /* theme is intentionally dark-only, brand mark is black */ }
}

/* =========================================================
   1. RESET
========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body{
  margin: 0;
  background: var(--c-black);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; cursor: pointer; }
input, textarea{ font-family: inherit; }

h1,h2,h3,h4{
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
p{ margin: 0 0 1em; color: var(--c-muted); max-width: var(--measure); }
p:last-child{ margin-bottom: 0; }

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

.container{
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow-deg{
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--c-cyan);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 18px;
}
.eyebrow-deg::before{
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-cyan);
  display: inline-block;
  transform: translateY(-2px);
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-size: 15px;
  border: 1px solid var(--c-line-strong);
  background: transparent;
  color: var(--c-text);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
  white-space: nowrap;
}
.btn:hover{ border-color: var(--c-cyan); color: var(--c-cyan); }
.btn-solid{
  background: var(--c-cyan);
  color: #04191A;
  border-color: var(--c-cyan);
}
.btn-solid:hover{
  background: #58ecea;
  color: #04191A;
  border-color: #58ecea;
}

.section{ padding: clamp(64px, 10vw, 128px) 0; border-top: 1px solid var(--c-line); }
.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head h2{ font-size: clamp(28px, 4vw, 44px); max-width: 14ch; }
.section-head .section-note{ max-width: 34ch; margin: 0; }

/* reveal-on-scroll: single subtle rise, not per-card cascades */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* =========================================================
   2. HEADER / NAV
========================================================= */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(5,7,10,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.site-branding{ display: flex; align-items: center; gap: 12px; }
.site-branding a{ display: flex; align-items: center; gap: 12px; }
.brand-dial{ width: 40px; height: 40px; flex-shrink: 0; }
.brand-dial circle.track{ fill: none; stroke: rgba(233,237,241,0.15); stroke-width: 3; }
.brand-dial circle.arc{
  fill: none; stroke: var(--c-cyan); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: dial-draw 1.6s var(--ease-out) .3s forwards;
}
.brand-dial line{ stroke: var(--c-cyan); stroke-width: 3; stroke-linecap: round; transform-origin: 20px 20px; }
@keyframes dial-draw{ to{ stroke-dashoffset: 24; } }
.brand-name{ font-family: var(--f-display); font-size: 15px; line-height: 1.1; }
.brand-name small{ display: block; font-size: 11px; color: var(--c-muted); letter-spacing: .04em; }

.main-nav{ display: flex; }
.main-nav ul{ display: flex; gap: 34px; }
.main-nav a{
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--c-text);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after{
  content: '';
  position: absolute; left: 0; bottom: -2px;
  height: 1px; width: 0;
  background: var(--c-cyan);
  transition: width .35s var(--ease-out);
}
.main-nav a:hover::after, .main-nav a.current::after{ width: 100%; }

.header-actions{ display: flex; align-items: center; gap: 18px; }
.menu-toggle{
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; color: var(--c-text);
}
.menu-toggle .toggle-label{
  font-family: var(--f-display); font-size: 13px; color: var(--c-muted);
}
.toggle-glyph{ position: relative; width: 22px; height: 16px; }
.toggle-glyph span{
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--c-text);
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out), top .35s var(--ease-out);
}
.toggle-glyph span:nth-child(1){ top: 0; }
.toggle-glyph span:nth-child(2){ top: 7px; }
.toggle-glyph span:nth-child(3){ top: 14px; }

.nav-open .toggle-glyph span:nth-child(1){ top: 7px; transform: rotate(45deg); }
.nav-open .toggle-glyph span:nth-child(2){ opacity: 0; }
.nav-open .toggle-glyph span:nth-child(3){ top: 7px; transform: rotate(-45deg); }
.nav-open .toggle-label::after{ content: 'Close'; }
.nav-open .toggle-label{ font-size: 0; }
.nav-open .toggle-label::after{ font-size: 13px; }

/* Fullscreen overlay menu */
.nav-overlay{
  position: fixed; inset: 0; z-index: 600;
  background: var(--c-black);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease-out), visibility 0s linear .5s;
}
.nav-open .nav-overlay{ opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-overlay-inner{ max-width: 1240px; margin: 0 auto; width: 100%; }
.nav-overlay .overlay-menu li{
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}
.nav-overlay .overlay-menu a{
  display: block;
  font-family: var(--f-display);
  font-size: clamp(32px, 7vw, 76px);
  padding: 14px 0;
  color: var(--c-text);
  transform: translateY(110%);
  transition: transform .6s var(--ease-out), color .3s;
}
.nav-open .overlay-menu a{ transform: translateY(0); }
.nav-overlay .overlay-menu a:hover{ color: var(--c-cyan); }
.overlay-menu li:nth-child(1) a{ transition-delay: .05s; }
.overlay-menu li:nth-child(2) a{ transition-delay: .1s; }
.overlay-menu li:nth-child(3) a{ transition-delay: .15s; }
.overlay-menu li:nth-child(4) a{ transition-delay: .2s; }
.overlay-menu li:nth-child(5) a{ transition-delay: .25s; }
.overlay-menu li:nth-child(6) a{ transition-delay: .3s; }
.overlay-menu li:nth-child(7) a{ transition-delay: .35s; }
.nav-overlay-foot{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-line);
  color: var(--c-muted); font-size: 14px;
}
.nav-overlay-foot a:hover{ color: var(--c-cyan); }

/* =========================================================
   3. HERO
========================================================= */
.hero{
  position: relative;
  padding: clamp(140px, 20vw, 200px) 0 clamp(70px, 8vw, 110px);
  overflow: hidden;
}
.hero::before{
  content: '';
  position: absolute; inset: -20% -10%;
  background: linear-gradient(115deg, transparent 40%, rgba(53,225,224,0.06) 50%, transparent 60%);
  animation: scan-sweep 9s linear infinite;
  pointer-events: none;
}
@keyframes scan-sweep{
  0%{ transform: translateX(-30%); }
  100%{ transform: translateX(30%); }
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1{ font-size: clamp(40px, 6vw, 76px); max-width: 13ch; }
.hero-copy p{ font-size: 18px; margin-top: 22px; max-width: 46ch; }
.hero-actions{ display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats{
  display: flex; gap: clamp(24px, 4vw, 56px);
  margin-top: 64px; flex-wrap: wrap;
}
.stat b{
  display: block;
  font-family: var(--f-display);
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--c-cyan);
}
.stat span{ font-size: 13px; color: var(--c-muted); }

.hero-dial{ position: relative; display: flex; justify-content: center; }
.hero-dial svg{ width: 100%; max-width: 420px; height: auto; }
.hero-dial .dial-track{ fill: none; stroke: rgba(233,237,241,0.08); stroke-width: 1; }
.hero-dial .dial-ring{
  fill: none; stroke: var(--c-line-strong); stroke-width: 1;
  animation: dial-rotate 60s linear infinite;
  transform-origin: center;
}
@keyframes dial-rotate{ to{ transform: rotate(360deg); } }
.hero-dial .dial-arc{
  fill: none; stroke: var(--c-cyan); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 720; stroke-dashoffset: 720;
  transition: stroke-dashoffset 1.8s var(--ease-out);
}
.hero-dial.in-view .dial-arc{ stroke-dashoffset: var(--dial-offset, 180); }
.hero-dial .dial-needle{
  transform-origin: center;
  transform: rotate(0deg);
  transition: transform 1.8s var(--ease-out);
}
.hero-dial.in-view .dial-needle{ transform: rotate(var(--needle-deg, 220deg)); }
.hero-dial .dial-center{ font-family: var(--f-display); }
.hero-dial .dial-center .num{ font-size: 46px; fill: var(--c-text); }
.hero-dial .dial-center .label{ font-size: 11px; fill: var(--c-muted); letter-spacing: .05em; }
.dial-tick{ stroke: var(--c-muted-2); stroke-width: 1; }

/* =========================================================
   4. SERVICES RING
========================================================= */
.services-ring-wrap{ position: relative; }
.services-orbit{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
.orbit-node{
  background: var(--c-black);
  padding: 34px 30px;
  position: relative;
  transition: background .35s var(--ease-out);
}
.orbit-node:hover{ background: var(--c-panel); }
.orbit-node .deg{
  font-family: var(--f-display); font-size: 12px; color: var(--c-cyan);
  display: block; margin-bottom: 22px;
}
.orbit-node h3{ font-size: 21px; margin-bottom: 10px; }
.orbit-node p{ font-size: 14.5px; }

/* =========================================================
   5. FOUNDERS STRIP
========================================================= */
.founders-strip{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter);
}
.founder-card{ border-top: 1px solid var(--c-line-strong); padding-top: 26px; }
.founder-photo{
  width: 100%; aspect-ratio: 4/5; border-radius: var(--radius-m);
  overflow: hidden; background: var(--c-panel); margin-bottom: 22px;
  filter: grayscale(1) contrast(1.05);
  transition: filter .4s var(--ease-out);
}
.founder-card:hover .founder-photo{ filter: grayscale(0); }
.founder-photo img{ width: 100%; height: 100%; object-fit: cover; }
.founder-name{ font-size: 24px; margin-bottom: 4px; }
.founder-role{ color: var(--c-cyan); font-family: var(--f-display); font-size: 14px; margin-bottom: 14px; display:block; }
.founder-links{ display: flex; gap: 14px; margin-top: 16px; }
.founder-links a{ font-size: 13px; color: var(--c-muted); border-bottom: 1px solid var(--c-line-strong); }
.founder-links a:hover{ color: var(--c-cyan); border-color: var(--c-cyan); }

/* =========================================================
   6. STORIES (case studies)
========================================================= */
.story-slab{
  border-top: 1px solid var(--c-line);
  padding: 48px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.5fr 0.7fr;
  gap: 32px;
  align-items: center;
}
.story-slab:last-child{ border-bottom: 1px solid var(--c-line); }
.story-client{ font-family: var(--f-display); font-size: 20px; }
.story-client small{ display: block; color: var(--c-muted); font-size: 13px; margin-top: 4px; font-family: var(--f-body); }
.story-quote{ font-size: 19px; color: var(--c-text); font-family: var(--f-display); font-weight: 400; line-height: 1.4; max-width: 46ch; }
.story-result{ text-align: right; }
.story-result b{ font-family: var(--f-display); font-size: 36px; color: var(--c-cyan); display: block; }
.story-result span{ font-size: 13px; color: var(--c-muted); }

/* =========================================================
   7. BLOG
========================================================= */
.post-list-row{
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--c-line);
  transition: padding-left .3s var(--ease-out);
}
.post-list-row:hover{ padding-left: 10px; }
.post-list-row:last-child{ border-bottom: 1px solid var(--c-line); }
.post-date{ font-family: var(--f-display); font-size: 13px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.post-list-row h3{ font-size: 22px; transition: color .25s; }
.post-list-row:hover h3{ color: var(--c-cyan); }
.post-cat{ font-size: 12px; color: var(--c-cyan); font-family: var(--f-display); white-space: nowrap; }

.single-post-body{ max-width: 720px; }
.single-post-body h1{ font-size: clamp(32px, 5vw, 50px); margin-bottom: 20px; max-width: none; }
.single-post-body p, .single-post-body li{ font-size: 17px; color: var(--c-text); max-width: none; }
.single-post-body img{ border-radius: var(--radius-m); margin: 28px 0; }
.post-meta-row{ display: flex; gap: 18px; color: var(--c-muted); font-size: 14px; margin-bottom: 40px; }

/* =========================================================
   8. CONTACT
========================================================= */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-form .field{ margin-bottom: 22px; }
.contact-form label{ display: block; font-size: 13px; color: var(--c-muted); margin-bottom: 8px; font-family: var(--f-display); }
.contact-form input, .contact-form textarea{
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--c-line-strong);
  color: var(--c-text);
  padding: 10px 0;
  font-size: 16px;
  transition: border-color .3s;
}
.contact-form input:focus, .contact-form textarea:focus{ border-color: var(--c-cyan); outline: none; }
.contact-info dt{ font-family: var(--f-display); font-size: 13px; color: var(--c-muted); margin-top: 26px; }
.contact-info dd{ margin: 6px 0 0; font-size: 19px; }
.contact-info dd a:hover{ color: var(--c-cyan); }

/* =========================================================
   9. FOOTER
========================================================= */
.site-footer{ border-top: 1px solid var(--c-line); padding: 64px 0 32px; }
.footer-top{ display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; margin-bottom: 56px; }
.footer-col h4{ font-size: 14px; color: var(--c-muted); margin-bottom: 16px; font-weight: 500; }
.footer-col ul li{ margin-bottom: 10px; }
.footer-col a:hover{ color: var(--c-cyan); }
.footer-bottom{
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--c-line);
  font-size: 13px; color: var(--c-muted-2); flex-wrap: wrap; gap: 12px;
}

/* =========================================================
   10. PAGE HEADER (inner pages)
========================================================= */
.page-hero{ padding: clamp(140px,18vw,180px) 0 60px; border-bottom: 1px solid var(--c-line); }
.page-hero h1{ font-size: clamp(36px,5.5vw,64px); max-width: 16ch; }
.page-hero p{ margin-top: 18px; font-size: 18px; max-width: 50ch; }

/* =========================================================
   11. RESPONSIVE
========================================================= */
@media (max-width: 980px){
  .main-nav{ display: none; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-dial{ order: -1; max-width: 260px; margin: 0 auto 20px; }
  .founders-strip{ grid-template-columns: 1fr; }
  .story-slab{ grid-template-columns: 1fr; text-align: left; gap: 14px; }
  .story-result{ text-align: left; }
  .contact-grid{ grid-template-columns: 1fr; gap: 40px; }
  .footer-top{ grid-template-columns: 1fr 1fr; }
  .post-list-row{ grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px){
  .footer-top{ grid-template-columns: 1fr; }
  .header-actions .toggle-label{ display: none; }
}
