/* =========================================================
   Tywi Digital — WordPress + Forminator integration layer
   Skip link, admin-bar offsets, heading parity and styling
   the Forminator enquiry form to match the design.

   Form selectors use a tripled .tywi-form class to win
   specificity over Forminator's own stylesheet, which is
   enqueued after this file.
   ========================================================= */

/* ---------- Accessibility: skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}
.skip-link:focus {
  left: 14px;
  top: 14px;
  padding: 12px 20px;
  background: var(--gold);
  color: #1a1407;
  border-radius: var(--r-pill);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,0.5);
}

/* ---------- WordPress admin-bar offsets ---------- */
body.admin-bar .header { top: 46px; }
body.admin-bar .grain { top: 46px; }
@media (min-width: 783px) {
  body.admin-bar .header { top: 64px; }
  body.admin-bar .grain { top: 32px; }
}

/* ---------- Heading parity (semantic headings, design styling) ---------- */
.footer__col h2 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
@media (max-width: 600px) {
  .footer__col h2 { margin-bottom: 12px; font-size: 1rem; }
}
.pp-toc h2 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-light);
  font-weight: 400;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
}

/* =========================================================
   Forminator enquiry form — matched to the design's .form
   ========================================================= */
.tywi-form { display: block; }

.tywi-form.tywi-form.tywi-form .forminator-ui.forminator-custom-form,
.tywi-form.tywi-form.tywi-form .forminator-custom-form {
  margin: 0;
  font-family: var(--f-body);
}

/* Rows & columns. Forminator packs every field into one flex row; the
   per-field col widths below recreate the design: paired fields sit
   two-up (col-6) and the rest are full width (col-12). !important is
   needed to beat Forminator's own grid stylesheet. */
.tywi-form.tywi-form.tywi-form .forminator-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  align-items: flex-start;
  margin: 0 0 16px;
}
.tywi-form.tywi-form.tywi-form .forminator-row:last-of-type { margin-bottom: 0; }
.tywi-form.tywi-form.tywi-form .forminator-col {
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  float: none !important;
  flex: 0 1 100% !important;
  max-width: 100% !important;
}
.tywi-form.tywi-form.tywi-form .forminator-col-6 {
  flex: 0 1 calc(50% - 8px) !important;
  max-width: calc(50% - 8px) !important;
}
@media (max-width: 600px) {
  .tywi-form.tywi-form.tywi-form .forminator-col-6 {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

.tywi-form.tywi-form.tywi-form .forminator-field { display: grid; gap: 8px; }

/* Labels — mono eyebrow style */
.tywi-form.tywi-form.tywi-form .forminator-label,
.tywi-form.tywi-form.tywi-form label.forminator-label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dark);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
}
.tywi-form.tywi-form.tywi-form .forminator-label .forminator-required {
  color: var(--gold);
  margin-left: 2px;
}

/* Inputs, textareas and selects */
.tywi-form.tywi-form.tywi-form .forminator-input,
.tywi-form.tywi-form.tywi-form input.forminator-input,
.tywi-form.tywi-form.tywi-form .forminator-textarea,
.tywi-form.tywi-form.tywi-form textarea.forminator-textarea,
.tywi-form.tywi-form.tywi-form select.forminator-select--field,
.tywi-form.tywi-form.tywi-form .forminator-field select {
  width: 100%;
  padding: 16px 18px;
  background: rgba(243,238,221,0.04);
  color: var(--paper);
  border-radius: var(--r-16);
  box-shadow: inset 0 0 0 1px rgba(243,238,221,0.1);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.4;
  transition: box-shadow 180ms, background 180ms;
  -webkit-appearance: none;
  appearance: none;
}
/* Edge borders matched to the design: text inputs keep the beveled
   inset border (highlight on the bottom/right edge); textareas and
   selects use the design's thin solid border. */
.tywi-form.tywi-form.tywi-form .forminator-input,
.tywi-form.tywi-form.tywi-form input.forminator-input {
  border: 2px inset rgb(133,133,133);
}
.tywi-form.tywi-form.tywi-form .forminator-textarea,
.tywi-form.tywi-form.tywi-form textarea.forminator-textarea,
.tywi-form.tywi-form.tywi-form select.forminator-select--field,
.tywi-form.tywi-form.tywi-form .forminator-field select {
  border: 1px solid rgb(133,133,133);
}
.tywi-form.tywi-form.tywi-form .forminator-textarea,
.tywi-form.tywi-form.tywi-form textarea.forminator-textarea {
  min-height: 140px;
  resize: vertical;
}
.tywi-form.tywi-form.tywi-form .forminator-input::placeholder,
.tywi-form.tywi-form.tywi-form .forminator-textarea::placeholder {
  color: rgba(163,177,168,0.7);
}

/* Native select chevron */
.tywi-form.tywi-form.tywi-form select.forminator-select--field,
.tywi-form.tywi-form.tywi-form .forminator-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3b1a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
.tywi-form.tywi-form.tywi-form select.forminator-select--field option { color: #1a2219; }

/* Focus state — gold ring, matches design */
.tywi-form.tywi-form.tywi-form .forminator-input:focus,
.tywi-form.tywi-form.tywi-form .forminator-textarea:focus,
.tywi-form.tywi-form.tywi-form select.forminator-select--field:focus,
.tywi-form.tywi-form.tywi-form .forminator-field select:focus {
  outline: none;
  background: rgba(243,238,221,0.06);
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* ---- Forminator's enhanced select (select2) — matched to the design ---- */
.tywi-form.tywi-form.tywi-form .select2-container { width: 100% !important; }
.tywi-form.tywi-form.tywi-form .select2-container .select2-selection--single {
  height: auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 8px 44px 8px 18px;
  background: rgba(243,238,221,0.04);
  border: 1px solid rgb(133,133,133);
  border-radius: var(--r-16);
  box-shadow: inset 0 0 0 1px rgba(243,238,221,0.1);
  transition: box-shadow 180ms, background 180ms;
}
.tywi-form.tywi-form.tywi-form .select2-container--open .select2-selection--single,
.tywi-form.tywi-form.tywi-form .select2-container--focus .select2-selection--single {
  background: rgba(243,238,221,0.06);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.tywi-form.tywi-form.tywi-form .select2-selection--single .select2-selection__rendered {
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.4;
  padding: 0;
}
.tywi-form.tywi-form.tywi-form .select2-selection--single .select2-selection__placeholder {
  color: rgba(163,177,168,0.7);
}
.tywi-form.tywi-form.tywi-form .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 14px;
}
.tywi-form.tywi-form.tywi-form .select2-selection--single .select2-selection__arrow b {
  border-color: var(--muted-dark) transparent transparent;
}

/* select2 dropdown is appended to <body>; theme-extras.css only loads on the
   front end where this enquiry form is the only select2 instance. */
.select2-container--open .select2-dropdown {
  background: var(--bg-card, #21322a);
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(243,238,221,0.12), 0 18px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}
.select2-container--open .select2-results__option {
  color: #f3eedd;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 15px;
  padding: 11px 18px;
}
.select2-container--open .select2-results__option--highlighted[aria-selected],
.select2-container--open .select2-results__option--highlighted {
  background: #c9a24b;
  color: #1a1407;
}
.select2-container--open .select2-results__option[aria-selected="true"] {
  background: rgba(201,162,75,0.16);
  color: #f3eedd;
}
.select2-container--open .select2-search--dropdown { padding: 10px; }
.select2-container--open .select2-search--dropdown .select2-search__field {
  background: rgba(243,238,221,0.04);
  color: #f3eedd;
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(243,238,221,0.12);
  padding: 10px 12px;
  font-family: "Inter Tight", system-ui, sans-serif;
}

/* HTML field (consent line) */
.tywi-form.tywi-form.tywi-form .forminator-merge-tags p {
  font-size: 13px;
  color: var(--muted-dark);
  margin: 0;
  line-height: 1.5;
}

/* Submit button — styled as .btn--gold */
.tywi-form.tywi-form.tywi-form .forminator-button,
.tywi-form.tywi-form.tywi-form button.forminator-button-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 12px;
  width: auto;
  padding: 16px 24px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: #1a1407;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 10px 26px -10px rgba(201,162,75,0.5);
  transition: transform 220ms var(--ease-pop), background 200ms, box-shadow 200ms;
}
.tywi-form.tywi-form.tywi-form button.forminator-button-submit:hover {
  background: #d9b057;
  transform: translateY(-2px);
}
.tywi-form.tywi-form.tywi-form button.forminator-button-submit:active {
  transform: translateY(0);
}
.tywi-form.tywi-form.tywi-form button.forminator-button-submit:disabled {
  opacity: 0.85;
  transform: none;
}
.tywi-form.tywi-form.tywi-form .forminator-button-submit .forminator-icon-loader { color: #1a1407; }

/* Validation + response messaging */
.tywi-form.tywi-form.tywi-form .forminator-error-message,
.tywi-form.tywi-form.tywi-form .forminator-validation-error {
  color: #e8b06a;
  font-size: 12.5px;
  font-family: var(--f-body);
}
.tywi-form.tywi-form.tywi-form .forminator-input.forminator-has_error,
.tywi-form.tywi-form.tywi-form .forminator-textarea.forminator-has_error,
.tywi-form.tywi-form.tywi-form select.forminator-has_error {
  box-shadow: inset 0 0 0 2px #c98a3f;
}
/* Keep the alert/response box hidden until Forminator actually shows it */
.tywi-form.tywi-form.tywi-form .forminator-response-message:not(.forminator-show) {
  display: none !important;
}
.tywi-form.tywi-form.tywi-form .forminator-response-message {
  padding: 16px 18px;
  border-radius: var(--r-16);
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.tywi-form.tywi-form.tywi-form .forminator-response-message.forminator-success {
  background: rgba(156,191,138,0.12);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(156,191,138,0.3);
}
.tywi-form.tywi-form.tywi-form .forminator-response-message.forminator-error {
  background: rgba(201,162,75,0.12);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(201,162,75,0.3);
}
.tywi-form.tywi-form.tywi-form .forminator-response-message p { margin: 0; }

/* Admin-only notice when the form cannot render */
.tywi-form-notice {
  padding: 16px 18px;
  border-radius: var(--r-16);
  background: rgba(201,162,75,0.12);
  box-shadow: inset 0 0 0 1px rgba(201,162,75,0.3);
  color: var(--paper);
  font-size: 14px;
}

/* =========================================================
   Hero — single-H1 accessibility + small-screen refinements
   ========================================================= */

/* Only frame 0 is a real <h1>; frames 1-2 are presentational divs.
   This rule keeps all three frames pixel-identical regardless of tag. */
.hero__title .hero__h {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  margin: 0;
  text-wrap: balance;
  color: var(--paper);
}

@media (max-width: 900px) {
  .hero__title .hero__h { font-size: clamp(2rem, 8vw, 3rem); }

  /* Guarantee the hero is tall enough that stacked content never
     runs out of room / gets clipped on small devices. */
  .hero { min-height: max(100svh, 720px); }

  /* Progress dots clash with the stacked CTAs on phones — hide them
     (they are decorative and aria-hidden). */
  .hero__progress { display: none; }
}

/* =========================================================
   Footer — let the columns wrap into rows on mobile so the
   footer is less tall, rather than stacking in one column.
   ========================================================= */
@media (max-width: 899px) {
  .footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 36px 32px;
  }
  .footer__brand { flex: 1 1 100%; }
  .footer__col { flex: 1 1 150px; }
}

/* =========================================================
   Selected work — linked project cards
   ========================================================= */
@media (min-width: 900px) {
  .proj-grid--two { grid-template-columns: repeat(2, 1fr) !important; }
}

a.proj {
  color: inherit;
  transition: transform 320ms var(--ease-pop), box-shadow 320ms ease;
}
a.proj:hover {
  transform: translateY(-3px);
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(201,162,75,0.28);
}
.proj__shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* Scrim so the overlaid tag/type stay legible over the screenshot */
.proj__art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(to top, rgba(20,32,26,0.9), transparent);
  z-index: 1;
  pointer-events: none;
}

.proj__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--gold);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.proj__cta .arr {
  display: inline-block;
  transition: transform 240ms var(--ease-pop);
}
a.proj:hover .proj__cta .arr { transform: translate(3px, -3px); }

/* =========================================================
   Selected work — "more coming soon" notice
   ========================================================= */
.work-soon {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: clamp(30px, 4.5vw, 52px) clamp(20px, 4vw, 48px);
  border: 1.5px dashed rgba(201,162,75,0.40);
  border-radius: var(--r-30);
  background: rgba(201,162,75,0.04);
}
.work-soon__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.work-soon__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,75,0.16);
  animation: pulse 2.8s var(--ease-smooth) infinite;
}
.work-soon__eyebrow .cy {
  font-family: var(--f-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
  color: var(--gold);
}
.work-soon__line {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: var(--paper);
  max-width: 32ch;
}
.work-soon__line em { font-style: italic; color: var(--gold); }

/* Project card — kill the 1px seam flicker between image and body on hover */
a.proj { will-change: transform; }
.proj__body {
  position: relative;
  margin-top: -1px;
  background: var(--bg-card);
}
