/*
 * Icon Well: components
 * Needs tokens.css first. Every class starts with "iw-" so it can sit next to any other CSS.
 */

/* Base */
.iw { margin: 0; background: var(--iw-page); color: var(--iw-ink); font-family: var(--iw-sans); font-size: var(--iw-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.iw *, .iw *::before, .iw *::after { box-sizing: border-box; }
.iw img, .iw svg { max-width: 100%; display: block; }
:where(.iw) a { color: var(--iw-blue); text-decoration: none; }
:where(.iw) a:hover { color: var(--iw-blue-deep); }
.iw-container { width: min(100% - 40px, var(--iw-container)); margin-inline: auto; }
.iw-wide { width: min(100% - 32px, var(--iw-wide)); margin-inline: auto; }
.iw-narrow { width: min(100% - 40px, var(--iw-narrow)); margin-inline: auto; }
.iw-section { padding-block: var(--iw-section); }
.iw-section--paper { background: var(--iw-paper); }
.iw-center { text-align: center; }

/* Nav: tiny icon and name left, small gray links right, one hairline under it */
.iw-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; border-bottom: var(--iw-border); }
.iw-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--iw-soft); }
.iw-logo:hover { color: var(--iw-ink); }
.iw-logo .iw-icon { width: 22px; box-shadow: 0 -2px 0 rgba(10, 30, 80, .28) inset, 0 2px 4px rgba(29, 79, 181, .25); }
.iw-logo .iw-icon::after { display: none; }
.iw-logo .iw-icon::before { inset: 16% 16% 22% 16%; box-shadow: none; }
.iw-nav__links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.iw-nav__links a { color: var(--iw-soft); font-size: 14px; font-weight: 500; }
.iw-nav__links a:hover, .iw-nav__links a[aria-current] { color: var(--iw-ink); }
@media (max-width: 640px) { .iw-nav__links { gap: 16px; } .iw-nav__links li:nth-child(n+3) { display: none; } }

/* The signature: a glossy beveled app icon. A blue body, a white screen and a gray tray lip */
.iw-icon { position: relative; width: 120px; aspect-ratio: 1; border-radius: var(--iw-radius-icon); background: var(--iw-gloss); box-shadow: var(--iw-shadow-icon); flex: none; }
.iw-icon::before { content: ""; position: absolute; inset: 13% 13% 24% 13%; border-radius: 16%; background: linear-gradient(180deg, var(--iw-paper), var(--iw-cloud)); box-shadow: 0 3px 0 rgba(10, 30, 80, .25) inset, 0 1px 0 rgba(255, 255, 255, .5); }
.iw-icon::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 13%; height: 9%; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, var(--iw-faint), var(--iw-line-strong)); }
.iw-icon__glyph { position: absolute; inset: 22% 22% 32% 22%; z-index: 1; color: var(--iw-ink); }
.iw-icon--xl { width: clamp(120px, 14vw, 168px); }
.iw-icon--sm { width: 56px; }
.iw-icon--slate { background: linear-gradient(180deg, var(--iw-line-strong), var(--iw-faint) 50%, var(--iw-soft)); box-shadow: 0 2px 0 rgba(255, 255, 255, .4) inset, 0 -6px 0 rgba(28, 32, 39, .18) inset, 0 14px 24px rgba(28, 32, 39, .14); }
.iw-icon--berry { background: linear-gradient(180deg, var(--iw-berry-light) 0%, var(--iw-berry) 50%, var(--iw-berry-deep) 100%); box-shadow: 0 2px 0 rgba(255, 255, 255, .35) inset, 0 -6px 0 rgba(90, 10, 30, .25) inset, 0 18px 30px rgba(194, 33, 73, .25); }

/* Section glyphs: three bright overlapping dots, or a small colored tile */
.iw-glyph { display: inline-block; width: 30px; height: 30px; position: relative; flex: none; }
.iw-glyph::before, .iw-glyph::after, .iw-glyph i { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; mix-blend-mode: multiply; }
.iw-glyph::before { left: 0; top: 0; background: var(--iw-blue); }
.iw-glyph::after { right: 0; top: 0; background: var(--iw-berry); }
.iw-glyph i { left: 6px; bottom: 0; background: var(--iw-sun); }
.iw-glyph-tile { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--iw-berry); color: var(--iw-paper); flex: none; box-shadow: 0 -2px 0 rgba(0, 0, 0, .12) inset; }
.iw-glyph-tile--blue { background: var(--iw-blue); }
.iw-glyph-tile--leaf { background: var(--iw-leaf); }
.iw-glyph-tile--sun { background: var(--iw-sun); }
.iw-glyph-tile svg { width: 18px; height: 18px; }

/* Headlines */
.iw-hero-title { font-weight: 800; font-size: var(--iw-text-hero); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.iw-h2 { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-weight: 800; font-size: var(--iw-text-h2); line-height: 1.15; letter-spacing: -.015em; margin: 0; }
.iw-h2--left { justify-content: flex-start; }
.iw-h3 { font-weight: 700; font-size: var(--iw-text-h3); line-height: 1.3; margin: 0; }
.iw-lead { font-size: var(--iw-text-lead); line-height: 1.5; color: var(--iw-ink); margin: 0; }
.iw-sub { color: var(--iw-soft); margin: 0; }
.iw-eyebrow { display: inline-block; font-weight: 700; font-size: var(--iw-text-small); letter-spacing: .02em; color: var(--iw-blue); }

/* Links and buttons. Text links are the default action; pills are rare */
.iw-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--iw-blue); white-space: nowrap; }
.iw-link::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.iw-play { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; color: var(--iw-blue); white-space: nowrap; }
.iw-play::before { content: ""; width: 28px; height: 28px; border-radius: 50%; background: var(--iw-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M11 8.5v11l9-5.5z' fill='white'/%3E%3C/svg%3E") center / 100% no-repeat; }
.iw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-family: var(--iw-sans); font-weight: 700; font-size: 16px; line-height: 1; padding: 13px 22px; border-radius: var(--iw-radius-sm); border: 0; background: var(--iw-blue); color: var(--iw-paper); cursor: pointer; transition: background .2s var(--iw-ease); }
.iw .iw-btn { color: var(--iw-paper); }
.iw-btn:hover { background: var(--iw-blue-deep); }
.iw-btn--berry { background: var(--iw-berry); border-radius: var(--iw-radius-xs); box-shadow: 0 -2px 0 rgba(0, 0, 0, .14) inset; }
.iw-btn--berry:hover { background: var(--iw-berry-deep); }
.iw .iw-btn--quiet { background: var(--iw-paper); color: var(--iw-ink); box-shadow: inset 0 0 0 1px var(--iw-line-strong); }
.iw-btn--quiet:hover { background: var(--iw-cloud); }
.iw-btn--block { width: 100%; }
.iw-btn--sm { font-size: 14px; padding: 9px 14px; }
.iw-store { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 9px; background: var(--iw-night); color: var(--iw-paper); white-space: nowrap; line-height: 1.1; }
.iw .iw-store, .iw .iw-store:hover { color: var(--iw-paper); }
.iw-store small { display: block; font-size: 10px; opacity: .8; }
.iw-store strong { display: block; font-size: 15px; font-weight: 700; }

/* Award laurels around a small two-line credit */
.iw-award { display: inline-flex; align-items: center; gap: 10px; color: var(--iw-ink); }
.iw-award svg { width: 22px; height: 40px; color: var(--iw-ink); }
.iw-award svg:last-child { transform: scaleX(-1); }
.iw-award strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.iw-award span { display: block; font-size: 13px; color: var(--iw-soft); }

/* The tilted window: the product leans back into the page and runs off the right edge */
.iw-tilt { position: relative; overflow: hidden; height: clamp(220px, 34vw, 420px); background: linear-gradient(180deg, var(--iw-page), var(--iw-paper)); }
.iw-tilt__plane { position: absolute; left: 12%; top: 18%; width: 1320px; transform-origin: 0 0; transform: perspective(1800px) rotateX(38deg) rotateZ(-10deg) skewX(4deg) scale(var(--iw-tilt-scale, 1)); }
@media (max-width: 760px) { .iw-tilt__plane { --iw-tilt-scale: .62; left: 4%; } }
.iw-window { display: grid; grid-template-columns: 230px 1fr; border-radius: var(--iw-radius); background: var(--iw-paper); box-shadow: var(--iw-shadow-lg); overflow: hidden; border: var(--iw-border); }
.iw-window__side { background: var(--iw-cloud); border-right: var(--iw-border); padding: 16px 14px 40px; }
.iw-window__dots { display: flex; gap: 7px; margin-bottom: 22px; }
.iw-window__dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--iw-line-strong); background: var(--iw-paper); }
.iw-window__main { padding: 28px 36px 40px; }
.iw-window--flat { box-shadow: var(--iw-shadow); }

/* App list rows: a colored glyph, a label and an optional count */
.iw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.iw-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; font-size: 15px; font-weight: 500; }
.iw-list li[aria-current] { background: var(--iw-well); }
.iw-list b { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--iw-soft); }
.iw-list b.iw-count { color: var(--iw-paper); background: var(--iw-berry); padding: 1px 7px; border-radius: var(--iw-radius-pill); }
.iw-dot { width: 16px; height: 16px; border-radius: 5px; flex: none; background: var(--iw-blue); }
.iw-dot--sun { background: var(--iw-sun); border-radius: 50%; }
.iw-dot--berry { background: var(--iw-berry); }
.iw-dot--leaf { background: var(--iw-leaf); }
.iw-dot--plum { background: var(--iw-plum); }
.iw-dot--ring { background: none; border: 2px solid var(--iw-blue); border-radius: 50%; }

/* Checklist rows inside the window */
.iw-checks { list-style: none; margin: 0; padding: 0; }
.iw-checks li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: var(--iw-border); font-size: 15px; }
.iw-checks li::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--iw-line-strong); flex: none; }
.iw-checks li.is-done { color: var(--iw-faint); }
.iw-checks li.is-done::before { border-color: var(--iw-blue); background: var(--iw-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.iw-checks em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--iw-berry); white-space: nowrap; }
.iw-group-title { font-size: 14px; font-weight: 700; color: var(--iw-blue); padding-bottom: 6px; border-bottom: 1px solid var(--iw-blue-soft); margin: 22px 0 4px; }

/* Device tiles: soft gray wells with a drawn device, a name and a small note */
.iw-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .iw-tiles { grid-template-columns: repeat(2, 1fr); } }
.iw-tile { background: var(--iw-well); border-radius: var(--iw-radius); padding: 26px 16px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.iw-tile svg { height: 56px; width: auto; color: var(--iw-soft); margin-bottom: 10px; }
.iw-tile strong { font-size: 18px; }
.iw-tile span { font-size: 13px; color: var(--iw-soft); }
.iw-tile .iw-btn, .iw-tile .iw-store { margin-top: 12px; }

/* Cards */
.iw-card { background: var(--iw-paper); border-radius: var(--iw-radius); padding: 26px; box-shadow: var(--iw-shadow); }
.iw-card .iw-glyph-tile { margin-bottom: 16px; }
a.iw-card { color: var(--iw-ink); transition: transform .2s var(--iw-ease); }
a.iw-card:hover { color: var(--iw-ink); transform: translateY(-2px); }
.iw-card .iw-tag { align-self: flex-start; }
.iw-card p { margin: 8px 0 0; color: var(--iw-soft); font-size: 16px; }
.iw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .iw-grid-3 { grid-template-columns: 1fr; } }

/* Tags and small badges */
.iw-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--iw-radius-pill); background: var(--iw-blue-soft); color: var(--iw-blue-deep); font-size: 13px; font-weight: 600; white-space: nowrap; }
.iw-tag--plum { background: var(--iw-plum-soft); color: var(--iw-plum); }
.iw-tag--leaf { background: var(--iw-leaf-soft); color: var(--iw-leaf-deep); }
.iw-badge { display: inline-block; padding: 3px 9px; border-radius: var(--iw-radius-xs); background: var(--iw-berry); color: var(--iw-paper); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Quote */
.iw-quote { background: var(--iw-paper); border-radius: var(--iw-radius); padding: 24px; box-shadow: var(--iw-shadow); margin: 0; }
.iw-quote p { margin: 0; font-size: 17px; }
.iw-quote footer { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--iw-soft); }
.iw-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--iw-well); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--iw-ink); flex: none; }

/* Pricing */
.iw-toggle { display: inline-flex; padding: 4px; border-radius: var(--iw-radius-sm); background: var(--iw-well); gap: 4px; }
.iw-toggle button { font-family: var(--iw-sans); font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--iw-soft); padding: 8px 16px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.iw-toggle button[aria-pressed="true"] { background: var(--iw-paper); color: var(--iw-ink); box-shadow: var(--iw-shadow); }
.iw-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .iw-plans { grid-template-columns: 1fr; } }
.iw-plan { background: var(--iw-paper); border-radius: var(--iw-radius-lg); padding: 30px 26px; box-shadow: var(--iw-shadow); display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.iw-plan--featured { box-shadow: 0 0 0 2px var(--iw-blue), var(--iw-shadow-lg); }
.iw-plan .iw-icon { width: 64px; }
.iw-price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.iw-price small { font-size: 15px; font-weight: 500; color: var(--iw-soft); letter-spacing: 0; }
.iw-plan ul { list-style: none; margin: 0; padding: 0; text-align: left; width: 100%; display: grid; gap: 8px; font-size: 15px; }
.iw-plan li { display: flex; gap: 10px; align-items: flex-start; }
.iw-plan li::before { content: ""; width: 16px; height: 16px; margin-top: 4px; border-radius: 5px; flex: none; background: var(--iw-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.iw-plan .iw-btn { width: 100%; margin-top: 6px; }

/* FAQ */
.iw-faq { display: grid; gap: 10px; }
.iw-faq details { background: var(--iw-paper); border-radius: var(--iw-radius-sm); padding: 16px 20px; box-shadow: var(--iw-shadow); }
.iw-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.iw-faq summary::after { content: "+"; color: var(--iw-blue); font-weight: 800; }
.iw-faq details[open] summary::after { content: "\2212"; }
.iw-faq p { margin: 10px 0 0; color: var(--iw-soft); font-size: 16px; }

/* Article */
.iw-article { background: var(--iw-paper); border-radius: var(--iw-radius-lg); padding: clamp(24px, 5vw, 56px); box-shadow: var(--iw-shadow); }
.iw-article h1 { font-size: clamp(32px, 4.2vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 14px 0 0; }
.iw-article h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 44px 0 0; display: flex; align-items: center; gap: 10px; }
.iw-article p, .iw-article li { font-size: 18px; line-height: 1.7; }
.iw-article p { margin: 16px 0 0; }
.iw-article ul { padding-left: 20px; margin: 14px 0 0; }
.iw-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; font-size: 14px; color: var(--iw-soft); }
.iw-callout { margin: 28px 0 0; padding: 18px 20px; border-radius: var(--iw-radius-sm); background: var(--iw-blue-soft); display: flex; gap: 14px; align-items: flex-start; }
.iw-callout p { margin: 0; font-size: 16px; }
.iw-figure { margin: 30px 0 0; background: var(--iw-well); border-radius: var(--iw-radius); padding: clamp(16px, 4vw, 32px); }
.iw-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--iw-soft); text-align: center; }

/* Forms */
.iw-form { display: grid; gap: 16px; }
.iw-field { display: grid; gap: 6px; }
.iw-label { font-size: 14px; font-weight: 600; }
.iw-input, .iw-select { width: 100%; font-family: var(--iw-sans); font-size: 16px; color: var(--iw-ink); background: var(--iw-cloud); border: 1px solid var(--iw-line); border-radius: var(--iw-radius-sm); padding: 12px 14px; transition: box-shadow .2s var(--iw-ease), border-color .2s var(--iw-ease); }
.iw-input:focus, .iw-select:focus { outline: none; border-color: var(--iw-blue); background: var(--iw-paper); box-shadow: var(--iw-focus); }
.iw-hint { font-size: 13px; color: var(--iw-soft); }
.iw-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--iw-soft); }
.iw-check input { accent-color: var(--iw-blue); width: 17px; height: 17px; margin-top: 3px; flex: none; }
.iw-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.iw-choice label { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--iw-radius-sm); background: var(--iw-cloud); border: 1px solid var(--iw-line); font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; }
.iw-choice input { position: absolute; opacity: 0; pointer-events: none; }
.iw-choice label:has(input:checked) { border-color: var(--iw-blue); background: var(--iw-blue-soft); color: var(--iw-blue-deep); }
.iw-panel { background: var(--iw-paper); border-radius: var(--iw-radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--iw-shadow-lg); }

/* Footer: quiet, centered, small */
.iw-footer { padding-block: 48px 56px; border-top: var(--iw-border); text-align: center; font-size: 14px; color: var(--iw-soft); }
.iw-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 14px; }
.iw-footer a { color: var(--iw-soft); }
.iw-footer a:hover { color: var(--iw-ink); }

/* Motion: the icon settles in, nothing else moves */
@media (prefers-reduced-motion: no-preference) {
  .iw-rise { animation: iw-rise .9s var(--iw-ease) both; }
  @keyframes iw-rise { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
}
