/*
Theme Name: TWI Web
Theme URI: https://turingworlds.com
Author: Turing Worlds Interactive, Inc.
Description: WordPress/WooCommerce theme converted from the static Turing Worlds Interactive website. Built for TWI, TIP licensing, news, projects, worlds, and company pages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: twiweb
Tags: custom-logo, custom-menu, featured-images, blog, e-commerce, wide-blocks, responsive-layout
*/

:root {
  --deep-navy: #040f24;
  --deep-navy-2: #071a36;
  --panel-navy: #0f1f3d;
  --panel-navy-soft: #102847;
  --cyan: #00c4ff;
  --cyan-soft: rgba(0, 196, 255, 0.18);
  --steel: #c0c6cf;
  --soft-white: #e8edf2;
  --muted: #9aa3ad;
  --graphite: #2a2f36;
  --black: #111315;
  --max-width: 1180px;
  --nav-height: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--soft-white);
  background:
    radial-gradient(circle at 72% 14%, rgba(0, 196, 255, 0.14), transparent 25%),
    radial-gradient(circle at 20% 45%, rgba(120, 170, 255, 0.08), transparent 24%),
    linear-gradient(180deg, var(--deep-navy), #020816 70%, #01050d);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.55) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(0,196,255,0.32) 0 1px, transparent 1px);
  background-size: 90px 90px, 140px 140px;
  background-position: 0 0, 42px 58px;
  z-index: -1;
}

a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus { color: #7be4ff; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(4, 15, 36, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(192, 198, 207, 0.14);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--soft-white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

.brand img { width: 132px; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links a.active,
.nav-links a:hover { color: var(--cyan); }

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(192,198,207,0.28);
  color: var(--soft-white);
  border-radius: 8px;
  padding: 8px 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 70px 24px 90px;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 56px;
  align-items: center;
}

.kicker {
  color: var(--cyan);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.78rem;
  margin: 0 0 18px;
}

h1, h2, h3 {
  color: var(--steel);
  line-height: 1.08;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.7rem, 7vw, 6.8rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.8rem); }

.lede {
  color: var(--soft-white);
  font-size: clamp(1.05rem, 1.7vw, 1.38rem);
  max-width: 760px;
  margin-bottom: 30px;
}

.hero-card {
  border: 1px solid rgba(192, 198, 207, 0.18);
  background: linear-gradient(145deg, rgba(15,31,61,0.74), rgba(4,15,36,0.6));
  box-shadow: 0 0 70px rgba(0,196,255,0.11);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 35%;
  height: 180px;
  background: radial-gradient(circle, rgba(0,196,255,0.22), transparent 70%);
}

.hero-card img { position: relative; z-index: 1; filter: drop-shadow(0 0 28px rgba(0,196,255,0.16)); }

.actions { display: flex; gap: 14px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,196,255,0.55);
  background: rgba(0,196,255,0.12);
  color: var(--soft-white);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.button.secondary { border-color: rgba(192,198,207,0.28); background: rgba(192,198,207,0.06); color: var(--steel); }
.button:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(0,196,255,0.18); color: #fff; }

.section {
  padding: 96px 24px;
  border-top: 1px solid rgba(192,198,207,0.12);
}

.section.alt { background: rgba(4, 15, 36, 0.38); }

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.section-title::before {
  content: "";
  width: 3px;
  height: 42px;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(0,196,255,0.4);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.panel, .news-card {
  background: linear-gradient(145deg, rgba(15,31,61,0.76), rgba(6,18,40,0.56));
  border: 1px solid rgba(192,198,207,0.16);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.panel p, .news-card p, .content p, .content li { color: var(--soft-white); }

.meta {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.feature-image {
  border-radius: 22px;
  border: 1px solid rgba(192,198,207,0.16);
  background: rgba(4,15,36,0.42);
  padding: 24px;
}

.content { max-width: 860px; }
.content.wide { max-width: none; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.principles span {
  padding: 14px 16px;
  border: 1px solid rgba(0,196,255,0.22);
  background: rgba(0,196,255,0.06);
  border-radius: 14px;
  color: var(--steel);
  font-weight: 700;
}

.page-hero {
  padding: 110px 24px 80px;
  border-bottom: 1px solid rgba(192,198,207,0.12);
}

.page-hero h1 { font-size: clamp(2.3rem, 6vw, 5.2rem); }

.project-logo { max-width: 520px; margin: 0 auto 28px; display: block; }

.news-list { display: grid; gap: 24px; }

.contact-box {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(192,198,207,0.14);
  padding: 16px 0;
}

.site-footer {
  border-top: 1px solid rgba(192,198,207,0.14);
  background: rgba(1, 7, 18, 0.72);
  padding: 46px 24px;
  color: var(--footer-gray, #9aa3ad);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.footer-grid h3 { font-size: 0.92rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }
.footer-grid p, .footer-grid a { color: #9aa3ad; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--cyan); }

.footer-links { display: grid; gap: 8px; }

.small { font-size: 0.86rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid, .grid-2, .grid-3, .footer-grid, .principles { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(4,15,36,0.98);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(192,198,207,0.14);
  }
  .nav-links.open { display: grid; gap: 16px; }
  .mobile-toggle { display: inline-flex; }
  .brand img { width: 110px; }
}

/* WordPress integration */
.admin-bar .site-header { top: 32px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu a[aria-current="page"] { color: var(--cyan); }
.custom-logo { width: 132px; height: auto; display: block; }
.site-main { min-height: 60vh; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.45rem; }
.entry-content blockquote { margin: 28px 0; padding: 20px 24px; border-left: 4px solid var(--cyan); background: rgba(15,31,61,0.55); border-radius: 12px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0; overflow: hidden; border-radius: 14px; }
.entry-content th, .entry-content td { padding: 12px 14px; border: 1px solid rgba(192,198,207,0.18); }
.entry-content th { background: rgba(0,196,255,0.12); color: var(--soft-white); }
.wp-block-button__link, .button { cursor: pointer; }
.wp-block-button__link { background: var(--cyan); color: #03111f; border-radius: 999px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; padding: 12px 18px; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--cyan); border: 1px solid rgba(0,196,255,.55); }
.alignwide { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; }
.post-nav a { display: inline-block; padding: 12px 16px; border: 1px solid rgba(0,196,255,0.32); border-radius: 999px; background: rgba(15,31,61,0.55); }
.pagination { margin-top: 34px; display: flex; justify-content: center; gap: 10px; }
.pagination .page-numbers { padding: 8px 12px; border: 1px solid rgba(192,198,207,0.18); border-radius: 10px; background: rgba(15,31,61,0.45); }
.pagination .current { color: var(--soft-white); border-color: rgba(0,196,255,0.52); }
.woocommerce .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button { background: var(--cyan); color: #03111f; border-radius: 999px; font-weight: 800; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { background: rgba(15,31,61,0.76); border: 1px solid rgba(192,198,207,0.14); border-radius: 22px; padding: 20px; }
.woocommerce div.product .summary, .woocommerce div.product .woocommerce-tabs { color: var(--soft-white); }
.woocommerce table.shop_table { background: rgba(15,31,61,0.55); border-color: rgba(192,198,207,0.18); border-radius: 18px; overflow: hidden; }
.woocommerce input.input-text, .woocommerce textarea, .woocommerce select { background: rgba(4,15,36,0.75); color: var(--soft-white); border: 1px solid rgba(192,198,207,0.24); border-radius: 10px; padding: 10px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
