/* ==========================================================================
   INTERIOLYFX - COMPONENTS STYLESHEET
   Buttons, Sticky Notes, Polaroids, Chips, Accordions, Forms, Tables, Dialogs, Sliders
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background-color: var(--g);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--g);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
  line-height: 1.2;
}

.btn:hover {
  transform: rotate(-2deg) scale(1.04);
  color: var(--bone);
}

.btn.o {
  background-color: transparent;
  color: var(--g);
}

.btn.o:hover {
  background-color: var(--g);
  color: var(--bone);
}

.btn.y {
  background-color: var(--m);
  border-color: var(--m);
  color: var(--ink);
}

.btn.y:hover {
  background-color: #c99318;
  border-color: #c99318;
  color: var(--ink);
}

.btn.sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.92rem;
}

/* Paint Chips Palette Switcher */
.chips {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.chip {
  width: 82px;
  border: 0;
  background: var(--white);
  padding: 6px 6px 9px;
  box-shadow: 0 4px 12px rgba(30, 36, 29, 0.18);
  text-align: center;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 2px;
}

.chip:hover,
.chip[aria-pressed="true"] {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 0 8px 18px rgba(30, 36, 29, 0.25);
  outline: 2px solid var(--m);
}

.chip i {
  display: block;
  height: 38px;
  margin-bottom: 4px;
  border-radius: 1px;
}

/* Two Doors Component (Home & Landing) */
.doors {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.door {
  padding: 3rem 2.5rem;
  position: relative;
  box-shadow: 0 8px 24px rgba(30, 36, 29, 0.08);
}

.door.a {
  background-color: var(--m);
  border-radius: 28px 6px 28px 6px;
}

.door.b {
  background-color: var(--pk);
  border-radius: 6px 28px 6px 28px;
  margin-top: 2.5rem;
}

.door p {
  margin: 0.9rem 0 1.6rem;
  max-width: 44ch;
}

/* Sticky Notes (Process & Highlights) */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.sticky {
  padding: 1.8rem 1.5rem 1.5rem;
  box-shadow: 3px 8px 18px rgba(30, 36, 29, 0.14);
  position: relative;
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.sticky:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Frosted Masking Tape Effect on Sticky Notes */
.sticky::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 76px;
  height: 26px;
  margin-left: -38px;
  background-color: rgba(255, 255, 255, 0.75);
  transform: rotate(-3deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(1px);
}

.sticky b {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 2.3rem;
  display: block;
  line-height: 1;
  color: var(--g);
}

.sticky h3 {
  font-size: 1.35rem;
  margin: 0.4rem 0;
}

.sticky p {
  font-size: 0.96rem;
  color: #384234;
  line-height: 1.5;
}

/* Polaroid Cards (Projects & Student Work) */
.polas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 3rem;
}

.pola {
  background: var(--white);
  padding: 14px 14px 20px;
  box-shadow: 0 10px 26px rgba(30, 36, 29, 0.15);
  text-decoration: none;
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  position: relative;
}

.pola:hover {
  transform: rotate(0deg) scale(1.03) !important;
  box-shadow: 0 16px 36px rgba(30, 36, 29, 0.22);
}

.pola .pola-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #ddd9cd;
  border: 1px solid rgba(44, 58, 42, 0.1);
}

.pola img, .pola svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pola figcaption {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 0.8rem;
  color: var(--g);
}

.pola small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--mut);
  margin-top: 0.2rem;
}

/* Service Strip Rows (Home & Services Index) */
.rows {
  margin-top: 2.5rem;
  border-top: 1.5px solid rgba(241, 239, 232, 0.3);
}

.row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr auto;
  gap: 1.8rem;
  align-items: baseline;
  padding: 1.6rem 0.8rem;
  border-bottom: 1.5px solid rgba(241, 239, 232, 0.3);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s ease, padding-left 0.25s ease;
}

.row:hover {
  background-color: rgba(241, 239, 232, 0.08);
  padding-left: 1.4rem;
}

.row h3 {
  color: var(--bone);
  font-size: 1.45rem;
}

.row p {
  color: #d9dccf;
  font-size: 0.98rem;
}

.row span {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--m);
  white-space: nowrap;
}

/* Service Detail Cards Grid */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 36, 29, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--g);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(30, 36, 29, 0.14);
}

.service-card h3 {
  margin-bottom: 0.8rem;
}

.service-card-meta {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px dashed var(--border-muted);
  border-bottom: 1px dashed var(--border-muted);
  font-size: 0.94rem;
  color: var(--mut);
  display: flex;
  justify-content: space-between;
}

/* Course Rows & Cards */
.course-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 1.8rem;
  align-items: center;
  padding: 1.8rem 0;
  border-bottom: 2px dashed rgba(44, 58, 42, 0.25);
}

.course-row h3 {
  margin-bottom: 0.3rem;
  font-size: 1.4rem;
}

.course-row p {
  color: var(--mut);
  font-size: 0.96rem;
}

.course-row .mt {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--g);
}

.fee {
  font-family: var(--se);
  font-size: 1.6rem;
  color: var(--g);
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1;
}

/* Filter Chips (Projects & School) */
.filter-bar {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  align-items: center;
}

.filter-chip {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--g);
  background: transparent;
  color: var(--g);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  background-color: var(--g);
  color: var(--bone);
}

/* Accordions (<details> & <summary>) */
details {
  border-bottom: 2px solid var(--g);
  padding: 1.2rem 0;
}

summary {
  font-family: var(--se);
  font-size: 1.4rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-family: var(--hand);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--g);
  font-weight: 700;
  margin-left: 1rem;
}

details[open] > summary::after {
  content: "–";
}

details p, details ul {
  margin-top: 0.8rem;
  color: var(--mut);
  max-width: 65ch;
  font-size: 1rem;
}

/* Forms */
.studio-form {
  background: var(--white);
  padding: 2.4rem;
  border-radius: 6px 26px 6px 26px;
  box-shadow: 0 12px 30px rgba(30, 36, 29, 0.12);
  display: grid;
  gap: 1.2rem;
  border: 2px solid var(--g);
}

.studio-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.studio-form input,
.studio-form select,
.studio-form textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(44, 58, 42, 0.35);
  border-radius: 8px;
  background-color: var(--bone);
  width: 100%;
  color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.studio-form input:focus,
.studio-form select:focus,
.studio-form textarea:focus {
  border-color: var(--g);
  background-color: var(--white);
}

.studio-form .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--mut);
}

.studio-form .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--g);
}

.form-status {
  font-weight: 700;
  min-height: 1.4rem;
  font-size: 0.95rem;
}

.form-status.error {
  color: #a4262c;
}

.form-status.success {
  color: var(--g);
}

/* Founder Letter & Editorial Callout Box */
.letter {
  background: #fffdf6;
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem;
  box-shadow: 0 12px 36px rgba(30, 36, 29, 0.16);
  position: relative;
  border-radius: 2px;
}

.letter p {
  margin-bottom: 1.2rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.sig {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--g);
  display: inline-block;
  margin-top: 1rem;
}

/* Native Modal Dialog Component (<dialog>) */
dialog {
  border: 2px solid var(--g);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 580px;
  width: 90%;
  background: var(--bone);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin: auto;
}

dialog::backdrop {
  background: rgba(44, 58, 42, 0.65);
  backdrop-filter: blur(2px);
}

dialog h3 {
  margin-bottom: 0.4rem;
}

.dialog-close {
  float: right;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.dialog-close:hover {
  background: var(--m);
}

/* Data Tables (Intakes, Fees, Installments) */
.data-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.98rem;
  background: var(--white);
  border: 2px solid var(--g);
  border-radius: 8px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(44, 58, 42, 0.15);
}

.data-table th {
  background: var(--g);
  color: var(--bone);
  font-family: var(--se);
  font-weight: 400;
  font-size: 1.1rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) {
  background-color: rgba(241, 239, 232, 0.4);
}

/* Before / After Comparison Component */
.compare-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 2px solid var(--g);
  border-radius: 8px;
  background: #000;
  margin: 2.5rem 0;
  user-select: none;
}

.compare-box img,
.compare-box svg {
  width: 100%;
  display: block;
}

.compare-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  border-right: 3px solid var(--m);
  background: #000;
}

.compare-overlay img,
.compare-overlay svg {
  width: auto;
  height: 100%;
  max-width: none;
}

.compare-slider {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: ew-resize;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Responsive Components */
@media (max-width: 900px) {
  .doors {
    grid-template-columns: 1fr;
  }

  .door.b {
    margin-top: 0;
  }

  .row,
  .course-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .row span {
    display: block;
  }

  .letter {
    padding: 2rem 1.5rem;
  }
}
