/* Dearkin — dearkin.app marketing site.
   Brand pulled verbatim from the app: warm, hand-painted, light-only.
   Vanilla CSS, no framework, no external loads (CSP: font-src 'self'). */

/* ---- Self-hosted fonts (same typefaces as the app) ---- */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Design tokens (exact app palette) ---- */
:root {
  --coral:        #E85A4F;
  --coral-deep:   #BC4034;  /* AA: 5.0:1 on cream — used for small text, links, buttons */
  --peach:        #F2B48D;
  --amber:        #F5C87A;
  --cream:        #FFF7EF;
  --surface:      #FFFFFF;
  --surface-tint: #FCEFE4;
  --warm-black:   #3A2A24;
  --warm-grey:    #9A8178;
  --warm-grey-2:  #B7A399;
  --border:       #EADfD3;
  --border-strong:#E0D1C2;

  --ink-1: var(--warm-black);
  --ink-2: #6A574E;          /* AA: 6.4:1 on cream — body / secondary */
  --ink-3: #826C63;          /* AA: 4.6:1 on cream — de-emphasized small text (darker than the app's warm-grey for web legibility) */

  --shadow-1: 0 1px 2px rgba(58, 42, 36, 0.05);
  --shadow-2: 0 2px 6px rgba(58, 42, 36, 0.06), 0 14px 36px rgba(58, 42, 36, 0.07);
  --shadow-coral: 0 8px 24px rgba(232, 90, 79, 0.20);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --xs: 4px; --sm: 8px; --md: 16px; --lg: 24px; --xl: 40px; --xxl: 64px; --xxxl: 96px;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --content-max: 720px; --wrap-max: 1120px;
}

/* Locale-aware font fallbacks (F-0006): Newsreader/Jakarta don't cover CJK;
   Jakarta doesn't cover Cyrillic (Newsreader does). Append native system fonts. */
body.lang-ja {
  --font-display: "Newsreader", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --font-body: "Plus Jakarta Sans", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}
body.lang-ko {
  --font-display: "Newsreader", "Nanum Myeongjo", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Serif KR", serif;
  --font-body: "Plus Jakarta Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
body.lang-sc {
  --font-display: "Newsreader", "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-body: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
body.lang-cyr {
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--coral-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; color: var(--ink-1); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--lg); }

.skip-link {
  position: absolute; left: var(--sm); top: -56px; z-index: 100;
  background: var(--coral); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sm); text-decoration: none; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--md); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-1); }
.brand:hover { text-decoration: none; }
.brand__icon { width: 32px; height: 32px; border-radius: 8px; box-shadow: var(--shadow-1); }
.brand__name { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: .2px; }
.site-nav { display: flex; align-items: center; gap: var(--lg); }
.site-nav > a { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.site-nav > a:hover { color: var(--coral-deep); }

/* ---- Language switcher ---- */
.lang-switcher { position: relative; }
.lang-switcher > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  background: var(--surface);
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary:hover { border-color: var(--coral); color: var(--coral-deep); }
.lang-switcher__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  display: grid; gap: 2px; min-width: 200px; max-height: 60vh; overflow: auto;
  padding: 8px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.lang-switcher__panel a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-1); font-size: 15px; }
.lang-switcher__panel a:hover { background: var(--surface-tint); text-decoration: none; }
.lang-switcher__panel a[aria-current="true"] { color: var(--coral-deep); font-weight: 500; background: var(--surface-tint); }

/* ---- Hero ---- */
.hero { padding-block: clamp(var(--xl), 6vw, var(--xxxl)) var(--xxl); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--xxl); align-items: center; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .3px;
  color: var(--coral-deep); background: var(--surface-tint);
  padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
}
.hero__title { font-size: clamp(40px, 6vw, 66px); letter-spacing: -0.5px; margin-top: var(--md); }
.hero__tagline { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 26px); color: var(--coral-deep); margin-top: var(--sm); }
.hero__lede { font-size: 18px; color: var(--ink-2); margin-top: var(--md); max-width: 30em; }
.hero__cta { margin-top: var(--xl); }

.hero__art { display: flex; justify-content: center; }
.phone {
  position: relative; padding: 12px; border-radius: 44px;
  background: linear-gradient(160deg, #fff, var(--surface-tint));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
  rotate: 2deg;
}
.phone::after {
  content: ""; position: absolute; inset: 0; border-radius: 44px;
  background: radial-gradient(120% 80% at 50% -10%, rgba(245,200,122,.28), transparent 60%);
  pointer-events: none;
}
.phone img { width: 280px; height: auto; border-radius: 32px; }

/* ---- App Store "coming soon" badge (NOT a link) ---- */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 22px; border-radius: var(--r-pill);
  background: var(--warm-black); color: var(--cream);
  box-shadow: var(--shadow-1); cursor: default; user-select: none;
}
.appstore-badge__text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-badge__text small { font-size: 11px; opacity: .8; font-weight: 400; }
.appstore-badge__text strong { font-size: 19px; font-weight: 500; font-family: var(--font-display); }

/* ---- Generic section bits ---- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--coral-deep); }
.section__title { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.3px; margin-top: var(--sm); }

.band { background: var(--surface); border-block: 1px solid var(--border); padding-block: var(--xxl); }
.band__lede { font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 30px); line-height: 1.4; color: var(--ink-1); margin-top: var(--md); max-width: 22em; }

/* ---- Features ---- */
.features { padding-block: var(--xxl); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lg); margin-top: var(--xl); }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--lg); box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.feat__icon { color: var(--coral); width: 28px; height: 28px; margin-bottom: var(--md); }
.feat__title { font-size: 20px; }
.feat__body { color: var(--ink-2); margin-top: var(--sm); font-size: 15.5px; }

/* ---- Privacy band ---- */
.privacy-band { background: linear-gradient(180deg, var(--surface-tint), var(--cream)); padding-block: var(--xxl); border-top: 1px solid var(--border); }
.privacy-band__lede { font-size: 18px; color: var(--ink-2); margin-top: var(--md); max-width: 40em; }
.checklist { display: grid; gap: var(--sm); margin-top: var(--lg); max-width: 44em; }
.checklist li { position: relative; padding-left: 34px; color: var(--ink-1); font-size: 16.5px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/14px no-repeat;
}
.languages-note { margin-top: var(--xl); color: var(--ink-3); font-size: 15px; max-width: 50em; }

/* ---- Closing ---- */
.closing { padding-block: var(--xxxl); text-align: center; }
.closing__title { font-size: clamp(28px, 4vw, 44px); }
.closing__body { font-size: 19px; color: var(--ink-2); margin-top: var(--sm); }
.closing__cta { margin-top: var(--xl); display: flex; justify-content: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; background: var(--coral-deep); color: #fff; font-weight: 500;
  padding: 12px 24px; border-radius: var(--r-pill); box-shadow: var(--shadow-coral);
}
.btn:hover { background: #9E3328; text-decoration: none; }

/* ---- Document pages (privacy / terms / support) ---- */
.doc { max-width: var(--content-max); padding-block: var(--xxl); }
.doc h1 { font-size: clamp(32px, 4.5vw, 46px); }
.doc__updated { color: var(--ink-3); font-size: 14px; margin-top: var(--sm); }
.doc__intro { font-size: 18px; color: var(--ink-2); margin-top: var(--lg); }
.doc__section { margin-top: var(--xl); }
.doc__section h2 { font-size: 23px; margin-bottom: var(--sm); }
.doc__section p { color: var(--ink-2); margin-top: var(--sm); }

/* ---- FAQ ---- */
.faq { margin-top: var(--xl); display: grid; gap: var(--sm); }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 18px; }
.faq__item > summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 500; font-size: 17px; color: var(--ink-1); display: flex; justify-content: space-between; gap: var(--md); }
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after { content: "+"; color: var(--coral); font-size: 22px; line-height: 1; }
.faq__item[open] > summary::after { content: "–"; }
.faq__a { padding-bottom: 16px; color: var(--ink-2); }

/* ---- 404 ---- */
.notfound { max-width: var(--content-max); padding-block: var(--xxxl); text-align: center; }
.notfound h1 { font-size: clamp(30px, 5vw, 48px); }
.notfound p { color: var(--ink-2); font-size: 18px; margin-top: var(--md); }
.notfound .btn { margin-top: var(--xl); }

/* ---- Footer ---- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--xl); margin-top: var(--xxl); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--lg); align-items: flex-start; justify-content: space-between; }
.site-footer__brand .brand__name { font-size: 20px; }
.site-footer__tagline { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.site-footer__nav { display: flex; gap: var(--lg); }
.site-footer__nav a { color: var(--ink-2); font-size: 15px; }
.site-footer__nav a:hover { color: var(--coral-deep); }
.site-footer__legal { color: var(--ink-3); font-size: 13px; line-height: 1.6; text-align: right; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--xl); text-align: center; }
  .hero__copy { order: 2; }
  .hero__art { order: 1; }
  .hero__lede { margin-inline: auto; }
  .hero__cta { display: flex; justify-content: center; }
  .checklist { margin-inline: auto; text-align: left; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-inline: var(--md); }
  .site-nav { gap: var(--md); }
  .site-nav > a:not(.lang-switcher) { display: none; } /* keep header tidy on phones; full nav in footer */
  .feat-grid { grid-template-columns: 1fr; }
  .phone img { width: 230px; }
  .site-footer__inner { flex-direction: column; }
  .site-footer__legal { text-align: left; }
}

/* ---- Motion / accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .phone { rotate: none; }
}
