.twills *,
.twills *::before,
.twills *::after {
  box-sizing: border-box;
}

.twills {
  /* ---------- Design tokens ---------- */
  --twills-navy-900: #071B33;
  --twills-navy-800: #0B2545;
  --twills-navy-700: #12345B;
  --twills-navy-600: #1D4E82;
  --twills-navy-400: #4A86C8;
  --twills-ink: #0B2545;
  --twills-muted: #5A6B85;

  --twills-radius: 22px;
  --twills-ease: cubic-bezier(0.22, 0.8, 0.28, 1);

  /* Card depth (overridable per-card) */
  --twills-shadow:
    10px 10px 25px rgba(11, 37, 69, 0.10),
    -8px -8px 20px rgba(255, 255, 255, 0.92),
    inset 1px 1px 0 rgba(255, 255, 255, 0.90),
    inset -1px -1px 0 rgba(11, 37, 69, 0.035);

  --twills-shadow-hover:
    16px 18px 38px rgba(11, 37, 69, 0.16),
    -10px -10px 26px rgba(255, 255, 255, 0.95),
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(11, 37, 69, 0.05);

  --twills-border: rgba(18, 52, 91, 0.07);
  --twills-border-hover: rgba(18, 52, 91, 0.14);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 40px 0;
  color: var(--twills-ink);
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1100px 520px at 10% -12%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(900px 480px at 102% 112%, #e2ebf7 0%, rgba(226, 235, 247, 0) 66%),
    linear-gradient(180deg, #f9fbfd 0%, #eef2f8 100%);
}

/* ---------- Background decoration ---------- */
.twills-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.twills-decor-circle {
  position: absolute;
  border-radius: 50%;
  display: block;
}

.twills-decor-circle--1 {
  width: 540px;
  height: 540px;
  top: -240px;
  left: -200px;
  background: radial-gradient(circle at 32% 32%, rgba(18, 52, 91, 0.075), rgba(18, 52, 91, 0) 68%);
}

.twills-decor-circle--2 {
  width: 640px;
  height: 640px;
  bottom: -300px;
  right: -240px;
  background: radial-gradient(circle at 58% 40%, rgba(29, 78, 130, 0.085), rgba(29, 78, 130, 0) 68%);
}

.twills-decor-dots {
  position: absolute;
  top: 84px;
  right: 6%;
  width: 168px;
  height: 168px;
  display: block;
  background-image: radial-gradient(rgba(18, 52, 91, 0.18) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 28%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 28%, transparent 72%);
}

.twills-decor-ring {
  position: absolute;
  bottom: 9%;
  left: 3.5%;
  width: 180px;
  height: 180px;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(18, 52, 91, 0.10);
}

/* ---------- Container ---------- */
.twills-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.twills-header {
  max-width: 760px;
  margin: 0 auto clamp(40px, 5vw, 66px);
  text-align: center;
}

.twills-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 8px 18px 8px 15px;
  border: 1px solid rgba(18, 52, 91, 0.07);
  border-radius: 999px;
  background: #ffffff;
  color: var(--twills-navy-700);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow:
    4px 4px 12px rgba(11, 37, 69, 0.10),
    -4px -4px 12px rgba(255, 255, 255, 0.92),
    inset 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.twills-eyebrow i {
  font-size: 0.78rem;
  color: var(--twills-navy-600);
}

.twills-title {
  margin: 0 0 18px;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--twills-navy-900);
}

.twills-title-accent {
  color: var(--twills-navy-600);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .twills-title-accent {
    background: linear-gradient(100deg, #12345B 0%, #2A6BB0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.twills-intro {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  line-height: 1.78;
  color: var(--twills-muted);
}

/* ---------- Grid (asymmetric editorial desktop layout) ---------- */
.twills-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}

.twills-card:nth-child(1) { grid-column: span 2; }
.twills-card:nth-child(2) { grid-column: span 2; }
.twills-card:nth-child(3) { grid-column: span 2; }
.twills-card:nth-child(4) { grid-column: 2 / span 2; }
.twills-card:nth-child(5) { grid-column: 4 / span 2; }

/* ---------- Card ---------- */
.twills-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: break-word;
  padding: clamp(24px, 2.2vw, 34px);
  border: 1px solid var(--twills-border);
  border-radius: var(--twills-radius);
  background: linear-gradient(160deg, #ffffff 0%, #fcfdff 55%, #f4f7fb 100%);
  box-shadow: var(--twills-shadow);
  outline: none;
  transition:
    transform 0.35s var(--twills-ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    opacity 0.5s ease;
}

/* Soft top-left sheen */
.twills-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 44%);
  pointer-events: none;
}

/* Faint navy corner glow */
.twills-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 52, 91, 0.07), rgba(18, 52, 91, 0) 70%);
  pointer-events: none;
}

/* ---------- Reveal on scroll ---------- */
.twills-js .twills-card {
  opacity: 0;
  transform: translateY(24px);
}

.twills-js .twills-card.twills-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Card internals ---------- */
.twills-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.twills-card-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, #12345B 0%, #0B2545 58%, #071B33 100%);
  color: #ffffff;
  font-size: 1.3rem;
  box-shadow:
    0 10px 20px rgba(11, 37, 69, 0.26),
    -4px -4px 10px rgba(255, 255, 255, 0.9),
    inset 1px 1px 0 rgba(255, 255, 255, 0.22),
    inset -1px -1px 0 rgba(0, 0, 0, 0.28);
  transition:
    transform 0.35s var(--twills-ease),
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.twills-card-icon i {
  line-height: 1;
}

.twills-card-number {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(11, 37, 69, 0.28);
  font-variant-numeric: tabular-nums;
}

.twills-card-title {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--twills-navy-900);
}

.twills-card-description {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--twills-muted);
}

.twills-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.twills-card-rule {
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #12345B, #4A86C8);
  opacity: 0.85;
}

.twills-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(18, 52, 91, 0.08);
  border-radius: 50%;
  background: #ffffff;
  color: var(--twills-navy-700);
  font-size: 0.78rem;
  box-shadow:
    4px 4px 10px rgba(11, 37, 69, 0.10),
    -3px -3px 8px rgba(255, 255, 255, 0.95),
    inset 1px 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 0.35s var(--twills-ease),
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

/* ---------- Hover / focus interaction ---------- */
.twills-card:hover,
.twills-card:focus-visible,
.twills-js .twills-card.twills-visible:hover,
.twills-js .twills-card.twills-visible:focus-visible {
  transform: translateY(-4px);
  border-color: var(--twills-border-hover);
  box-shadow: var(--twills-shadow-hover);
}

.twills-card:focus-visible {
  outline: 2px solid var(--twills-navy-700);
  outline-offset: 4px;
}

.twills-card:hover .twills-card-icon,
.twills-card:focus-visible .twills-card-icon {
  transform: scale(1.05);
  background: linear-gradient(145deg, #1D4E82 0%, #12345B 55%, #0B2545 100%);
  box-shadow:
    0 14px 26px rgba(11, 37, 69, 0.32),
    -4px -4px 10px rgba(255, 255, 255, 0.9),
    inset 1px 1px 0 rgba(255, 255, 255, 0.26),
    inset -1px -1px 0 rgba(0, 0, 0, 0.30);
}

.twills-card:hover .twills-card-arrow,
.twills-card:focus-visible .twills-card-arrow {
  transform: translateX(4px);
  background: var(--twills-navy-800);
  color: #ffffff;
  border-color: transparent;
  box-shadow:
    0 10px 20px rgba(11, 37, 69, 0.28),
    inset 1px 1px 0 rgba(255, 255, 255, 0.18);
}

/* =========================================================
   FEATURE CARD (01) — visually prominent, same geometry
   ========================================================= */
.twills-card--feature {
  --twills-border: rgba(255, 255, 255, 0.10);
  --twills-border-hover: rgba(255, 255, 255, 0.20);
  --twills-shadow:
    14px 16px 36px rgba(7, 27, 51, 0.30),
    -8px -8px 22px rgba(255, 255, 255, 0.85),
    inset 1px 1px 0 rgba(255, 255, 255, 0.16),
    inset -1px -1px 0 rgba(0, 0, 0, 0.25);
  --twills-shadow-hover:
    18px 20px 44px rgba(7, 27, 51, 0.36),
    -10px -10px 26px rgba(255, 255, 255, 0.95),
    inset 1px 1px 0 rgba(255, 255, 255, 0.20),
    inset -1px -1px 0 rgba(0, 0, 0, 0.28);

  background: linear-gradient(155deg, #12345B 0%, #0B2545 52%, #071B33 100%);
}

.twills-card--feature::before {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 46%);
}

.twills-card--feature::after {
  background: radial-gradient(circle, rgba(120, 180, 255, 0.20), rgba(120, 180, 255, 0) 70%);
}

.twills-card--feature .twills-card-title {
  color: #ffffff;
}

.twills-card--feature .twills-card-description {
  color: rgba(226, 236, 248, 0.78);
}

.twills-card--feature .twills-card-number {
  color: rgba(255, 255, 255, 0.42);
}

.twills-card--feature .twills-card-icon {
  background: linear-gradient(145deg, #ffffff 0%, #dce7f4 100%);
  color: var(--twills-navy-800);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(11, 37, 69, 0.12);
}

.twills-card--feature .twills-card-rule {
  background: linear-gradient(90deg, #7FB2E8, rgba(127, 178, 232, 0.20));
}

.twills-card--feature .twills-card-arrow {
  background: rgba(255, 255, 255, 0.08);
  color: #dbe8f7;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 14px rgba(0, 0, 0, 0.22);
}

.twills-card--feature:hover .twills-card-arrow,
.twills-card--feature:focus-visible .twills-card-arrow {
  background: #ffffff;
  color: var(--twills-navy-800);
  border-color: transparent;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1400px) {
  .twills-container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .twills-grid {
    gap: 22px;
  }

  .twills-card {
    padding: 26px;
  }

  .twills-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 1.15rem;
  }

  .twills-card-top {
    margin-bottom: 22px;
  }
}

/* ---------- Tablet: 2 columns ---------- */
@media (max-width: 992px) {
  .twills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .twills-card:nth-child(n) {
    grid-column: auto;
  }

  .twills-card.twills-card--feature {
    grid-column: 1 / -1;
  }

  .twills-card {
    padding: 26px;
  }

  .twills-card-footer {
    margin-top: 22px;
  }
}

@media (max-width: 768px) {
  .twills {
    padding: 58px 18px;
  }

  .twills-header {
    margin-bottom: 36px;
  }

  .twills-card {
    padding: 24px 22px;
    border-radius: 20px;
  }

  .twills-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    font-size: 1.1rem;
  }

  .twills-card-description {
    font-size: 0.9rem;
    line-height: 1.68;
  }

  .twills-decor-dots,
  .twills-decor-ring {
    display: none;
  }

  .twills-decor-circle--1,
  .twills-decor-circle--2 {
    opacity: 0.62;
  }
}

/* ---------- Mobile: 1 column ---------- */
@media (max-width: 576px) {
  .twills {
    padding: 48px 14px;
  }

  .twills-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .twills-card.twills-card--feature {
    grid-column: auto;
  }

  .twills-card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .twills-card-top {
    margin-bottom: 20px;
  }

  .twills-card-footer {
    margin-top: 20px;
  }

  .twills-eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    padding: 7px 14px 7px 12px;
  }

  .twills-intro {
    font-size: 0.9rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .twills-card,
  .twills-card-icon,
  .twills-card-arrow {
    transition: none !important;
  }

  .twills-card:hover,
  .twills-card:focus-visible,
  .twills-js .twills-card.twills-visible:hover,
  .twills-js .twills-card.twills-visible:focus-visible {
    transform: none;
  }

  .twills-card:hover .twills-card-icon,
  .twills-card:focus-visible .twills-card-icon,
  .twills-card:hover .twills-card-arrow,
  .twills-card:focus-visible .twills-card-arrow {
    transform: none;
  }
}
