/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* --- Variables & Reset --- */
:root {
  --bg: #0f0f0f;
  --bg-dark: #080808;
  --bg-card: #161616;
  --bg-card-border: #252525;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #6ee7b7;
  --accent-dark: #34d399;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --max-width: 900px;
  --section-pad: 96px;
}

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

html {
  color: var(--text);
  font-size: 1em;
  line-height: 1.6;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-dark);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #0a0a0a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(110, 231, 183, 0.25);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-header {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--bg-card-border);
  font-size: 0.875rem;
}

.btn-header:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* --- Hero --- */
.hero {
  padding: 120px 0 96px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(110, 231, 183, 0.08);
  color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: #fff;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* --- Sections --- */
.section {
  padding: var(--section-pad) 0;
}

.section-dark {
  background: var(--bg-dark);
}

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: #fff;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 56px;
  line-height: 1.7;
}

/* --- Cards (Problem section) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(110, 231, 183, 0.3);
  transform: translateY(-2px);
}

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

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Services list --- */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--bg-card-border);
}

.service-item:first-child {
  border-top: 1px solid var(--bg-card-border);
}

.service-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  min-width: 28px;
  padding-top: 4px;
}

.service-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.service-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
}

/* --- Stack tags --- */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}

.stack-tag {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}

.stack-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- CTA section --- */
.cta-section {
  background: var(--bg);
}

.cta-box {
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.06) 0%, rgba(110, 231, 183, 0.02) 100%);
  border: 1px solid rgba(110, 231, 183, 0.2);
  border-radius: 20px;
  padding: 64px 56px;
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 20px;
}

.cta-box p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.cta-tagline {
  font-size: 1.2rem !important;
  font-weight: 600;
  color: var(--accent) !important;
  font-style: italic;
  margin-bottom: 36px !important;
}

/* --- Footer --- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--bg-card-border);
  text-align: center;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero {
    padding: 80px 0 64px;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .service-item {
    flex-direction: column;
    gap: 8px;
  }

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

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* --- Contact Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay:not([hidden]) {
  opacity: 1;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s ease;
}

.modal-overlay:not([hidden]) .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-box h2 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.modal-intro {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* --- Contact Form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.12);
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: #f87171;
}

.form-status {
  font-size: 0.875rem;
  min-height: 1.2em;
  text-align: center;
}

.form-status.success {
  color: var(--accent);
}

.form-status.error {
  color: #f87171;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
