/* =============================================
   TIMBERLY LOFT - CONTACT PAGE
   Nav styles are in ../shared/nav.css
   ============================================= */

/* ===== CSS VARIABLES ===== */
:root {
  --brown-dark:    #3B1F0F;
  --brown-mid:     #6B3A1F;
  --brown-warm:    #8C4A22;
  --brown-light:   #C48A5C;
  --cream-deep:    #F0E6D3;
  --cream-light:   #FAF6EF;
  --cream-white:   #FFFDF9;
  --text-primary:  #2A1608;
  --text-secondary:#6B5744;
  --text-muted:    #A08060;
  --error:         #C0392B;
  --success:       #2E7D52;

  --font-display: 'Host Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --nav-h:        80px;
  --container:    1200px;
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    24px;

  --transition:   0.3s ease;
  --shadow-soft:  0 4px 24px rgba(59, 31, 15, 0.08);
  --shadow-card:  0 8px 40px rgba(59, 31, 15, 0.12);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--cream-white);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== UTILITY ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 12px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 80px)) 0 clamp(48px, 6vw, 72px);
  background-color: var(--brown-dark);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C48A5C' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.page-header .container {
  position: relative;
  z-index: 1;
  animation: fadeUp 0.65s ease both;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  color: var(--cream-white);
  line-height: 1.08;
  margin-bottom: 16px;
}
.page-title em {
  font-style: italic;
  color: var(--brown-light);
}
.page-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: rgba(250, 246, 239, 0.72);
  max-width: 480px;
  line-height: 1.75;
}

/* ===== CONTACT BODY ===== */
.contact-body {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 120px);
  background-color: var(--cream-white);
}

.contact-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

/* ===== CONTACT INFO ===== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.info-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition);
}
a.info-value:hover { color: var(--brown-warm); }
.info-value.static { cursor: default; }
.info-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.social-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background-color: var(--cream-light);
  border: 1px solid var(--cream-deep);
  border-radius: 100px;
  padding: 8px 16px;
  width: fit-content;
  transition: all var(--transition);
}
.social-pill:hover {
  background-color: var(--cream-deep);
  color: var(--brown-dark);
  border-color: var(--brown-light);
}

.response-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: #fff;
  border: 1px solid rgba(46, 125, 82, 0.18);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #2E7D52;
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(46, 125, 82, 0.2);
  animation: pulse 2s ease infinite;
}
.response-badge p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.response-badge strong { color: var(--text-primary); }

/* ===== FORM WRAP ===== */
.form-wrap {
  background-color: var(--cream-white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--shadow-soft);
}

.form-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cream-deep);
}
.form-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== FORM SUCCESS / ERROR ===== */
.form-success {
  text-align: center;
  padding: 48px 24px;
}
.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: rgba(46, 125, 82, 0.1);
  color: var(--success);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.form-success p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.form-error {
  background-color: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.form-error p {
  font-size: 0.875rem;
  color: var(--error);
}

/* ===== FORM ELEMENTS ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.required { color: var(--brown-warm); }
.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-input {
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--text-primary);
  background-color: var(--cream-light);
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--brown-warm);
  background-color: var(--cream-white);
  box-shadow: 0 0 0 3px rgba(140, 74, 34, 0.08);
}
.form-input.error {
  border-color: var(--error);
  background-color: rgba(192, 57, 43, 0.03);
}
.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Select */
.select-wrap { position: relative; }
.form-select { cursor: pointer; padding-right: 40px; }
.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Checkbox */
.form-consent { margin-top: 4px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--cream-deep);
  border-radius: 4px;
  background-color: var(--cream-light);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.checkbox-label:has(input:checked) .checkbox-custom {
  background-color: var(--brown-dark);
  border-color: var(--brown-dark);
}
.checkbox-label:has(input:checked) .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--cream-white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.checkbox-label a {
  color: var(--brown-warm);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Field error */
.field-error {
  font-size: 0.8rem;
  color: var(--error);
  min-height: 1em;
  display: block;
}

/* ===== SUBMIT BUTTON ===== */
.btn-submit {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream-white);
  background-color: var(--brown-dark);
  border: 1.5px solid var(--brown-dark);
  border-radius: var(--radius-sm);
  padding: 16px 40px;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  margin-top: 8px;
}
.btn-submit:hover:not(:disabled) {
  background-color: var(--brown-mid);
  border-color: var(--brown-mid);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(250, 246, 239, 0.3);
  border-top-color: var(--cream-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--brown-dark);
  color: var(--cream-deep);
  padding: clamp(48px, 6vw, 80px) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(32px, 4vw, 60px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid rgba(250, 246, 239, 0.1);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream-white);
  margin-bottom: 14px;
}
.footer-logo span { color: var(--brown-light); }
.footer-tagline {
  font-size: 0.875rem;
  color: rgba(240, 230, 211, 0.65);
  line-height: 1.65;
  max-width: 260px;
}
.footer-heading {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 20px;
}
.footer-nav ul, .footer-contact ul { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a, .footer-contact a, .footer-contact li {
  font-size: 0.875rem;
  color: rgba(240, 230, 211, 0.7);
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--cream-white); }
.social-links { display: flex; flex-direction: column; gap: 12px; }
.social-links a {
  font-size: 0.875rem;
  color: rgba(240, 230, 211, 0.7);
  transition: color var(--transition);
}
.social-links a:hover { color: var(--brown-light); }
.footer-bottom { padding: 24px 0; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: rgba(240, 230, 211, 0.35); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46, 125, 82, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(46, 125, 82, 0.08); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-info {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .response-badge { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .response-badge { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}