/* The frame library and guides, on top of styles.css. */

/* Korean breaks lines between words, as styles.css already does for Japanese and Chinese headings. */
:lang(ko) { word-break: keep-all; }
:lang(ko) :is(h1, h2, h3) { text-wrap: balance; }

.frames { max-width: 1100px; margin: 0 auto; padding: 56px 24px 110px; }
.frames-head { max-width: 720px; margin-bottom: 40px; }
.frames-head h1 { font-size: clamp(44px, 6.5vw, 72px); }
.frames .legal-lede { font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.section-title { font-size: clamp(28px, 4vw, 36px); margin: 64px 0 20px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 28px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 6px; }
.fine { font-size: 13px; color: var(--ink-3); margin-top: 40px; }

/* Grid of devices */
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.frame-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 16px 18px; border-radius: 22px; background: var(--card);
  border: 1px solid var(--line); text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.frame-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 20, 40, .08); }
.frame-card img { height: 220px; width: auto; object-fit: contain; margin-bottom: 8px; }
.frame-card span { font-weight: 600; font-size: 15px; text-align: center; }
.frame-card small { font-size: 13px; color: var(--ink-3); }
.frame-card.small img { height: 150px; }

/* One device */
.device-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.device-hero h1 { font-size: clamp(44px, 6vw, 68px); margin: 12px 0 18px; }
.device-hero-img { justify-self: center; max-height: 620px; width: auto; }
.device-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.device-actions .meta { font-size: 14px; color: var(--ink-3); }

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0 8px; }
.spec { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.spec h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.spec .big { font-size: 24px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.spec p { margin: 0; color: var(--ink-2); font-size: 15px; }

.frames-prose { max-width: 720px; margin: 0; padding: 24px 0 0; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.color-grid figure { margin: 0; padding: 18px 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.color-grid img { height: 190px; width: auto; }
.color-grid figcaption { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

/* Download prompt */
.cta-box {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  margin: 64px 0 0; padding: 28px 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, #fefdff, #e2e8fb); border: 1px solid var(--line);
}
.cta-box img { border-radius: 13px; }
.cta-box h2 { font-size: 30px; margin: 0 0 4px; color: var(--ink); }
.cta-box p { margin: 0; color: var(--ink-2); font-size: 16px; }
.legal .cta-box a.btn { color: #fff; }

/* Guides */
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-card { display: block; padding: 26px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 20, 40, .08); }
.guide-card h2 { font-size: 28px; margin: 0 0 8px; }
.guide-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.guide h3 { font-family: var(--sans); font-size: 19px; color: var(--ink); margin: 32px 0 8px; }
.guide table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 15px; line-height: 1.45; }
.guide th, .guide td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { color: var(--ink); font-weight: 600; background: rgba(23, 23, 28, .03); }
.guide code, .guide kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: rgba(23, 23, 28, .06); border-radius: 6px; padding: 2px 6px; color: var(--ink); }
.guide blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink); }
.guide .cta-box { grid-template-columns: auto 1fr; }
.guide .cta-box a.btn { grid-column: 1 / -1; justify-self: start; }
.guide-table-wrap { overflow-x: auto; }

/* 404 */
.not-found-hero { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; max-width: 900px; padding: 24px 0 8px; }
.not-found-hero img { transform: rotate(-6deg); }
.not-found-hero h1 { font-size: clamp(48px, 7vw, 80px); margin: 12px 0 16px; }
.not-found .guide-list { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 820px) {
  .not-found-hero { grid-template-columns: 1fr; gap: 24px; }
  .not-found-hero img { width: 130px; }
  .not-found .guide-list { grid-template-columns: 1fr; }
  .device-hero { grid-template-columns: 1fr; }
  .device-hero-img { max-height: 460px; }
  .spec-grid, .guide-list { grid-template-columns: 1fr; }
  .cta-box { grid-template-columns: auto 1fr; }
  .cta-box a.btn { grid-column: 1 / -1; justify-self: start; }
  .guide table { display: block; overflow-x: auto; white-space: nowrap; }
}
