From f7605d86a15bb1de5a3e1737b42f5e16c586dff1 Mon Sep 17 00:00:00 2001 From: 3015418 <3015418@stud.th-mannheim.de> Date: Mon, 28 Sep 2026 12:06:52 +0200 Subject: [PATCH] Update responsive hero layout --- css/design-tokens.css | 23 --- css/produktuebersicht.css | 240 ------------------------- css/style.css | 365 ++++++++++++++++++++++++++++++++++++++ index.html | 92 +++++----- 4 files changed, 412 insertions(+), 308 deletions(-) delete mode 100644 css/design-tokens.css delete mode 100644 css/produktuebersicht.css create mode 100644 css/style.css diff --git a/css/design-tokens.css b/css/design-tokens.css deleted file mode 100644 index 83d7c2b..0000000 --- a/css/design-tokens.css +++ /dev/null @@ -1,23 +0,0 @@ -:root { - --tri-bg: #0d0d1a; - --tri-surface: #1a1a2e; - --tri-accent: #10b981; - --tri-white: #ffffff; - --tri-text: #f8fafc; - --tri-muted: #94a3b8; - --tri-border: rgb(148 163 184 / 20%); - --tri-font-body: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; - --tri-font-heading: var(--tri-font-body); - --tri-content-width: 1240px; -} - -body { - font-family: var(--tri-font-body); -} - -button, -input, -select, -textarea { - font-family: inherit; -} diff --git a/css/produktuebersicht.css b/css/produktuebersicht.css deleted file mode 100644 index cfd16c7..0000000 --- a/css/produktuebersicht.css +++ /dev/null @@ -1,240 +0,0 @@ -.produkt-hero, -.produkt-hero * { - box-sizing: border-box; -} - -.produkt-hero { - background: var(--tri-bg); - color: var(--tri-text); - font-family: var(--tri-font-body); - line-height: 1.6; - border-top: 4px solid var(--tri-accent); -} - -.produkt-hero__container { - width: min(var(--tri-content-width), calc(100% - 96px)); - margin-inline: auto; -} - -.produkt-hero__brand { - display: flex; - align-items: center; - gap: 20px; - padding-block: 28px; - border-bottom: 1px solid var(--tri-border); -} - -.produkt-hero__wordmark { - color: var(--tri-white); - font-size: 28px; - font-weight: 750; - line-height: 1; - letter-spacing: -1.4px; -} - -.produkt-hero__wordmark span { - color: var(--tri-accent); -} - -.produkt-hero__brand-label { - padding-left: 20px; - border-left: 1px solid var(--tri-border); - color: var(--tri-muted); - font-size: 13px; - letter-spacing: 0.035em; -} - -.produkt-hero__layout { - display: grid; - grid-template-columns: 1.15fr 1fr; - gap: clamp(32px, 5vw, 72px); - align-items: center; - padding-block: clamp(36px, 5vw, 64px); -} - -.produkt-hero__content { - min-width: 0; -} - -.produkt-hero__eyebrow { - margin: 0 0 22px; - color: var(--tri-accent); - font-size: 11px; - font-weight: 650; - letter-spacing: 0.16em; - text-transform: uppercase; -} - -.produkt-hero__title { - margin: 0; - color: var(--tri-white); - font-family: var(--tri-font-heading); - font-size: clamp(38px, 4.2vw, 59px); - font-weight: 500; - line-height: 1.14; - letter-spacing: -0.04em; - overflow-wrap: break-word; -} - -.produkt-hero__title span { - color: var(--tri-accent); -} - -.produkt-hero__description { - max-width: 51ch; - margin: 26px 0 0; - color: var(--tri-muted); - font-size: 16px; - line-height: 1.8; -} - -.produkt-hero__benefits { - display: grid; - gap: 12px; - margin: 27px 0 0; - padding: 0; - list-style: none; - font-size: 13px; - line-height: 1.65; -} - -.produkt-hero__benefits li { - position: relative; - padding-left: 22px; -} - -.produkt-hero__benefits li::before { - position: absolute; - top: 0.7em; - left: 0; - width: 9px; - height: 2px; - background: var(--tri-accent); - content: ""; -} - -.produkt-hero__visual { - position: relative; - isolation: isolate; - display: grid; - align-items: end; - aspect-ratio: 1 / 1.12; - min-width: 0; - margin: 0; - overflow: hidden; - border: 1px solid var(--tri-border); - border-radius: 3px; - background: var(--tri-surface); -} - -.produkt-hero__image { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - object-fit: cover; - object-position: 80% center; -} - -.produkt-hero__caption { - position: relative; - z-index: 1; - padding: 48px 32px 30px; - background: linear-gradient(transparent, rgb(13 13 26 / 92%) 45%); -} - -.produkt-hero__caption-label { - display: block; - padding-left: 12px; - border-left: 2px solid var(--tri-accent); - color: var(--tri-text); - font-size: 10px; - letter-spacing: 0.1em; - text-transform: uppercase; -} - -.produkt-hero__slogan { - margin: 16px 0 0; - color: var(--tri-white); - font-family: var(--tri-font-heading); - font-size: clamp(28px, 2.8vw, 39px); - line-height: 1.2; - letter-spacing: -0.025em; -} - -.produkt-hero__footer { - display: flex; - align-items: center; - justify-content: space-between; - gap: 24px; - padding-block: 22px 28px; - border-top: 1px solid var(--tri-border); - font-size: 12px; -} - -.produkt-hero__footer p { - margin: 0; -} - -.produkt-hero__footer p span, -.produkt-hero__footer-note { - color: var(--tri-muted); -} - -@media (max-width: 900px) { - .produkt-hero__container { - width: calc(100% - 48px); - } - - .produkt-hero__layout { - grid-template-columns: 1fr; - gap: 36px; - } - - .produkt-hero__title { - font-size: clamp(36px, 6.4vw, 56px); - } - - .produkt-hero__description { - max-width: 60ch; - } - - .produkt-hero__visual { - aspect-ratio: 4 / 3; - min-height: 300px; - } -} - -@media (max-width: 480px) { - .produkt-hero__container { - width: calc(100% - 36px); - } - - .produkt-hero__brand { - gap: 14px; - padding-block: 24px; - } - - .produkt-hero__brand-label { - padding-left: 14px; - font-size: 11px; - } - - .produkt-hero__description { - font-size: 15px; - } - - .produkt-hero__visual { - aspect-ratio: 1; - } - - .produkt-hero__caption { - padding: 48px 24px 26px; - } - - .produkt-hero__footer { - align-items: flex-start; - flex-direction: column; - gap: 12px; - } -} diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..733ecc8 --- /dev/null +++ b/css/style.css @@ -0,0 +1,365 @@ +:root { + color-scheme: dark; + --background: #0d0d1a; + --text: #f8fafc; + --muted: #c1c9d2; + --accent: #10b981; + --border: rgb(255 255 255 / 16%); + font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; + color: var(--text); + background: var(--background); +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +body { + display: flex; + flex-direction: column; + min-height: 100vh; + min-height: 100svh; + margin: 0; + line-height: 1.6; +} + +p, +h1 { + margin: 0; +} + +.container { + width: min(1680px, calc(100% - clamp(40px, 10vw, 192px))); + margin-inline: auto; +} + +.site-header { + border-top: 3px solid var(--accent); +} + +.brand { + display: flex; + align-items: center; + gap: 24px; + min-height: 88px; +} + +.brand__name { + font-size: 30px; + font-weight: 750; + line-height: 1; + letter-spacing: -1.5px; +} + +.brand__name span { + color: var(--accent); +} + +.brand__label { + padding-left: 24px; + border-left: 1px solid var(--border); + color: var(--muted); + font-size: 13px; + letter-spacing: 0.025em; +} + +main { + display: flex; + flex: 1; +} + +.hero { + position: relative; + isolation: isolate; + display: flex; + flex: 1; + min-width: 0; + border-block: 1px solid var(--border); +} + +.hero__image, +.hero::after { + position: absolute; + z-index: -1; + inset: 0; + width: 100%; + height: 100%; +} + +.hero__image { + object-fit: cover; + object-position: center 42%; +} + +.hero::after { + background: + linear-gradient(0deg, rgb(13 13 26 / 96%), transparent 42%), + linear-gradient(90deg, rgb(13 13 26 / 94%) 0%, rgb(13 13 26 / 79%) 35%, rgb(13 13 26 / 38%) 72%, rgb(13 13 26 / 25%) 100%); + content: ""; +} + +.hero__inner { + display: flex; + flex-direction: column; + padding-block: clamp(32px, 5vh, 64px) 28px; +} + +.hero__content { + width: min(100%, 1000px); + margin-block: auto; + padding-block: 24px 64px; +} + +.hero__eyebrow { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 26px; + color: #64e5b7; + font-size: 11px; + font-weight: 650; + letter-spacing: 0.16em; + text-transform: uppercase; +} + +.hero__eyebrow::before { + width: 28px; + height: 1px; + flex-shrink: 0; + background: currentColor; + content: ""; +} + +h1 { + max-width: 100%; + font-size: clamp(42px, 4.9vw, 88px); + font-weight: 550; + line-height: 1.1; + letter-spacing: -0.055em; + text-wrap: balance; + overflow-wrap: break-word; +} + +h1 span { + display: block; + margin-top: 8px; + color: var(--accent); +} + +.hero__description { + max-width: 65ch; + margin-top: 30px; + color: #d1d7df; + font-size: clamp(16px, 1.15vw, 19px); + line-height: 1.85; +} + +.hero__details { + display: grid; + grid-template-columns: minmax(0, 1fr) 250px; + align-items: center; + gap: 48px; + padding-top: 28px; + border-top: 1px solid var(--border); +} + +.benefits { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 24px; + margin: 0; + padding: 0; + list-style: none; +} + +.benefits li { + display: flex; + align-items: baseline; + gap: 14px; +} + +.benefits__number { + color: #64e5b7; + font-size: 11px; + font-variant-numeric: tabular-nums; +} + +.benefits p { + font-size: 14px; + font-weight: 500; +} + +.benefits p span { + display: block; + margin-top: 4px; + color: var(--muted); + font-size: 12px; + font-weight: 400; +} + +.hero__caption { + padding-left: 24px; + border-left: 1px solid var(--border); +} + +.hero__caption-label { + color: var(--muted); + font-size: 10px; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.hero__slogan { + margin-top: 8px; + font-size: 22px; + font-weight: 450; + line-height: 1.4; + letter-spacing: -0.025em; +} + +.site-footer__inner { + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; + min-height: 88px; + padding-block: 24px; + font-size: 12px; +} + +.site-footer__inner p > span { + margin-left: 12px; + color: var(--muted); +} + +.site-footer__note { + display: flex; + align-items: center; + gap: 9px; + color: var(--muted); +} + +.site-footer__note > span { + width: 5px; + height: 5px; + flex-shrink: 0; + border-radius: 50%; + background: var(--accent); +} + +@media (max-width: 1100px) { + .hero__image { + object-position: 80% center; + } + + .hero::after { + background: + linear-gradient(0deg, rgb(13 13 26 / 96%), transparent 42%), + linear-gradient(90deg, rgb(13 13 26 / 92%), rgb(13 13 26 / 70%) 65%, rgb(13 13 26 / 48%)); + } + + .hero__content { + max-width: 85%; + } + + .hero__details { + grid-template-columns: minmax(0, 1fr) 200px; + gap: 28px; + } + + .benefits li { + flex-direction: column; + gap: 8px; + } +} + +@media (max-width: 700px) { + .brand { + min-height: 76px; + gap: 16px; + } + + .brand__label { + padding-left: 16px; + font-size: 11px; + } + + .hero__image { + object-position: 85% center; + } + + .hero::after { + background: linear-gradient(90deg, rgb(13 13 26 / 87%), rgb(13 13 26 / 65%)), + linear-gradient(0deg, var(--background), transparent 55%); + } + + .hero__content { + max-width: 100%; + padding-block: 12px 40px; + } + + .hero__eyebrow { + gap: 8px; + font-size: 10px; + letter-spacing: 0.11em; + } + + .hero__eyebrow::before { + width: 20px; + } + + .hero__description { + margin-top: 24px; + } + + .hero__details { + grid-template-columns: 1fr; + gap: 28px; + padding-top: 24px; + } + + .benefits { + gap: 16px; + } + + .benefits p { + font-size: 12px; + } + + .hero__caption { + padding-left: 16px; + border-left-color: var(--accent); + } + + .hero__slogan { + font-size: 20px; + } + + .site-footer__inner { + align-items: flex-start; + flex-direction: column; + gap: 14px; + } + + .site-footer__inner p > span { + margin-left: 0; + } + + .site-footer__inner > p:first-child span { + display: block; + margin-top: 4px; + } +} + +@media (max-width: 360px) { + .benefits { + grid-template-columns: 1fr; + } + + .benefits li { + flex-direction: row; + gap: 14px; + } +} diff --git a/index.html b/index.html index 8987bf8..79f200f 100644 --- a/index.html +++ b/index.html @@ -5,67 +5,69 @@ Ernährungsberatung für Triathleten | tri-hub - - + - -
+ - -
+
+
+ Gruppe beim Radfahren und Laufen in einer Berglandschaft im Abendlicht - -
- - -
-
-
- tri-hub - Ernährungsberatung -
- -
-
-

Der Text wärmt sich noch auf

-

- Überschrift.
- Weitere Zeile.
+
+
+

Der Text wärmt sich noch auf

+

+ Überschrift. Weitere Zeile. Akzentzeile.

-

+

Hier folgt eine kurze Beschreibung der Ernährungsberatung. Dieser Platz ist für den finalen Text vorgesehen und wird ergänzt, sobald die Inhalte vorliegen.

- -
    -
  • Erster Vorteil – Text folgt
  • -
  • Zweiter Vorteil – Text folgt
  • -
  • Dritter Vorteil – Text folgt
  • -
-
- Gruppe beim Radfahren und Laufen in einer Berglandschaft im Abendlicht -
- Bildunterschrift folgt -

Slogan folgt.
Weitere Zeile.

-
-
-
+
+
    +
  • + +

    Erster Vorteil Text folgt

    +
  • +
  • + +

    Zweiter Vorteil Text folgt

    +
  • +
  • + +

    Dritter Vorteil Text folgt

    +
  • +
-
+

+
+ +