/* ========================================
   TBSO Base Styles
   ======================================== */

/* ========== Global Reset ========== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ========== Body ========== */

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--color-deep-walnut);
  background-color: var(--color-warm-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography ========== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--spacing-30) 0;
  font-family: var(--font-heading);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-earth-brown);
}

h1 {
  font-size: var(--font-size-display);
  margin-bottom: var(--spacing-40);
}

h2 {
  font-size: var(--font-size-xxl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-regular);
}

h5,
h6 {
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-medium);
}

p {
  margin: 0 0 var(--spacing-30) 0;
  font-family: var(--font-body);
}

p:last-child {
  margin-bottom: 0;
}

/* ========== Links ========== */

a {
  color: var(--color-saffron);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover,
a:focus {
  color: var(--color-muted-gold);
}

a:focus {
  outline: 2px solid var(--color-saffron);
  outline-offset: 2px;
}

/* ========== Buttons ========== */

button,
.btn {
  display: inline-block;
  padding: var(--spacing-20) var(--spacing-50);
  font-family: var(--font-body);
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-regular);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-earth-brown);
  background-color: var(--color-saffron);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

button:hover,
.btn:hover {
  background-color: var(--color-muted-gold);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-button);
}

button:focus,
.btn:focus {
  outline: 2px solid var(--color-saffron);
  outline-offset: 2px;
}

button:active,
.btn:active {
  transform: translateY(0);
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: var(--color-white);
  border: var(--border-width) solid var(--color-saffron);
  color: var(--color-saffron);
}

.btn-secondary:hover {
  background-color: var(--color-saffron);
  color: var(--color-earth-brown);
}

/* ========== Forms ========== */

label {
  display: block;
  margin-bottom: var(--spacing-10);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-earth-brown);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  display: block;
  width: 100%;
  padding: var(--spacing-20);
  font-family: var(--font-body);
  font-size: var(--font-size-medium);
  line-height: var(--line-height-base);
  color: var(--color-deep-walnut);
  background-color: var(--color-white);
  border: var(--border-width) solid var(--color-clay);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-saffron);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.form-group {
  margin-bottom: var(--spacing-30);
}

.required {
  color: var(--color-monk-robe);
}

/* ========== Images ========== */

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

figure {
  margin: 0;
}

/* ========== Lists ========== */

ul,
ol {
  margin: 0 0 var(--spacing-30) 0;
  padding-left: var(--spacing-40);
  font-family: var(--font-body);
}

ul ul,
ol ol {
  margin-bottom: 0;
}

li {
  margin-bottom: var(--spacing-10);
}

/* ========== Utilities ========== */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-earth-brown);
  color: var(--color-saffron);
  padding: var(--spacing-20);
  z-index: var(--z-index-toast);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ========== Animations ========== */

@keyframes tbso-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tbso-fade-up {
  animation: tbso-fade-up var(--transition-slow) ease-out;
}

/* Staggered animation delays */
.tbso-fade-up:nth-child(1) {
  animation-delay: 0s;
}

.tbso-fade-up:nth-child(2) {
  animation-delay: 0.15s;
}

.tbso-fade-up:nth-child(3) {
  animation-delay: 0.3s;
}

.tbso-fade-up:nth-child(4) {
  animation-delay: 0.45s;
}

/* ========== Print Styles ========== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

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

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

  img {
    page-break-inside: avoid;
  }

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

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