/*
 * Ark Church Seoul — shared design layer
 * Keeps the original Squarespace typography, color themes, photography, and
 * hand-drawn text highlights while refining navigation, rhythm, and interaction.
 */

:root {
  --ark-ink: #1e3038;
  --ark-paper: #f1efe7;
  --ark-paper-soft: #f8f7f2;
  --ark-blue: #a9c1d8;
  --ark-blue-deep: #6f8fa7;
  --ark-sage: #9ca889;
  --ark-clay: #c88969;
  --ark-line: rgba(30, 48, 56, 0.16);
  --ark-shadow-soft: 0 18px 60px rgba(30, 48, 56, 0.10);
  --ark-shadow-card: 0 16px 42px rgba(30, 48, 56, 0.14);
  --ark-radius: 18px;
  --ark-radius-small: 12px;
  --ark-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.ark-modern a,
body.ark-modern button,
body.ark-modern input,
body.ark-modern textarea,
body.ark-modern select {
  -webkit-tap-highlight-color: transparent;
}

body.ark-modern :focus-visible {
  outline: 2px solid var(--ark-blue-deep) !important;
  outline-offset: 4px;
}

/* A slim progress cue makes long story and vision pages easier to understand. */
.ark-progress {
  background: linear-gradient(90deg, var(--ark-blue-deep), var(--ark-sage), var(--ark-clay));
  height: 3px;
  left: 0;
  position: fixed;
  top: 0;
  transform: scaleX(0);
  transform-origin: left center;
  width: 100%;
  z-index: 20000;
}

/* Header: retain the transparent hero state, add a calm glass state on scroll. */
#header {
  transition: background-color 280ms ease, box-shadow 280ms ease, color 280ms ease;
  z-index: 9999;
}

#header .header-inner {
  transition: min-height 280ms ease, padding 280ms ease;
}

/* Transparent hero state: a soft scrim keeps the white mark and nav legible
   over pale photography without reintroducing a visible bar. */
#header.dark:not(.ark-scrolled)::before,
#header[data-section-theme="dark"]:not(.ark-scrolled)::before {
  background: linear-gradient(
    180deg,
    rgba(24, 39, 46, 0.55),
    rgba(24, 39, 46, 0.18) 55%,
    rgba(24, 39, 46, 0)
  );
  content: "";
  height: 260%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

#header .header-background {
  transition: background-color 280ms ease, opacity 280ms ease, backdrop-filter 280ms ease;
}

#header.ark-scrolled {
  background: rgba(244, 242, 235, 0.92) !important;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: 0 10px 35px rgba(24, 39, 46, 0.09);
}

#header.ark-scrolled .header-background {
  background: rgba(244, 242, 235, 0.92) !important;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  opacity: 1 !important;
}

#header.ark-scrolled .header-title-text a,
#header.ark-scrolled .header-nav-item > a,
#header.ark-scrolled .header-nav-folder-title {
  color: var(--ark-ink) !important;
}

#header .header-title-text a {
  letter-spacing: -0.02em;
}

.header-nav-list {
  align-items: center;
  gap: clamp(14px, 1.7vw, 28px);
}

.header-nav-item > a,
.header-nav-folder-title {
  position: relative;
  transition: opacity 180ms ease;
}

.header-nav-item--folder {
  position: relative;
}

.header-nav-item--folder::before {
  content: "";
  height: 16px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 100%;
}

.header-nav-item > a::after,
.header-nav-folder-title::after {
  background: currentColor;
  bottom: -7px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 260ms var(--ark-ease);
  width: 100%;
}

.header-nav-item:hover > a::after,
.header-nav-item:hover > .header-nav-folder-title::after,
.header-nav-item--active > a::after,
.header-nav-item--active > .header-nav-folder-title::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-nav-folder-title-text::after {
  content: "\2193";
  display: inline-block;
  font-size: 0.72em;
  margin-left: 0.45em;
  transition: transform 220ms var(--ark-ease);
}

.header-nav-item--folder:hover .header-nav-folder-title-text::after,
.header-nav-folder-title[aria-expanded="true"] .header-nav-folder-title-text::after {
  transform: translateY(2px) rotate(180deg);
}

.header-nav-folder-content {
  background: rgba(248, 247, 242, 0.96) !important;
  border: 1px solid var(--ark-line);
  border-radius: var(--ark-radius-small);
  box-shadow: var(--ark-shadow-card);
  display: none !important;
  flex-direction: column !important;
  left: 50% !important;
  min-width: 210px;
  overflow: hidden;
  padding: 8px !important;
  pointer-events: none !important;
  position: absolute !important;
  top: calc(100% + 12px) !important;
  transform: translate(-50%, 8px) !important;
  z-index: 10001 !important;
}

.header-nav-item--folder:hover .header-nav-folder-content,
.header-nav-item--folder.ark-folder-open .header-nav-folder-content {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
  visibility: visible !important;
}

.header-nav-item--folder:hover::before,
.header-nav-item--folder.ark-folder-open::before {
  pointer-events: auto;
}

.header-nav-folder-item {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.header-nav-folder-item a {
  border-radius: 8px;
  color: var(--ark-ink) !important;
  display: block;
  padding: 11px 13px !important;
  transition: background-color 180ms ease, transform 180ms var(--ark-ease);
}

.header-nav-folder-item-content {
  color: var(--ark-ink) !important;
}

.header-nav-folder-item a:hover,
.header-nav-folder-item--active a {
  background: rgba(169, 193, 216, 0.24);
  transform: translateX(3px);
}

.header-actions-action--cta .btn,
.header-menu-cta a {
  background: var(--ark-clay) !important;
  border-color: var(--ark-clay) !important;
  border-radius: 999px !important;
  color: #fff !important;
  padding-left: 1.55em !important;
  padding-right: 1.55em !important;
  transition: transform 220ms var(--ark-ease), box-shadow 220ms ease, background-color 220ms ease !important;
}

.header-actions-action--cta .btn:hover,
.header-menu-cta a:hover {
  box-shadow: 0 9px 25px rgba(30, 48, 56, 0.17);
  transform: translateY(-2px);
}

/* Buttons and editorial links. */
.sqs-block-button-element,
.list-item-content__button,
.form-submit-button,
button[type="submit"] {
  border-radius: 999px !important;
  transition: transform 220ms var(--ark-ease), box-shadow 220ms ease, filter 220ms ease !important;
}

.sqs-block-button-element:hover,
.list-item-content__button:hover,
.form-submit-button:hover,
button[type="submit"]:hover {
  box-shadow: 0 10px 28px rgba(30, 48, 56, 0.16);
  filter: saturate(1.06);
  transform: translateY(-3px);
}

.sqs-block-button-element::after,
.list-item-content__button::after {
  content: "\2197";
  display: inline-block;
  font-size: 0.82em;
  margin-left: 0.75em;
  transition: transform 220ms var(--ark-ease);
}

a[href^="/"] .sqs-block-button-element::after,
.list-item-content__button[href^="/"]::after {
  content: "\2192";
}

.sqs-block-button-element:hover::after,
.list-item-content__button:hover::after {
  transform: translate(3px, -2px);
}

/* Image treatment: subtle depth without changing the original crops. */
.sqs-block-image .image-block-wrapper,
.sqs-block-image figure,
.gallery-grid-item-wrapper,
.summary-thumbnail-container {
  overflow: hidden;
}

.sqs-block-image img,
.gallery-grid-item img,
.summary-thumbnail img {
  transition: filter 500ms ease, transform 700ms var(--ark-ease) !important;
}

.sqs-block-image:hover img,
.gallery-grid-item:hover img,
.summary-thumbnail:hover img {
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.018);
}

/* Homepage and list-based engagement cards. */
.user-items-list-section .list-section-title {
  letter-spacing: -0.025em;
}

.user-items-list-section .list-item {
  border: 1px solid rgba(30, 48, 56, 0.13);
  border-radius: var(--ark-radius) !important;
  isolation: isolate;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  transition: border-color 260ms ease, box-shadow 320ms ease, transform 320ms var(--ark-ease);
}

.user-items-list-section .list-item::before {
  color: rgba(30, 48, 56, 0.55);
  content: counter(ark-card, decimal-leading-zero);
  counter-increment: ark-card;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  left: clamp(20px, 2.4vw, 36px);
  letter-spacing: 0.08em;
  position: absolute;
  top: clamp(20px, 2.4vw, 32px);
  z-index: 2;
}

.user-items-list-section .user-items-list-item-container,
.user-items-list-section .list-grid {
  counter-reset: ark-card;
}

.user-items-list-section .list-item::after {
  background: linear-gradient(145deg, rgba(169, 193, 216, 0.36), rgba(156, 168, 137, 0.10));
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: -120px;
  top: -120px;
  transition: transform 500ms var(--ark-ease);
  width: 220px;
  z-index: -1;
}

.user-items-list-section .list-item:nth-child(3n + 2)::after {
  background: linear-gradient(145deg, rgba(156, 168, 137, 0.34), rgba(200, 137, 105, 0.10));
}

.user-items-list-section .list-item:nth-child(3n)::after {
  background: linear-gradient(145deg, rgba(200, 137, 105, 0.30), rgba(169, 193, 216, 0.10));
}

.user-items-list-section .list-item:hover {
  border-color: rgba(30, 48, 56, 0.26);
  box-shadow: var(--ark-shadow-card);
  transform: translateY(-8px);
}

.user-items-list-section .list-item:hover::after {
  transform: scale(1.25) translate(-18px, 18px);
}

.user-items-list-section .list-item-content {
  height: 100%;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.user-items-list-section .list-item-content__title {
  letter-spacing: -0.035em;
  max-width: 100% !important;
}

.user-items-list-section .list-item-content__description,
.user-items-list-section .list-item-content__button-container {
  max-width: 100% !important;
}

/* Forms should feel deliberate and calm, especially on Partner and Giving. */
.form-wrapper .field-list .field,
.newsletter-form-field-wrapper {
  margin-bottom: 1.2rem;
}

.form-wrapper input:not([type="checkbox"]):not([type="radio"]),
.form-wrapper textarea,
.form-wrapper select,
.newsletter-form-field-element {
  background: rgba(248, 247, 242, 0.72) !important;
  border: 1px solid rgba(30, 48, 56, 0.22) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  min-height: 52px;
  padding: 13px 15px !important;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease !important;
}

.form-wrapper input:focus,
.form-wrapper textarea:focus,
.form-wrapper select:focus,
.newsletter-form-field-element:focus {
  background: #fff !important;
  border-color: var(--ark-blue-deep) !important;
  box-shadow: 0 0 0 4px rgba(111, 143, 167, 0.14) !important;
  outline: none !important;
}

/* Accordions read as an editorial hairline list rather than boxed cards. */
.accordion-item {
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  margin-bottom: 0;
  overflow: visible;
  padding-left: 0;
  padding-right: 0;
}

.accordion-divider {
  background: rgba(200, 137, 105, 0.55) !important;
}

.accordion-item__click-target {
  border-radius: 0;
  transition: padding-left 260ms var(--ark-ease), color 200ms ease;
}

.accordion-item__click-target:hover {
  background: transparent;
  padding-left: 8px;
}

.accordion-item__title,
.accordion-item__description,
.accordion-item__description p,
.accordion-item__description li,
.accordion-item__description a {
  color: var(--ark-ink) !important;
}

.accordion-icon-container,
.accordion-icon-container * {
  color: var(--ark-ink) !important;
  stroke: currentColor !important;
}

/* Media, maps, charts, and quotes share a quiet editorial frame. */
.sqs-block-map .map-block-wrapper,
.sqs-block-map iframe,
.sqs-block-video .intrinsic,
.sqs-block-embed .intrinsic,
.sqs-block-embed iframe {
  border-radius: var(--ark-radius-small);
  overflow: hidden;
}

.sqs-block-map .map-block-wrapper,
.sqs-block-video .intrinsic,
.sqs-block-embed .intrinsic {
  box-shadow: 0 12px 38px rgba(30, 48, 56, 0.10);
}

.sqs-block-embed .intrinsic-inner iframe,
.sqs-block-video .intrinsic-inner iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.sqs-block-chart .chart-block-container {
  border-radius: var(--ark-radius-small);
}

.sqs-block-quote blockquote {
  border-left: 2px solid var(--ark-clay);
  margin-left: 0;
  padding-left: clamp(20px, 3vw, 42px);
}

.sqs-block-socialaccountlinks a {
  transition: opacity 180ms ease, transform 220ms var(--ark-ease);
}

.sqs-block-socialaccountlinks a:hover {
  opacity: 0.72;
  transform: translateY(-3px);
}

/* Route-aware next steps, inserted without replacing source content. */
.ark-next {
  background: var(--ark-paper);
  color: var(--ark-ink);
  padding: clamp(72px, 9vw, 132px) clamp(22px, 6vw, 92px);
  position: relative;
}

.ark-next::before {
  background: var(--ark-line);
  content: "";
  height: 1px;
  left: clamp(22px, 6vw, 92px);
  position: absolute;
  right: clamp(22px, 6vw, 92px);
  top: 0;
}

.ark-next__inner {
  margin: 0 auto;
  max-width: 1500px;
}

.ark-next__eyebrow {
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  letter-spacing: 0.13em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.ark-next__heading {
  color: inherit;
  font-size: clamp(2.35rem, 5.3vw, 5.4rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin: 0 0 clamp(36px, 6vw, 72px);
  max-width: 900px;
}

.ark-next__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ark-next__card {
  align-items: flex-end;
  background: rgba(248, 247, 242, 0.72);
  border: 1px solid var(--ark-line);
  border-radius: var(--ark-radius);
  color: var(--ark-ink);
  display: flex;
  justify-content: space-between;
  min-height: 230px;
  padding: clamp(24px, 3vw, 38px);
  text-decoration: none;
  transition: background-color 240ms ease, box-shadow 280ms ease, transform 300ms var(--ark-ease);
}

.ark-next__card:nth-child(1) { background: rgba(169, 193, 216, 0.44); }
.ark-next__card:nth-child(2) { background: rgba(156, 168, 137, 0.28); }
.ark-next__card:nth-child(3) { background: rgba(200, 137, 105, 0.22); }

.ark-next__card:hover {
  box-shadow: var(--ark-shadow-card);
  color: var(--ark-ink);
  transform: translateY(-7px);
}

.ark-next__label {
  font-size: clamp(1.5rem, 2.7vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.ark-next__arrow {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.2rem;
  height: 48px;
  justify-content: center;
  transition: background-color 220ms ease, color 220ms ease, transform 280ms var(--ark-ease);
  width: 48px;
}

.ark-next__card:hover .ark-next__arrow {
  background: var(--ark-ink);
  color: var(--ark-paper);
  transform: rotate(-35deg);
}

/* Lightweight reveals, added after layout so Squarespace positioning is untouched. */
.ark-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 800ms var(--ark-ease);
}

.ark-reveal.ark-visible {
  opacity: 1;
  transform: none;
}

.ark-back-to-top {
  align-items: center;
  background: rgba(248, 247, 242, 0.9);
  border: 1px solid var(--ark-line);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 8px 28px rgba(30, 48, 56, 0.11);
  color: var(--ark-ink);
  cursor: pointer;
  display: flex;
  height: 46px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 260ms var(--ark-ease), background-color 180ms ease;
  width: 46px;
  z-index: 9000;
}

.ark-back-to-top.ark-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.ark-back-to-top:hover {
  background: var(--ark-blue);
}

@media (max-width: 900px) {
  .ark-next__grid {
    grid-template-columns: 1fr;
  }

  .ark-next__card {
    min-height: 150px;
  }

  .user-items-list-section .list-item {
    min-height: 310px;
  }

  .header-menu-bg {
    background: rgba(241, 239, 231, 0.98) !important;
  }

  .header-display-mobile .header-nav-folder-content,
  .header-menu .header-nav-folder-content {
    display: initial !important;
    left: auto !important;
    pointer-events: auto !important;
    position: static !important;
    transform: none !important;
  }

  .header-menu .header-nav-folder-title-text::after {
    display: none;
  }

  .header-menu-nav-item a,
  .header-menu-controls-control,
  .header-menu-nav-item-content {
    color: var(--ark-ink) !important;
  }

  .header-menu-nav-item a {
    border-bottom: 1px solid rgba(30, 48, 56, 0.10);
  }
}

@media (max-width: 640px) {
  .ark-next {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ark-next::before {
    left: 20px;
    right: 20px;
  }

  .ark-next__card {
    border-radius: 14px;
    min-height: 132px;
  }

  .ark-next__arrow {
    height: 42px;
    width: 42px;
  }

  .user-items-list-section .list-item {
    border-radius: 14px !important;
    min-height: 280px;
  }

  .ark-back-to-top {
    bottom: 16px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .ark-reveal {
    opacity: 1;
    transform: none;
  }
}
