/* styles.css — Root base stylesheet
 *
 * Palette: "Stellar / Modern SaaS"
 *   Midnight Blue  #1D3557
 *   Steel Blue     #457B9D
 *   Pale Cyan      #A8DADC
 *   Off-White      #F1FAEE
 * ============================================================ */

/* ============================================================
   RESET
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================
   BASE
   ============================================================ */
html,
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  color: #1D3557;
  background-color: #F1FAEE;
}

body {
  padding: 20px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 10px;
  color: #1D3557;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem;   }
h3 { font-size: 1.25rem;  }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem;     }
h6 { font-size: 0.875rem; }

p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #457B9D;
}

a {
  color: #457B9D;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1D3557;
}

/* ============================================================
   LISTS
   ============================================================ */
ul, ol {
  margin: 15px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 5px;
  color: #457B9D;
}

dl { margin-bottom: 15px; }
dt { font-weight: 600; color: #1D3557; }
dd { margin-left: 20px; }

/* ============================================================
   FORMS
   ============================================================ */
input,
textarea,
select,
button {
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-family: inherit;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input,
textarea,
select {
  background-color: #ffffff;
  color: #1D3557;
  border: 1px solid #A8DADC;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #457B9D;
  box-shadow: 0 0 0 3px rgba(168, 218, 220, 0.35);
}

input::placeholder {
  color: #A8DADC;
}

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

button {
  background-color: #1D3557;
  color: #F1FAEE;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: #457B9D;
  box-shadow: 0 4px 12px rgba(69, 123, 157, 0.35);
}

button:active {
  transform: translateY(1px);
}

button[disabled] {
  background-color: #d4eaeb;
  color: #A8DADC;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

fieldset {
  border: 1px solid #d4eaeb;
  padding: 16px;
  border-radius: 10px;
}

legend {
  font-weight: 600;
  color: #1D3557;
  padding: 0 8px;
}

/* ============================================================
   TABLES
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  table-layout: auto;
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(29, 53, 87, 0.06), 0 4px 16px rgba(29, 53, 87, 0.04);
}

th, td {
  padding: 11px 14px;
  border: 1px solid #d4eaeb;
  text-align: left;
}

th {
  background-color: #F1FAEE;
  color: #1D3557;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #A8DADC;
}

td {
  color: #457B9D;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  background-color: #1D3557;
  color: #F1FAEE;
  border-bottom: 2px solid #A8DADC;
}

nav a {
  color: #F1FAEE;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  background-color: rgba(168, 218, 220, 0.15);
  color: #A8DADC;
}

/* ============================================================
   IMAGES
   ============================================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

figure {
  margin: 20px 0;
  text-align: center;
}

figcaption {
  font-size: 0.875rem;
  color: #A8DADC;
}

/* ============================================================
   CODE
   ============================================================ */
pre, code {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  background-color: #F1FAEE;
  color: #1D3557;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d4eaeb;
}

pre {
  overflow-x: auto;
  white-space: pre-wrap;
}

/* ============================================================
   BLOCKQUOTE
   ============================================================ */
blockquote {
  border-left: 4px solid #A8DADC;
  margin: 10px 0;
  padding: 12px 16px;
  font-style: italic;
  background-color: rgba(168, 218, 220, 0.1);
  color: #457B9D;
  border-radius: 0 8px 8px 0;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.flex              { display: flex; }
.flex-center       { justify-content: center; align-items: center; }
.flex-space-between{ justify-content: space-between; }
.flex-column       { flex-direction: column; }

.text-center { text-align: center; }
.text-right  { text-align: right;  }
.text-left   { text-align: left;   }

.hidden  { display: none !important; }
.visible { display: block; }

/* ============================================================
   GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.grid-item {
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid #d4eaeb;
  color: #1D3557;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(29, 53, 87, 0.05);
}

/* ============================================================
   BUTTONS (class-based)
   ============================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  background-color: #1D3557;
  color: #F1FAEE;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(69, 123, 157, 0.25);
}

.button:hover {
  background-color: #457B9D;
  box-shadow: 0 4px 12px rgba(69, 123, 157, 0.4);
  color: #F1FAEE;
}

.button:active {
  transform: translateY(1px);
}

.button--secondary {
  background-color: transparent;
  color: #1D3557;
  border: 1.5px solid #A8DADC;
  box-shadow: none;
}

.button--secondary:hover {
  background-color: rgba(168, 218, 220, 0.15);
  color: #1D3557;
}

.button--small {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  nav a {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.125rem; }
  h3 { font-size: 1rem; }

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