/* ==========================================================================
   1. Variables & Global Reset
   ========================================================================== */

/* Palette A -- Modern Blue
:root {
  --bg: #0a0a0a;
  --text: #ededed;
  --accent: #3b82f6;
  --muted: #888888;
  --border: #262626;
}
*/

/* Palette B -- Anthracite Technology Ltd */
:root {
  --bg: #2f2f2f;
  --text: #ededed;
  --accent: #e65100;
  --muted: #888888;
  --border: #262626;
}

body {
  background:
    linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.8)),
    url("../images/background.jpg") center/cover no-repeat fixed;
  color: var(--text);
  font-family: "Inter", sans-serif;
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll; /* Mobile background fix */
  }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

a:hover {
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   2. Navigation & Header
   ========================================================================== */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 120px;
}

.logo {
  font-weight: 600;
  letter-spacing: -1px;
  font-size: 1.2rem;
}

.availability {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 8px;
}

/* ==========================================================================
   3. Hero & Typography
   ========================================================================== */

h1 {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
  color: var(--muted);
}

h1 strong {
  color: var(--text);
  font-weight: 400;
}

h2,
.lifecycle-container h2 {
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

h3 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: var(--accent);
}

h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 24px;
}

h5 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ==========================================================================
   4. Accent Blocks (Philosophy & History)
   ========================================================================== */

.accent-block {
  margin: 80px 0;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 800px;
}

.accent-block strong {
  color: var(--text);
  font-weight: 400;
}

.accent-left {
  border-left: 3px solid var(--accent);
  padding-left: 24px;
}

.accent-right {
  margin: 120px 0 120px auto;
  border-right: 3px solid var(--accent);
  padding-right: 24px;
  text-align: right;
}

/* ==========================================================================
   5. Service Grid & Cards
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 80px;
  align-items: start;
}

.card {
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  height: 150px;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.card.is-expanded {
  height: auto;
  min-height: 150px;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.card.is-expanded .card-header {
  margin-bottom: 20px;
}

.card-header p {
  grid-column: 1 / span 2;
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.expand-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
}

.expand-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card.is-expanded .expand-btn {
  transform: rotate(180deg);
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.card-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card-details > div {
  min-height: 0;
  overflow: hidden;
}

.card.is-expanded .card-details {
  grid-template-rows: 1fr;
}

.card-details p {
  margin: 0 0 20px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-details ul {
  list-style: none;
  padding: 0;
}

.card-details li {
  padding-bottom: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 15px;
  margin-left: 5px;
}

.card-details span {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ==========================================================================
   6. Tech Stack & Infrastructure
   ========================================================================== */

.tech-stack {
  margin-top: 100px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.stack-list li {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.stack-list li:hover {
  border-color: var(--accent);
  color: var(--accent);
  cursor: default;
}

.infra-philosophy {
  max-width: 600px;
  margin-bottom: 40px;
}

.infra-philosophy p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   7. Process & Lifecycle
   ========================================================================== */

.process {
  margin-top: 120px;
}

.lifecycle-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 80px;
  margin-top: 120px;
  align-items: start;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  margin-top: 40px;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: var(--border);
  z-index: -1;
}

.step {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.step-number {
  font-family: "JetBrains Mono", monospace;
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
}

.step-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.step-content p {
  margin: 0;
  color: var(--muted);
  max-width: 600px;
}

@media (max-width: 768px) {
  .lifecycle-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ==========================================================================
   8. Form Styling
   ========================================================================== */

.contact-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.3s;
}

.submit-btn:hover {
  opacity: 0.9;
}

.success-message {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.5s ease-in;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-size: 1.5rem;
  margin-bottom: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hp-wrapper {
  position: absolute;
  left: -5000px;
  top: -5000px;
  opacity: 0;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  border-bottom: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* ==========================================================================
   10. Animations & Utilities
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
