/* REÂM — Contact Page (Integrated Styles)
   Fully compatible with main stylesheet
   -------------------------------------------------- */

/* ======= Page Shell ======= */
.contact-page {
  position: relative;
  isolation: isolate;
  padding: var(--space-4xl) 0;
  background: var(--color-black);
  min-height: 100vh;
}

[data-theme="light"] .contact-page {
  background: var(--color-bg-light-2);
}

.contact-page .bg-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 70% -10%, color-mix(in oklab, var(--color-orange) 20%, transparent), transparent 60%),
    radial-gradient(60% 50% at -10% 20%, color-mix(in oklab, var(--color-orange) 16%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--color-white) 3%, transparent), transparent);
  mask: linear-gradient(180deg, transparent 0 6%, #000 20% 85%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] .contact-page .bg-grid {
  background:
    radial-gradient(60% 50% at 70% -10%, color-mix(in oklab, var(--color-orange) 12%, transparent), transparent 60%),
    radial-gradient(60% 50% at -10% 20%, color-mix(in oklab, var(--color-orange) 10%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--color-text-light) 2%, transparent), transparent);
}

.contact-hero {
  max-width: 820px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
}

.contact-hero .hero-eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--color-ink-dim);
  font-weight: 600;
}

.contact-hero h1 {
  font-size: var(--fs-heading);
  margin: .35em 0 .2em;
  color: var(--color-white);
  line-height: var(--lh-heading);
}

[data-theme="light"] .contact-hero h1 {
  color: var(--color-text-light);
}

.contact-hero .hero-sub {
  color: var(--color-ink-dim);
  font-size: var(--fs-base);
  max-width: 60ch;
  margin: 0 auto;
  line-height: var(--lh-body);
}

[data-theme="light"] .contact-hero .hero-sub {
  color: var(--color-text-light-dim);
}

.contact-shell {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: var(--space-xl);
  align-items: start;
}

/* ======= Info Card ======= */
.glass-panel {
  position: sticky;
  top: var(--space-lg);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid;
  border-image: var(--card-border) 1;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .glass-panel {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
}

.glass-panel h2 {
  margin: .2em 0 .6em;
  color: var(--color-white);
  font-size: var(--fs-subheading);
}

[data-theme="light"] .glass-panel h2 {
  color: var(--color-text-light);
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  display: grid;
  gap: var(--space-sm);
}

.ticks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-sm);
  align-items: start;
  color: var(--color-ink);
}

[data-theme="light"] .ticks li {
  color: var(--color-text-light);
}

.ticks li span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-2));
  font-weight: 800;
  color: var(--color-white);
  font-size: .8rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.stat {
  background: var(--metric-bg);
  border: 1px solid var(--metric-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  text-align: center;
}

.stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1;
}

.stat-label {
  color: var(--color-ink-dim);
  font-size: .9rem;
  margin-top: 4px;
}

[data-theme="light"] .stat-label {
  color: var(--color-text-light-dim);
}

.reach-us h3 {
  margin: .6em 0 .4em;
  color: var(--color-white);
  font-size: var(--fs-base);
  font-weight: 700;
}

[data-theme="light"] .reach-us h3 {
  color: var(--color-text-light);
}

.reach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}

.link-uline {
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in oklab, var(--color-ink) 40%, transparent);
  transition: border-color var(--duration-fast) var(--ease);
  padding: 2px 0;
  display: inline-block;
}

[data-theme="light"] .link-uline {
  color: var(--color-text-light);
  border-bottom: 1px dashed color-mix(in oklab, var(--color-text-light) 40%, transparent);
}

.link-uline:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--color-orange);
}

.contact-page hr {
  border: none;
  border-top: 1px solid;
  border-image: var(--card-border) 1;
  margin: var(--space-xl) 0;
}

[data-theme="light"] .contact-page hr {
  border-top: 1px solid var(--color-border-light);
}

/* ======= Form ======= */
.contact-page form {
  background: var(--card-bg);
  border: 1px solid;
  border-image: var(--card-border) 1;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .contact-page form {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
}

.contact-page .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.contact-page .full {
  grid-column: 1 / -1;
}

/* Floating label */
.fl {
  position: relative;
  margin-bottom: var(--space-md);
}

.fl__input,
.fl__textarea,
.contact-page select {
  color: var(--color-ink) !important;
  caret-color: var(--color-orange);
  background: var(--color-elev-2);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  padding: var(--space-lg) var(--space-md);
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  transition: all var(--duration-fast) var(--ease);
}

[data-theme="light"] .fl__input,
[data-theme="light"] .fl__textarea,
[data-theme="light"] .contact-page select {
  color: var(--color-text-light) !important;
  background: var(--color-bg-light-2);
  border: 1px solid var(--color-border-light);
}

.fl__input:focus,
.fl__textarea:focus,
.contact-page select:focus {
  border-color: color-mix(in oklab, var(--color-orange) 40%, var(--chip-border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-orange) 18%, transparent);
  outline: none;
}

.fl__textarea {
  min-height: 140px;
  resize: vertical;
}

.fl__label {
  position: absolute;
  left: var(--space-md);
  top: var(--space-lg);
  color: var(--color-ink-dim);
  pointer-events: none;
  transition: all var(--duration-fast) var(--ease);
  background: transparent;
  padding: 0 4px;
}

[data-theme="light"] .fl__label {
  color: var(--color-text-light-dim);
}

.fl__input:focus + .fl__label,
.fl__input:not(:placeholder-shown) + .fl__label,
.fl__textarea:focus + .fl__label,
.fl__textarea:not(:placeholder-shown) + .fl__label {
  transform: translateY(-24px) scale(.92);
  background: var(--color-elev-1);
  color: color-mix(in oklab, var(--color-orange) 60%, var(--color-ink));
  font-weight: 600;
}

[data-theme="light"] .fl__input:focus + .fl__label,
[data-theme="light"] .fl__input:not(:placeholder-shown) + .fl__label,
[data-theme="light"] .fl__textarea:focus + .fl__label,
[data-theme="light"] .fl__textarea:not(:placeholder-shown) + .fl__label {
  background: var(--color-bg-light);
  color: color-mix(in oklab, var(--color-orange) 60%, var(--color-text-light));
}

/* Selects */
.select {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.select span {
  font-weight: 600;
  color: var(--color-ink);
  font-size: var(--fs-base);
}

[data-theme="light"] .select span {
  color: var(--color-text-light);
}

.contact-page select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23FF6600'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.contact-page select option {
  color: var(--color-ink);
  background: var(--color-elev-2);
  padding: var(--space-sm);
}

[data-theme="light"] .contact-page select option {
  color: var(--color-text-light);
  background: var(--color-bg-light);
}

/* Choices */
.choices {
  border: 1px dashed var(--chip-border);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

[data-theme="light"] .choices {
  border: 1px dashed var(--color-border-light);
}

.choices legend {
  padding: 0 var(--space-sm);
  color: var(--color-ink-dim);
  font-weight: 600;
  font-size: var(--fs-base);
}

[data-theme="light"] .choices legend {
  color: var(--color-text-light-dim);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin: 6px 8px 0 0;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  color: var(--color-ink);
}

[data-theme="light"] .pill {
  background: var(--color-bg-light-2);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-light);
}

.pill:hover {
  border-color: var(--color-orange);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pill input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  display: grid;
  place-content: center;
  transition: all var(--duration-fast) var(--ease);
}

.pill input:checked {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-2));
}

.pill input:checked::before {
  content: "✓";
  color: var(--color-white);
  font-size: .8rem;
  font-weight: 800;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

[data-theme="light"] .check {
  color: var(--color-text-light);
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-orange);
}

/* Validation */
.fv-msg {
  font-size: .9rem;
  color: #ff6b6b;
  min-height: 1.25em;
  margin-top: 4px;
  font-weight: 500;
}

.is-error {
  border-color: #ff6b6b !important;
}

.is-valid {
  border-color: color-mix(in oklab, #6bff9b 40%, var(--chip-border)) !important;
}

/* Alerts */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin: var(--space-lg) 0;
  font-weight: 600;
  border: 1px solid;
}

.alert--success {
  background: color-mix(in oklab, #4dffad 18%, var(--color-elev-1));
  border-color: color-mix(in oklab, #4dffad 36%, var(--color-elev-2));
  color: #d8ffe9;
}

.alert--error {
  background: color-mix(in oklab, #ff6262 14%, var(--color-elev-1));
  border-color: color-mix(in oklab, #ff6262 36%, var(--color-elev-2));
  color: #ffe2e2;
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.contact-page .muted {
  color: var(--color-ink-dim);
  margin: 0;
  font-size: .9rem;
}

[data-theme="light"] .contact-page .muted {
  color: var(--color-text-light-dim);
}

/* Honey pot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ======= Guided Highlights ======= */
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-orange) 28%, transparent); }
  60% { box-shadow: 0 0 0 10px color-mix(in oklab, var(--color-orange) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-orange) 0%, transparent); }
}

.fl.required .fl__label::after {
  content: "Required";
  margin-left: 8px;
  font-size: .72rem;
  font-weight: 800;
  color: color-mix(in oklab, var(--color-orange) 70%, var(--color-ink));
  background: color-mix(in oklab, var(--color-orange) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--color-orange) 40%, transparent);
  padding: 2px 6px;
  border-radius: 8px;
}

[data-theme="light"] .fl.required .fl__label::after {
  color: color-mix(in oklab, var(--color-orange) 70%, var(--color-text-light));
}

.fl__input.is-guide {
  animation: pulseRing 1.6s ease-in-out infinite;
}

.choices.is-guide,
.check.is-guide {
  outline: 2px dashed color-mix(in oklab, var(--color-orange) 40%, transparent);
  outline-offset: 6px;
  border-color: color-mix(in oklab, var(--color-orange) 28%, var(--chip-border));
  animation: pulseRing 1.6s ease-in-out infinite;
}

.fl__input.is-guide:focus {
  animation: none;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-orange) 26%, transparent);
}

/* ======= Responsive ======= */
@media (max-width: 980px) {
  .contact-shell {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .glass-panel {
    position: static;
  }
  
  .contact-page .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact-page {
    padding: var(--space-3xl) 0;
  }
  
  .contact-hero {
    margin-bottom: var(--space-xl);
  }
  
  .glass-panel,
  .contact-page form {
    padding: var(--space-lg);
  }
  
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  
  .pill {
    display: flex;
    width: 100%;
    margin: 6px 0 0 0;
  }
}