@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200..900&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --color-background: #F3F4F7;
  --color-background-2: #FFFFFF;
  --color-background-dark: #11133A;
  --color-background-darker: #0D0F1F;
  --color-background-error: #FDECEC;
  --color-background-success: #F1FBD6;
  --color-main-1: #2F3BE8;
  --color-main-1-hover: #2530C9;
  --color-main-2: #11133A;
  --color-accent: #C8F03C;
  --color-accent-2: #B7A9FF;
  --color-line: #DCDEE6;
  --color-line-2: #E4E6EE;
  --color-line-strong: #C9CCD8;
  --color-text: #0D0F1F;
  --color-text-2: #3A3E55;
  --color-link: #2F3BE8;
  --color-label: #6B6F85;
  --color-error: #C42B2B;
  --color-success: #3B5A00;
  --font-main: 'Manrope', sans-serif;
  --font-title: 'Unbounded', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-style: normal;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  padding-left: 30px;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--color-accent);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-main-1);
  outline-offset: 3px;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: 72px;
  line-height: 1.04;
  @media (max-width: 1024px) {
    font-size: 52px;
  }
  @media (max-width: 767px) {
    font-size: 38px;
  }
}

h2 {
  font-size: 52px;
  @media (max-width: 1024px) {
    font-size: 40px;
  }
  @media (max-width: 767px) {
    font-size: 30px;
  }
}

h3 {
  font-size: 36px;
  @media (max-width: 1024px) {
    font-size: 28px;
  }
}

h4 {
  font-size: 24px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}

h5 {
  font-size: 20px;
  @media (max-width: 1024px) {
    font-size: 18px;
  }
}

h6 {
  font-size: 18px;
  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

p, span, li {
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
  color: inherit;
}

p {
  color: var(--color-text-2);
  text-wrap: pretty;
}

/* Heading accent — the universal reset would otherwise force the body font */
h1 em, h2 em, h3 em {
  font-family: var(--font-title);
  font-style: normal;
  color: var(--color-main-1);
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  @media (max-width: 767px) {
    font-size: 17px;
  }
}

/* Small tracked mono label — eyebrows, tags, prices, coordinates */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-label);
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   SPACING SYSTEM
   Unified top/bottom rhythm for sections and blocks. Main sections should
   share the same vertical padding (e.g. 120px) unless the design calls for
   something different. Use these utilities instead of one-off px values.
   ========================================================================== */

.mt-120 {
  margin-top: 120px;
  @media (max-width: 1360px) {
    margin-top: 60px;
  }
}

.mt-60 {
  margin-top: 60px;
  @media (max-width: 1360px) {
    margin-top: 30px;
  }
}

.mb-120 {
  margin-bottom: 120px;
  @media (max-width: 1360px) {
    margin-bottom: 60px;
  }
}

.mb-60 {
  margin-bottom: 60px;
  @media (max-width: 1360px) {
    margin-bottom: 30px;
  }
}

/* Standard gap between a section's title block (heading ± intro paragraph)
   and whatever content follows it (button, form, cards, etc.) */
.mb-36 {
  margin-bottom: 36px;
  @media (max-width: 1360px) {
    margin-bottom: 18px;
  }
}

.pt-120 {
  padding-top: 120px;
  @media (max-width: 1360px) {
    padding-top: 60px;
  }
}

.pt-60 {
  padding-top: 60px;
  @media (max-width: 1360px) {
    padding-top: 30px;
  }
}

.pb-120 {
  padding-bottom: 120px;
  @media (max-width: 1360px) {
    padding-bottom: 60px;
  }
}

.pb-60 {
  padding-bottom: 60px;
  @media (max-width: 1360px) {
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   BUTTON
   ========================================================================== */

.button {
  width: fit-content;
  height: 54px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.button.btn-sm {
  height: 42px;
  padding: 0 18px;
  font-size: 14.5px;
}

.button.btn-block {
  width: 100%;
}

.button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.button i {
  font-size: 18px;
  transition: transform 0.3s var(--ease-out-expo);
}

.button:hover i {
  transform: translateX(4px);
}

.button.btn-primary {
  background: var(--color-main-1);
  border-color: var(--color-main-1);
  color: #FFFFFF;
}

.button.btn-primary:hover {
  background: var(--color-main-1-hover);
  border-color: var(--color-main-1-hover);
  color: #FFFFFF;
}

/* Transparent + outlined — uses the current text color, so it reads
   correctly both on a light section and over a dark background. */
.button.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.button.btn-ghost:hover {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #FFFFFF;
}

/* Outline on a white fill — secondary action on light sections */
.button.btn-outline {
  background: var(--color-background-2);
  border-color: var(--color-line-strong);
  color: var(--color-text);
}

.button.btn-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Primary action on dark sections: white, lights up lime on hover */
.button.btn-light {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--color-main-2);
  font-weight: 800;
}

.button.btn-light:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.button.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.button.btn-ghost-light:hover {
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* ==========================================================================
   TAGS / CHIPS
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip-dark {
  background: var(--color-main-2);
  color: #FFFFFF;
}

.chip-lime {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.chip-lilac {
  background: var(--color-accent-2);
  border-color: var(--color-accent-2);
  color: var(--color-text);
}

.chip-cobalt {
  background: var(--color-main-1);
  color: #FFFFFF;
}

.chip-muted {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   TIMELINE
   A day of a resource as segments (in use / free / closed). Each segment's
   share of the day is set with --f (hours), e.g. style="--f: 3".
   <div class="timeline">
     <span class="seg seg-busy" style="--f: 7"></span>
     <span class="seg seg-free" style="--f: 3"><span>FREE 15:00-18:00</span></span>
   </div>
   ========================================================================== */

.timeline {
  display: flex;
  gap: 3px;
  height: 44px;
}

.timeline .seg {
  flex: var(--f, 1) 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-line-2);
  transform-origin: left center;
}

.timeline .seg-busy {
  background: var(--color-main-2);
}

.timeline .seg-free {
  background: var(--color-accent);
}

.timeline .seg span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-text);
}

/* Segment labels: full on wide timelines, compact on phones */
.timeline .seg .seg-short {
  display: none;
}

@media (max-width: 767px) {
  .timeline .seg .seg-long {
    display: none;
  }

  .timeline .seg .seg-short {
    display: inline;
  }
}

.timeline-hours {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-label);
}

.timeline-hours span {
  font-size: 11px;
  line-height: 1.4;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--color-label);
}

.timeline-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--color-line-2);
}

.timeline-legend .key-busy {
  background: var(--color-main-2);
}

.timeline-legend .key-free {
  background: var(--color-accent);
}

/* Dark variant — on midnight backgrounds */
.timeline-dark .seg {
  background: rgba(255, 255, 255, 0.06);
}

.timeline-dark .seg-busy {
  background: #2B2F6E;
}

.timeline-dark .seg-free {
  background: var(--color-accent);
}

/* ==========================================================================
   NAV TOGGLE
   Hamburger button for collapsed nav (hidden on desktop — the breakpoint
   that shows it is defined per-project in style.css, next to that nav's own
   markup). main.js swaps the icon between ri-menu-line / ri-close-line and
   toggles .is-open on the nav it controls.
   ========================================================================== */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--color-background-2);
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  font-size: 22px;
  color: var(--color-text);
  cursor: pointer;
}

/* ==========================================================================
   SCROLL TO TOP
   Hidden until the page is scrolled past a threshold, then faded in.
   Toggled via .is-visible by main.js.
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-main-1);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 90;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--color-main-1-hover);
}

/* ==========================================================================
   LINK ARROW
   A text link with a visible icon that nudges forward on hover. Markup:
   <a class="link-arrow"><span>Label</span><i class="ri-arrow-right-line"></i></a>
   ========================================================================== */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 3px;
  font-weight: 700;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-arrow i {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transform: translateX(0);
  transition: transform 0.3s var(--ease-out-expo);
}

.link-arrow:hover i {
  transform: translateX(4px);
}

/* ==========================================================================
   CONTACT ITEM
   Pairs an icon with a contact detail. Markup:
   <a class="contact-item"><i class="ri-mail-line"></i><span>hey@sublettly.com</span></a>
   ========================================================================== */

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item i {
  font-size: 16px;
  line-height: 1;
  opacity: 0.6;
}

/* ==========================================================================
   ACCORDION
   Single-open accordion (FAQ, etc). Markup:
   <div class="accordion-wrapper">
     <div class="accordion-item active">
       <div class="item-title-wrapper">
         <span>Question</span>
         <i class="ri-add-line"></i>
       </div>
       <div class="item-description-wrapper">
         <div class="item-content">
           <p>Answer</p>
         </div>
       </div>
     </div>
   </div>
   JS: initFaqAccordion() in main.js drives open/close (single item open at a
   time) via jQuery slideUp/slideDown; add/remove "active" toggles the styling
   below and rotates the icon glyph 45deg into an "x".
   ========================================================================== */

.accordion-wrapper {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-text);
}

.accordion-item {
  border-bottom: 1px solid var(--color-line);
}

.item-title-wrapper {
  padding: 24px 0;
  display: grid;
  grid-template-columns: 1fr 30px;
  column-gap: 18px;
  align-items: center;
  cursor: pointer;
}

.item-title-wrapper span {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.item-title-wrapper:hover span {
  color: var(--color-main-1);
}

.item-title-wrapper i {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  font-size: 18px;
  color: var(--color-main-1);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Rotate the glyph, not the bordered box around it */
.item-title-wrapper i::before {
  display: inline-block;
  transition: transform 0.4s var(--ease-out-expo);
}

.item-description-wrapper {
  display: none;
}

.item-content {
  padding: 0 48px 24px 0;
}

.item-content p {
  font-size: 15.5px;
  line-height: 1.65;
}

.accordion-item.active .item-title-wrapper i {
  background: var(--color-main-1);
  border-color: var(--color-main-1);
  color: #FFFFFF;
}

.accordion-item.active .item-title-wrapper i::before {
  transform: rotate(45deg);
}

/* ==========================================================================
   GRID (row / col)
   Minimal flex-based grid for laying out form fields side by side.
   ========================================================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.row .col {
  flex: 1 1 240px;
}

.row .col-12 {
  flex: 1 1 100%;
}

/* ==========================================================================
   FORMS
   Markup pattern (see forms/contact.php + forms/validate.js, which drives the
   submit/validation behavior behind these classes):

   <form class="contact-form-box php-email-form" data-action="forms/contact.php" novalidate>
     <div class="row">
       <div class="col form-fields">
         <div class="form-clt">
           <label class="form-label" for="...">Name</label>
           <input class="access-input" name="name" ...>
           <span class="field-error" id="err-name">...</span>
         </div>
       </div>
       <div class="col col-12">
         <div class="form-loading loading">...</div>
         <div class="form-error-msg error-message"><span></span></div>
         <div class="form-sent sent-message">...</div>
       </div>
       <div class="col col-12 form-fields">
         <div class="contact-button">
           <button type="submit" class="button btn-primary">Send</button>
         </div>
       </div>
     </div>
   </form>
   ========================================================================== */

/* Bootstrap-style visibility hook: forms/validate.js toggles this class to
   reveal the loading/error/success states below. */
.d-block {
  display: block !important;
}

/* After a successful send only the success block stays visible */
.contact-form-box:has(.sent-message.d-block) .form-fields {
  display: none;
}

.form-clt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-label);
}

.access-input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  background: var(--color-background-2);
  border-radius: 6px;
  border: 1px solid var(--color-line-strong);
  font-size: 15.5px;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.access-input::placeholder {
  color: #9A9DB0;
}

.access-input:hover {
  border-color: #A9ADC0;
}

.access-input:focus-visible {
  outline: none;
  border-color: var(--color-main-1);
  box-shadow: 0 0 0 3px rgba(47, 59, 232, 0.14);
}

textarea.access-input {
  height: auto;
  min-height: 120px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.55;
  resize: vertical;
}

/* Custom select — native control, custom chevron */
select.access-input {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath fill='%236B6F85' d='M12 13.17 16.95 8.2l1.41 1.42L12 16 5.64 9.63 7.05 8.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* Segmented radio choice (e.g. "I want to rent / I have idle space") */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-group label {
  position: relative;
  cursor: pointer;
}

.choice-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-group span {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  background: var(--color-background-2);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-2);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.choice-group label:hover span {
  border-color: var(--color-text);
}

.choice-group input:checked + span {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: #FFFFFF;
}

.choice-group input:focus-visible + span {
  outline: 2px solid var(--color-main-1);
  outline-offset: 2px;
}

.access-input.input-error {
  background: var(--color-background-error);
  border-color: var(--color-error);
}

.field-error {
  display: none;
  font-size: 13px;
  color: var(--color-error);
}

.field-error.visible {
  display: block;
}

/* Honeypot — off-screen, ignored by validation (no .access-input) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-label);
}

.form-note a {
  font-weight: 600;
}

/* Loading / error / success states start hidden; forms/validate.js shows
   the relevant one via .d-block. */
.loading,
.error-message,
.sent-message {
  display: none;
}

.form-loading {
  font-size: 15px;
  color: var(--color-text-2);
}

.form-loading-spinner {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 2px solid var(--color-line);
  border-top-color: var(--color-main-1);
  border-radius: 50%;
  animation: form-spin 0.6s linear infinite;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

.form-error-msg {
  padding: 12px 18px;
  background: var(--color-background-error);
  color: var(--color-error);
  border-radius: 6px;
  font-size: 14.5px;
}

.form-error-msg i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.form-sent {
  padding: 30px;
  background: var(--color-background-success);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
}

.form-sent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  background: var(--color-accent);
  color: var(--color-text);
  font-size: 22px;
  border-radius: 6px;
}

.form-sent-title {
  margin-bottom: 6px;
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.form-sent-sub {
  font-size: 15px;
  color: var(--color-text-2);
}

/* ==========================================================================
   MODAL
   One copy per page, outside the Barba container. Opened by any
   [data-modal-open="id"], closed by any [data-modal-close] (see initModal()).
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 31, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--color-background);
  border: 1px solid var(--color-text);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(13, 15, 31, 0.35);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.5s var(--ease-out-expo);
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-2);
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.modal-close:hover {
  border-color: var(--color-text);
}

@media (max-width: 767px) {
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
