/* =============================================
   Iron Code Studios — Global Stylesheet
   Metallic dark theme: charcoal, silver, iron red
   ============================================= */

/* --- Variables --- */
:root {
  --bg:          #0b0c0f;
  --surface:     #13151b;
  --surface-2:   #1b1e27;
  --border:      #2a2e3c;
  --border-hi:   #3e4458;
  --text:        #c8cdd8;
  --muted:       #6e7590;
  --accent:      #c42020;
  --accent-hi:   #e03030;
  --accent-glow: rgba(196,32,32,0.25);
  /* Metallic gradient — used on headings */
  --metal:       linear-gradient(180deg, #e8ecf4 0%, #a8b0c4 55%, #6a7088 100%);
  --metal-flat:  #b0b8cc;
  --radius:      6px;
  --radius-lg:   12px;
  --max-w:       1100px;
  --nav-h:       64px;
  --transition:  0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hi); }

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Metallic gradient text */
.metal-heading {
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--text); }
.muted { color: var(--muted); }

/* --- Layout Helpers --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11,12,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.4rem 0.9rem;
}

.nav-links .nav-cta:hover {
  background: var(--accent-glow);
  color: #ff6060;
  border-color: var(--accent-hi);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle grid/metallic background texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(196,32,32,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(196,32,32,0.08), transparent);
  pointer-events: none;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px var(--accent-glow);
}

.hero-title {
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 2.5rem;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 16px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hi);
  color: #fff;
  box-shadow: 0 4px 24px rgba(196,32,32,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--metal-flat);
  border: 1px solid var(--border-hi);
}

.btn-outline:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--metal-flat);
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Metallic bevel: lighter top, dark bottom */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 2px 12px rgba(0,0,0,0.3);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-hi);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 4px 24px rgba(0,0,0,0.4),
    0 0 0 1px rgba(196,32,32,0.15);
  transform: translateY(-2px);
}

.card-pad { padding: 1.75rem; }

/* --- Section headings --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

.section-rule {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* --- Grids --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

/* --- Services / Feature cards --- */
.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.service-title {
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

/* --- Values strip --- */
.values-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.values-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: center;
  padding: 2rem 0;
  list-style: none;
}

.values-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.values-list li::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* --- Project cards --- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card .card-pad { flex: 1; }

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-live {
  background: rgba(34,170,90,0.12);
  color: #44cc80;
  border: 1px solid rgba(34,170,90,0.25);
}

.status-wip {
  background: rgba(200,160,40,0.12);
  color: #c8a828;
  border: 1px solid rgba(200,160,40,0.25);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.25rem;
}

.project-link:hover { color: var(--accent-hi); }

/* --- Contact form --- */
.form-grid {
  display: grid;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.65rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 0 0 3px var(--accent-glow);
}

textarea { min-height: 140px; resize: vertical; }

/* Formspree message boxes */
#fs-success-msg {
  display: none;
  background: rgba(34,170,90,0.1);
  border: 1px solid rgba(34,170,90,0.3);
  color: #44cc80;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

#fs-error-msg {
  display: none;
  background: rgba(196,32,32,0.1);
  border: 1px solid rgba(196,32,32,0.3);
  color: #ff6060;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.fs-field-error {
  font-size: 0.8rem;
  color: #ff6060;
  display: block;
  margin-bottom: 0.25rem;
}

/* --- Page hero (inner pages) --- */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(196,32,32,0.04) 0%, transparent 100%);
}

.page-hero h1 {
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.page-hero p { color: var(--muted); max-width: 520px; }

/* --- Prose (policy pages) --- */
.prose { max-width: 720px; }
.prose h2 { margin: 2.5rem 0 0.75rem; font-size: 1.25rem; color: var(--metal-flat); }
.prose h3 { margin: 1.75rem 0 0.5rem; font-size: 1.05rem; color: var(--metal-flat); }
.prose p  { color: var(--muted); margin-bottom: 1rem; }
.prose ul { color: var(--muted); padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a  { color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.footer-logo img { height: 28px; border-radius: 4px; }

.footer-logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* --- About page specifics --- */
.about-lead {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.75;
  max-width: 640px;
}

.value-card .value-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.value-card h3 {
  color: var(--metal-flat);
  margin-bottom: 0.4rem;
}

.value-card p { color: var(--muted); font-size: 0.925rem; }

/* --- Accent rule --- */
.accent-rule {
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; flex-direction: column; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.15rem;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; font-size: 1rem; }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
}
