/*! 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
   ========================================================================== */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #f4f7fb 0%, #eef2ff 100%);
  color: #1f2937;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero {
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f46e5;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
}

.intro {
  max-width: 760px;
  margin: 0;
  font-size: 1.1rem;
  color: #475569;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.card {
  padding: 24px;
  border: 1px solid #dbe4ff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.08);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card-highlight {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
}

.comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.demo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
}

.demo-box-static {
  background: #e2e8f0;
  color: #334155;
}

.demo-box-dynamic {
  margin-bottom: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.demo-box-dynamic.is-updated {
  background: #dcfce7;
  color: #166534;
  transform: translateY(-2px);
}

.button,
.select-field,
.text-field {
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.95;
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.button-secondary {
  background: #0f172a;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.select-field,
.text-field {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
}

.select-field:focus,
.text-field:focus {
  outline: 2px solid #c7d2fe;
  border-color: #818cf8;
}

.message-box,
.loading-box,
.reaction-panel,
.result-box {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.reaction-panel {
  font-weight: 700;
  transition: color 0.2s ease;
}

.card.is-motivation {
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border-color: #fcd34d;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.18);
  transform: translateY(-2px);
}

.card.is-motivation .reaction-panel {
  color: #92400e;
}

.card.is-focus {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-color: #93c5fd;
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.18);
  transform: translateY(-2px);
}

.card.is-focus .reaction-panel {
  color: #1d4ed8;
}

.card.is-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  border-color: #86efac;
  box-shadow: 0 18px 45px rgba(34, 197, 94, 0.18);
  transform: translateY(-2px);
}

.card.is-success .reaction-panel {
  color: #166534;
}

.loading-box.is-loading {
  background: #ede9fe;
  color: #5b21b6;
}

.message-box.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.message-box.is-success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.result-box {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
  font-weight: 700;
}

form,
.calculator {
  display: grid;
}

@media only screen and (max-width: 40em) {
  .page {
    padding: 32px 16px 48px;
  }

  .card {
    padding: 20px;
  }
}

/* ==========================================================================
   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;
}

/* ==========================================================================
   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;
  }
}

