/* Savings Calculator — vanilla static site */

/* ============================================================
   Structural styles only. All brand values (colors, fonts,
   logo, header/footer art, logo dimensions) are defined as
   CSS custom properties in a theme file — see theme-default.css
   and theme-delta.css. Switch brand by changing the active
   <link rel="stylesheet"> in index.html.
   ============================================================ */

@font-face {
  font-family: 'hoch';
  src: url('webfonts/hochstadt-rounded-webfont.woff2') format('woff2'),
       url('webfonts/hochstadt-rounded-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 18px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  background-color: var(--page-bg);
}

/* ---------- Header / Footer ---------- */

#main-header {
  position: relative;
  height: 128px;
  background: var(--header-bg) no-repeat center bottom;
  background-size: 100% auto;
}

#logo-container {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--logo-width, 192px);
  height: var(--logo-height, 110px);
  margin-left: calc(var(--logo-width, 192px) / -2);
  background: var(--logo) no-repeat;
  background-size: 100%;
}

#main-footer {
  height: 80px;
  background: var(--footer-bg) no-repeat right top;
  background-size: 100% auto;
}

/* ---------- Layout ---------- */

.view-wrapper {
  flex: 1 0 auto;
  padding: 0 0.5em;
}

#home.view-content {
  background-color: var(--surface);
  padding: 52px 0.5em 24px;
  overflow: hidden;
}

/* ---------- Inputs ---------- */

.input {
  display: flex;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 28px;
}

.label {
  position: relative;
  display: inline-block;
  width: 140px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  color: var(--text);
  background-color: var(--page-bg);
  border: none;
  padding: 12px 24px;
  border-radius: 4px 0 0 4px;
  transform: skew(-10deg);
  cursor: pointer;
  font-family: inherit;
}

.label .info {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-family: Georgia, 'Times New Roman', serif; /* serif keeps the dot legible at small size */
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--page-bg);
  background-color: var(--brand-green-light);
  border-radius: 4px 0 4px 0;
}

.dollar-input {
  position: relative;
  width: 140px;
  border: solid 4px var(--brand-green);
  border-radius: 0 4px 4px 0;
  padding: 12px 24px 12px;
  padding-right: 12px;
  transform: skew(-10deg);
}

.dollar-input input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-green);
  transform: skew(10deg);
}

/* Hide number-spinner arrows for a cleaner look */
.dollar-input input::-webkit-outer-spin-button,
.dollar-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dollar-input input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.dollar-input .prefix,
.dollar-input .suffix {
  position: absolute;
  top: 0;
  font-family: var(--font-display);
  font-size: 24px;
  margin-top: 6px;
  color: var(--brand-green);
}

.dollar-input .prefix {
  left: 0;
  margin-left: 6px;
}

.dollar-input.icon-right {
  padding-right: 36px;
}

.dollar-input.icon-right .suffix {
  right: 0;
  margin-right: 6px;
}

/* ---------- Button ---------- */

.button {
  display: block;
  margin: 28px auto 0;
  border: none;
  cursor: pointer;
  background-color: var(--accent-bg);
  color: var(--accent-text);
  border-radius: 4px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 32px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.075);
  transition: transform 0.35s, filter 0.35s;
}

.button:active {
  transform: scale(0.96);
  filter: brightness(0.9);
}

/* ---------- Modals ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 28px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal[hidden] {
  display: none;
}

.modal.is-open {
  opacity: 1;
}

.modal .cell {
  width: 100%;
}

.modal .button {
  margin-top: 1.5em;
}

#result .label {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
}

#result .total {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--brand-green);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

#result sup {
  font-size: 0.5em;
  vertical-align: super;
}

#help .heading {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--brand-green);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

.line-spacing-plus {
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media screen and (min-width: 600px) {
  .view-wrapper {
    padding: 0 0.75em;
  }
}
