/* ==========================================================
   Corbin Code Works - shared stylesheet
   1. Tokens  2. Base  3. Layout  4. Header/Footer
   5. Hero  6. Cards  7. Buttons  8. Prose  9. Responsive
   ========================================================== */

/* 1. Design tokens ---------------------------------------- */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #14161a;
  --muted: #5c6370;
  --border: #e5e7eb;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(20,22,26,.06);
  --shadow-hover: 0 4px 8px rgba(0,0,0,.06), 0 18px 40px rgba(79,70,229,.18);
  --radius: 16px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #0d0f14;
  --surface: #161922;
  --text: #eceef3;
  --muted: #9aa1b1;
  --border: #262a36;
  --accent: #818cf8;
  --accent-2: #22d3ee;
  --accent-contrast: #0d0f14;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-hover: 0 4px 8px rgba(0,0,0,.4), 0 18px 40px rgba(129,140,248,.22);
}

/* 2. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); line-height: 1.65;
  background: var(--bg); color: var(--text);
  transition: background .3s, color .3s;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* 3. Layout ------------------------------------------------ */
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: 5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.section-head p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); }

/* 4. Header / footer -------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.logo img { display: block; width: auto; height: 52px; max-width: min(220px, 42vw); object-fit: contain; }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 1.1rem; transition: transform .2s, border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.menu-toggle { display: none; }

.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .9rem; }

/* 5. Hero -------------------------------------------------- */
.hero { padding: 7rem 0 5rem; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 520px; height: 520px; z-index: -1;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: .18; filter: blur(40px);
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.page-title { padding: 5rem 0 1rem; }

/* 6. Cards ------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.card-img {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  font-size: 3rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--c1, #4f46e5), var(--c2, #06b6d4));
  transition: transform .5s ease;
}
.card-img.has-logo { padding: 1rem; }
.card-img.has-logo img { width: 100%; height: 100%; object-fit: contain; }
.card-img.indiana-ready-image img { width: 85%; height: 85%; }
.card-media { overflow: hidden; }
.card:hover .card-img { transform: scale(1.06); }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.card-body h3 { font-size: 1.2rem; margin: 0; }
.coming-soon {
  flex: 0 0 auto; padding: .2rem .35rem; border: 1px solid var(--border);
  border-radius: 999px; color: #3ddc84; font-size: .62rem; font-weight: 600;
  line-height: 1.25; text-align: center; white-space: nowrap;
}
.card-body p { flex: 1; font-size: .95rem; }
.tag { font-size: .75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.about-card { padding: 2.5rem; }

/* 7. Buttons ----------------------------------------------- */
.btn {
  display: inline-block; padding: .7rem 1.4rem; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast);
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-contrast); }
.btn-sm { align-self: flex-start; padding: .5rem 1rem; font-size: .875rem; }

/* 8. Prose (about, privacy, project detail) --------------- */
.prose { max-width: 720px; padding: 4rem 0 2rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { margin-top: 2.5rem; font-size: 1.4rem; }
.prose ul { color: var(--muted); padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .95rem; }
.meta { font-size: .9rem; }

.screenshot-feature { margin: 2rem 0 3rem; }
.screenshot-feature img {
  display: block; width: 100%; height: auto; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.screenshot-gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start; gap: 1.5rem; padding-bottom: 4rem;
}
.screenshot-card {
  margin: 0; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.screenshot-card img { display: block; width: 100%; height: auto; }
.screenshot-card figcaption { padding: 1.1rem 1.2rem; }
.screenshot-card h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.screenshot-card p { margin: 0; font-size: .92rem; }

.contact-panel {
  margin-top: 2.5rem; padding: 1.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.contact-panel h2 { margin-top: 0; }
.contact-form { display: grid; gap: 1.1rem; }
.form-field { display: grid; gap: .4rem; }
.form-field label { font-weight: 600; font-size: .95rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text);
  font: inherit; line-height: 1.5;
}
.form-field textarea { resize: vertical; }
.form-field input:focus-visible, .form-field textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.contact-form .btn { justify-self: start; }

/* Scroll-in animation */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* 9. Responsive -------------------------------------------- */
@media (max-width: 760px) {
  .screenshot-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .menu-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: .5rem 1.25rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height .3s ease, opacity .3s ease, visibility .3s;
  }
  @media (max-width: 520px) {
    .screenshot-gallery { grid-template-columns: 1fr; }
  }
  .nav-links.open { max-height: 400px; opacity: 1; visibility: visible; }
  .nav-links a { display: block; padding: .8rem 0; }
  .hero { padding: 4.5rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fade-in { opacity: 1; transform: none; }
}
